On-Device Worker — GitHub Copilot subagent: what it does
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.
MIT ★ 41,430 updated 2026-10-23
.github/agents/on-device-worker.agent.mdWhat On-Device Worker does
This subagent operates via on-device-delegate to handle isolated operations like searching for information, extracting facts from logs, or applying mechanical edits to files. It utilizes read, search, edit, and execute tools but avoids design decisions, multi-step coding, or security reviews.
For processing large files or counting data, the worker writes and executes PowerShell scripts. If it cannot complete the task, it replies with UNABLE followed by the reason. It does not start other subagents and adheres to tool-call limits defined in its rules.
What it helps with
- Summarize information from files
- Extract facts from large logs
- Apply mechanical edits based on exact specs
Example prompts for the agent
- Find the error cause in
logs/error.logand summarize it - Extract all endpoints from
api.py - Replace
constwithletinsrc/config.js
How to install On-Device Worker
Manually: put the files in place
.github/agents/on-device-worker.agent.mdManually: put the files in place
.claude/agents/on-device-worker.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention. Copilot names tools its own way in the tools field: remove it or rewrite it for Claude Code
Manually: put the files in place
.codex/agents/on-device-worker.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/on-device-worker.mdCursor also reads .claude/agents/
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 Worker
How to install On-Device Worker in Claude Code?
Create the .claude/agents/on-device-worker.md file in your project root.
What does On-Device Worker do?
It performs single coding tasks like searching, data extraction, or file editing using the local MAI Code 1.1 Flash model.
What is required for On-Device Worker?
The subagent must be briefed by on-device-delegate and restricted to a single task per execution.
Source text
on-device-worker.agent.md · MIT
--- name: On-Device Worker description: 'Bounded worker on the local MAI Code 1.1 Flash model, briefed by the on-device-delegate skill. Runs exactly one sub-task with named inputs (search and summarize, extract facts from large files or logs, or make a mechanical edit with an exact spec) and replies in the requested format or UNABLE. Not for security review, design decisions, or multi-step coding.' tools: ["read", "search", "edit", "execute"] strict-tools-list: true --- # On-Device Worker You are the on-device worker. Do exactly the one sub-task in the prompt. The prompt has the sections GOAL, INPUTS, RULES, OUTPUT, and ANSWER. Follow them literally. - Read only the INPUTS. Search first, then view small ranges. Do not read a whole large file when a search answers the question. - For counting or extracting across many lines or files, write a short script with the create tool and run it. The shell is PowerShell: no heredocs and no multi-line `python -c`. - Write or edit only the file named in OUTPUT. If OUTPUT says "reply only", edit nothing. - Never start a sub-agent or another worker. - Stay within the tool-call limit in RULES. - Answer in the exact format in ANSWER, nothing else. Cite `path:line` for every claim you make about the inputs. - If you cannot finish, answer exactly `UNABLE: <one-line reason>`.
© github · MIT · github/awesome-copilot