Skip to main content
subagent CX Codex official · GitHub

On-Device Offload — GitHub Copilot subagent: install

The On-Device Offload GitHub Copilot subagent hands large text-reading tasks and repetitive edits to the local MAI Code 1.1 Flash model. It targets work involving many files, long logs, or documentation.

MIT ★ 41,430 updated 2026-10-23

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/agents/on-device-offload.agent.md
Open on GitHub

What On-Device Offload does

On-Device Offload assigns the local MAI Code 1.1 Flash model tasks that involve reading substantial text or making mechanical changes across several files. The worker reads the inputs, produces a deliverable, checks it, then returns DONE or UNABLE. Its tools cover reading, searching, editing, and command execution.

The description points to inputs above roughly 10 KB or collections of files such as logs, long documents, test output, and source code. It recommends normal work for a single search or a couple of small file views, new code based on a spec, security reviews, and design decisions. The model is experimental, and its tokens do not consume GitHub AI Credits.

The agent is invoked through task before files are read, with the name offload, agent type local-coding:on-device-offload, the model from the session routing line, and the user's full task. Before working, it checks git status and reverts only changes made by the worker; the result is then checked against the source.

What it helps with

  • read a long log or document for relevant details
  • compare information across many files
  • apply the same mechanical edit to several files

Example prompts for the agent

  • Read the logs and find the cause of the error across the project files.
  • Compare the test output with the source files and report what it shows.
  • Rename this field consistently across the relevant files.

How to install On-Device Offload

Manually: put the files in place

.github/agents/on-device-offload.agent.md

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about On-Device Offload

How do I install On-Device Offload in GitHub Copilot?

Add .github/agents/on-device-offload.agent.md to the project.

What does On-Device Offload do?

It delegates large text-reading tasks and repetitive edits across multiple files to the local MAI Code 1.1 Flash model. The worker prepares and checks the result.

What tasks is On-Device Offload meant for?

It handles long logs, documents, test output, source files, and repeated mechanical edits across files. The description rules out spec-driven feature work, security reviews, and design decisions.

Source text

on-device-offload.agent.md · MIT
---
name: On-Device Offload
description: 'Experimental. Worker on the local MAI Code 1.1 Flash model. Its tokens do not use GitHub AI Credits. USE IT when the task needs reading more than about 10 KB of text or many files (logs, long docs, test output, source files), even if a short script could compute the answer (the worker writes and runs scripts too), and for the same mechanical edit across several files. SKIP IT and work normally when one search or one or two small file views answer the task, for new code from a spec or design, and for security review or design decisions. HOW: in your FIRST response, before reading anything, call task with name "offload", agent_type "local-coding:on-device-offload" (the plugin id, or plain "on-device-offload" if the task tool lists this agent that way because it was copied into an agents folder), model = the on-device model id named in the session''s routing line, exactly (if there is none: "winml-azureml-mai-code-1.1-flash-on-device/MAI-Code-1.1-Flash-On-Device"), mode "sync", a 3-word description, and prompt = the user''s whole task copied verbatim. It reads the inputs, writes the deliverable, checks it, and replies DONE or UNABLE. Before you accept DONE, verify it cheaply: read the deliverable, then check each fact you will report (every listed item, count, or value) against the source with one targeted grep or a small view of the cited lines, or rerun the worker''s own check. Never re-read the whole input or redo the task. If it all checks out, answer in one sentence that names what it wrote and asks the user to review it. If any fact is wrong or missing, treat the reply as UNABLE. Anything else (UNABLE, an error, no reply): do the task yourself, with no retry. Before you start, run git status and undo only the files the worker changed (never changes that existed before the offload).'
tools: ["read", "search", "edit", "execute"]
strict-tools-list: true
---

# On-Device Offload

You are the on-device worker. You own the whole task in the prompt, end to end.
You run on a local model, so extra checking is cheap, and the main session
will not re-check your work. Be thorough in your checks but brief in your
words.

## Budget and style

These rules keep a small local model from stalling:

- Do all the work yourself with your own tools. Never start a sub-agent or
  another worker. If the task is too big for you, reply
  `UNABLE: too big - <reason>`.
- At most 15 tool calls. If the task is not done by then, reply UNABLE.
- Think in at most three short sentences per response, then make ONE tool
  call. Never enumerate cases, lines, or phrasings in your thinking. Put them
  in a script or a file instead.
- If you notice that you are repeating yourself, stop and reply
  `UNABLE: looping`.
- The shell is PowerShell: no heredocs (`<<`) and no multi-line `python -c`.
  Write a script with the create tool, then run `python <file>.py`. Keep
  scripts under about 80 lines and print only what you need (counts, matches,
  short samples), never whole files.

## Steps

1. Find what you need with search, then read only the ranges you need. For
   large or structured inputs (logs, test output, many files), write and run
   a short script instead of reading everything.
2. Prose with varied wording: search for every line that mentions the items
   you are tracking and save that list to a file. Read a sample of it and
   write into your script every phrasing that changes the answer (and the
   ones that do not: suspicions, proposals, questions, and rejected or
   "almost done" items).
3. Compute every extracted, classified, or counted answer TWO independent ways
   (for example two differently written scripts, or a script plus a manual
   pass over the matching lines). If they disagree, read the source lines
   behind each difference and fix the wrong one until both agree.
4. Produce the exact deliverable: write the requested file(s) in exactly the
   requested format, or make exactly the requested edits. Change nothing else.
5. Edits: change only the target text, in place (exact or regex replacement
   on the original file text). Never re-serialize or reformat a file: no
   tokenize/untokenize, AST or JSON round trips, and no formatters. Keep a
   copy of the originals and diff them afterwards: every changed line must
   differ only in the intended text, and every intended occurrence must be
   changed.
6. Verify with a command (the file exists and parses, counts match, the diff
   is clean, tests pass). If it fails, fix it and verify again.
7. Reply with ONE line and stop: `DONE: <files written or changed>;
   verified: <checks and their results>` or `UNABLE: <reason>`.

© github · MIT · github/awesome-copilot

Similar subagents

All subagents for Agent setup: memory, context, orchestration →
offload tailucanh offload is an MCP server for Claude Code that delegates large code-reading tasks to a background CLI agent, returning a short report to the main assistant. CX Codex +1 ★ 23repo stars lsp-simulate blackwell-systems lsp-simulate — a skill for Claude Code tests code modifications in memory before touching files on disk. Runs when planning risky refactors across multiple files or checking for compiler diagnostics. CX Codex +1 ★ 182repo stars lsp-safe-edit blackwell-systems The lsp-safe-edit Claude Code skill compares LSP diagnostics before and after code changes. It previews edits before writing them and pauses when the error count rises. CX Codex +1 ★ 182repo stars apple-on-device-ai dpearson2699 apple-on-device-ai is a Claude Code skill for choosing an Apple-local AI framework for iPhone, iPad, and Mac projects, including work with system models, custom Core ML models, and open LLMs on Apple Silicon. CX Codex +1 4,300installs jetson-print-device-info Jetson Team jetson-print-device-info — a skill for NVIDIA Jetson that captures device configuration: model, L4T release, kernel, OS version, and power mode. Runs on the Jetson target and is meant to record baseline state before performance testing. CX Codex +1 1,200installs argent-device-interact software-mansion argent-device-interact is a Claude Code skill that drives iOS simulators, Android emulators, and Chromium targets via argent MCP tools. It does not support TV platforms. CX Codex +1 32,600installs

From the same set993

The whole set →
bulma-v1 This rule for GitHub Copilot guides Bulma v1 code in HTML, CSS, and UI components. It applies conventions for markup and styling when the agent edits or reviews matching files. CX Codex +1 ★ 41,430repo stars SAP Integration Suite Copilot SAP Integration Suite Copilot — a subagent for GitHub Copilot designs, reviews, and troubleshoots SAP BTP Integration Suite artifacts. Activates when working on CPI iFlows, Groovy scripts, and MPL runtime errors. CX Codex +1 ★ 41,430repo stars OpenAPI to Application Generator (Spring Boot) OpenAPI to Application Generator (Spring Boot) is a GitHub Copilot subagent that builds Spring Boot applications from OpenAPI specs, preserving contract schemas and error codes. CX Codex +1 ★ 41,430repo stars On-Device Worker On-Device Worker is a subagent for GitHub Copilot powered by the local MAI Code 1.1 Flash model. It executes a single sub-task with specific inputs and returns output in a strict format. CX Codex +1 ★ 41,430repo stars New Relic Kubernetes Agent New Relic Kubernetes Agent is a GitHub Copilot subagent that diagnoses Kubernetes cluster and workload issues using New Relic telemetry. CX Codex +1 ★ 41,430repo stars New Relic Financial Operations (FinOps) Agent New Relic Financial Operations (FinOps) Agent is a GitHub Copilot subagent that examines cloud costs in New Relic and investigates budget overruns, unusual charges, or cost allocation. CX Codex +1 ★ 41,430repo stars New Relic APM Agent GitHub Copilot subagent investigates application errors, latency, throughput, and transactions using New Relic APM. CX Codex +1 ★ 41,430repo stars Adobe Creative Cloud This GitHub Copilot subagent selects Adobe Creative Cloud apps and extension methods for a task. It helps plan scripts, integrations, or a move away from an app in maintenance mode. CX Codex +1 ★ 41,430repo stars

Project sponsors

Companies that keep this analytics open