Understanding subagents
What a subagent buys you — a separate context, a fresh pair of eyes, a side task where only the deliverable matters — and the three subagents mounted in every workspace by default.
In brief
A subagent is a separate execution context: it receives a mission, works with its own system prompt, and returns a result to the main agent. Three subagents are mounted by default in every workspace — general-purpose, skill-editor, and development — and code execution exists only in the last one. To execute, you delegate.
An assistant works in a single context: the conversation, its files, its skills — everything piles up there. A subagent opens a second context, empty, holding nothing but the mission it is given. It works, it returns its deliverable, it disappears. The main agent resumes the conversation with the result, not with the path that led there.
What the separate context buys you
Three situations justify it, and they are easy to recognize.
A fresh pair of eyes. Reviewing, verifying, contradicting: an agent that wrote a text is the worst judge of that text, because it holds in context every reason it wrote it that way. A subagent that sees only the result judges what is there, not what was intended.
A side task where only the deliverable matters. Digging through twenty files to extract three lines, comparing a dataset, running a search: the work is bulky, the result fits in a paragraph. Done in the conversation, the intermediate output clutters every later turn. Done alongside, only the conclusion remains.
Parallelizable work. Several independent missions run at the same time, each in its own context, instead of one after another.
What it costs
A subagent does not see the conversation. That is the same property taken from the other end: what isolates it from the noise also isolates it from the useful context. It does not know what the user said three turns ago, nor what has already been ruled out. Everything it needs must fit in the mission you send it and in its system prompt.
A round trip is therefore not free. Delegating a short task that requires re-explaining the whole context costs more than doing it on the spot.
The three built-in subagents
Every workspace has them without declaring anything. Each answers a distinct question.
| Subagent | The situation that calls for delegating to it |
|---|---|
general-purpose | Any work that benefits from a clean context: review, verification, bulky search, parallelizable task. It is the default choice when neither of the other two applies. |
skill-editor | Creating, editing, duplicating, deleting, or (un)whitelisting a workspace skill. The skill-editing tools live in its context, not in the assistant's. |
development | Running code or commands: build, tests, scripts. It is the only one carrying the sandbox. |
Code execution is fenced off, deliberately
Neither the main agent nor the other subagents have the execute tool. It is not removed case by case: it is disabled everywhere, and development is the only one that gets it back.
This is a delegation rule before it is a tooling rule. It does not say "execution is forbidden," it says where execution happens: in a dedicated context whose system prompt speaks of sandbox, build, and tests, and which returns a summary — key output, status, files produced — rather than dumping logs into the conversation.
If you are writing a skill that must run code, do not look for the field that would unlock execution: there is none. Write the instruction that delegates to development.
Tool inheritance
A subagent may or may not inherit the main agent's equipment, and the three built-ins do not make the same choice: general-purpose inherits everything, while skill-editor and development start from their own kit — the first with the skill tools, the second with the sandbox and the file tools.
The principle shows through in these three cases. A subagent that extends the assistant's work inherits; a subagent that exists to hold a separate domain gets exactly what that domain requires, and nothing else. A restricted kit is also what keeps its system prompt short and its mission legible.
The carrier of a private skill
A private skill builds on this same mechanism, pushed to its conclusion: the SKILL.md body becomes the system prompt of a carrier subagent, and never enters the context of the assistant talking to the user.
That carrier receives one thing the others do not: a confidentiality contract appended after the skill's text, forbidding it to return its criteria, its thresholds, and its reasoning — it returns only conclusions applied to the case submitted.
What this guarantee covers, and above all what it does not promise, is stated where it belongs: Private skill.
Declaring your own
A skill can declare its own subagents under metadata.subagents, with their system prompt and the skills they may load. The field-by-field format is in Create a subagent.
Export and share a skill
Getting a skill out of its workspace: a downloadable .skill archive, duplication to adapt a system skill, and distribution to another workspace or another organization.
Create a subagent
Declare a subagent under `metadata.subagents`: the five fields read at runtime — `name`, `description`, `system_prompt`, `skills`, `prompt_stack` — what each one changes, and how to call it from the SKILL.md body.