SKILL 26 / ORCHESTRATION · DEEP-DIVE

Subagents vs Skills

One question settles it: does the work happen in your context, or in another one · the inheritance table, line by line · the 15x coordination tax

2026-09-27 · BigCat

Last time we laid out four orchestration primitives side by side. This time we drill into the one people buy wrong most often. A subagent is not a stronger skill: one injects instructions into the conversation you are already in, the other opens a fresh context and hands back a single paragraph. We read the official inheritance table line by line, then open two real subagent pipelines that someone already wrote for you.

Prerequisite → Skill 25, the orchestration roundup (four primitives on two axes)

// WHY THIS MATTERS

Whether to reach for a subagent has nothing to do with how hard the task is. It depends on whether you still want to watch the middle. The Agent SDK's subagents page lists four benefits: context isolation, parallelization, specialized instructions and knowledge, tool restrictions. Only the first is something a skill cannot give you — the other three, a skill does fine. So the route here is: read both inheritance contracts first (who can see what), then name the concrete things you can install or read, and only then hand over the criteria. One preview of those: will you read its output as a paragraph, or follow it as a series of steps?

// 01

What it takes off your plate: moving "read forty files" out of the main thread

Claim: what a subagent buys you is not capability, it is forgetting. It reads forty files and your main conversation receives one summary. A skill cannot do that, because a skill's body stays in the thread with you.

The contract: one markdown file, two required fields

A subagent is a .md file under .claude/agents/ (project) or ~/.claude/agents/ (global) — both are scanned recursively. Only name and description are required; the body is its system prompt. From the official subagents docs, these optional fields are the ones worth memorizing:

# .claude/agents/api-developer.md
---
name: api-developer
description: Implement API endpoints following team conventions
tools: Read, Grep, Edit, Write, Bash   # omit = inherit all; a tool left out isn't in its session at all
model: sonnet                          # sonnet/opus/haiku/fable/inherit
skills: [api-conventions, error-handling-patterns]  # * preloaded at startup
memory: project                        # user/project/local persistent memory
isolation: worktree                    # * give it its own git worktree
omitClaudeMd: true                     # skip CLAUDE.md files (saves tokens)
maxTurns: 10                           # output at the cap is marked partial; resumable
---
You are an API development specialist...

That skills: line kills the false dichotomy on its own: a subagent can run with skills loaded. It works the other way too — a skill whose frontmatter sets context: fork runs in an isolated context, and agent: picks which subagent type it forks into (see the official skills docs).

The first thing you can run: nothing to install

Claude Code ships three built-in subagents. Zero installs, available right now:

# (1) Explore -- read-only tools (Write/Edit denied), three thoroughness levels
Use the Explore subagent, very thorough, to map every place we validate JWTs

# (2) Plan -- the one that researches during plan mode, also read-only
# (3) general-purpose -- every tool available to subagents; can modify code

# After writing your own agent file, check its frontmatter before a session
claude plugin validate .claude/agents

# No file needed: a one-off JSON definition
claude --agents '{"code-reviewer":{"description":"Expert code reviewer.",
  "prompt":"You are a senior code reviewer.","tools":["Read","Grep","Glob"],"model":"sonnet"}}'

# Or run the whole session as that agent
claude --agent code-reviewer

What Explore takes off your plate is very concrete: the output of forty greps never enters your conversation. When not to use it: the answer is one line anyway ("which file holds this function"). Dispatching an agent to ask costs you a cold start plus a round trip, and the context you save isn't worth that.

Sources · Claude Code · Subagents and Claude Code · Skills, accessed 2026-09
// 02

Mechanism: one inheritance table explains nine tenths of "why does it know nothing"

Claim: there is exactly one pipe between a subagent and its parent — the prompt string of the Agent tool call. Whatever you didn't write into it, it does not know.
normal subagent fork (/subtask) skill ──────────────────────────────────────────────────────────────────────────────────── conversation history x none yes, in full yes, it's right here system prompt its own (the body) the parent's the parent's CLAUDE.md yes (unless omitted) yes yes tool pool a subset (smaller again in background) parent's, unfiltered the parent's skills already invoked x (unless in skills:) yes -- model subagent model order the parent's model: can override what reaches the thread final message only final message only the whole run

What that single pipe actually costs you

The SDK docs put it plainly: The only content you pass from parent to subagent is the Agent tool's prompt string, so include any file paths, error messages, or decisions the subagent needs directly in that prompt. That is the entire explanation for "but I just told it" — you told the main conversation, not the subagent.

The third state: forks, which don't belong in either column

/subtask <description> in an interactive session starts a fork: its own context window, but full inheritance of the parent's history, system prompt, output style, model, and the parent's exact tool pool (skipping the filter that trims tools from background subagents). A fork is the answer for "I need isolation but I cannot afford amnesia." The cost: it inherits every token of the parent, so the only noise isolation saves is what comes after.

A subagent's return value is untrusted data, not a command. Since v2.1.210, Claude Code scans a subagent's final message before the parent reads it: text imitating control tags such as <system-reminder> gets a backslash inserted, lines starting with Human: or Assistant: get one before the colon, and a matching report is prefixed with a [harness: ...] marker line. The docs are explicit about two limits: the scan doesn't judge maliciousness, and it isn't a substitute for restrictions — the real guardrails remain tools, disallowedTools and permissions. Letting a subagent read external pages and then treating its report as instructions is a ready-made injection chain.

Why a skill travels the other road

A skill's mechanism is instruction injection: the description sits in context permanently (cheap), the body expands only when invoked, and once expanded it stays in the thread across turns. So skills fit "a rule every following step must honor," subagents fit "this stretch I don't want to watch." disable-model-invocation: true makes a skill user-only; user-invocable: false makes it model-only. Those two fields together are a skill's real invocation contract.

// 03

Real usage and limits: five installable or readable entries, with commands

Claim: nobody gets real value out of "dispatch an agent." They get it from replacing every station of a pipeline with a fresh context — and that has already been written down as a skill, so you don't have to invent it.

(1) obra/superpowers · subagent-driven-development

# one command from the official marketplace
/plugin install superpowers@claude-plugins-official

This skill has a one-line description: Use when executing implementation plans with independent tasks in the current session. It opens an isolated git worktree, verifies the plan, scans for conflicts and creates a ledger; then per task it runs dispatch implementer → handle report → task-specific review → fix loop, up to five rounds, with rounds 1–3 resuming the original implementer and rounds 4–5 escalating to a more capable model; finally a whole-branch review on the most capable model. What it takes off your plate: by task seven of a long plan, the noise from tasks one through six has already filled the window. When not to use it — it says so itself: no implementation plan exists, the tasks are tightly coupled rather than independent, or your platform has no subagents at all (then run inline).

(2) Same repo · dispatching-parallel-agents

Its trigger reads 2+ independent tasks that can be worked on without shared state or sequential dependencies, while the body sets a higher bar: three or more distinct root causes before parallelism pays. The line worth memorizing is the mechanism: Multiple dispatch calls in one response = parallel execution. One per response = sequential. Parallelism is not a switch — it is how many calls you put in one reply. When not to: the failures are related (fixing one may fix the others), understanding requires full system context, agents would interfere with each other's edits, or the root cause is unknown and you're still exploring. It also has a line worth taping to a wall: Do NOT just increase timeouts—find the real issue.

(3) isolation: worktree: the only sane way to write files in parallel

It is no accident that both skills above start by opening a worktree: several subagents editing one working tree are overwriting each other. One frontmatter line, isolation: worktree, gives an agent its own; superpowers also ships a dedicated using-git-worktrees skill for that path. When not to: read-only work (anything Explore-shaped) — a worktree is pure IO there.

(4) wshobson/agents: an off-the-shelf agent library

/plugin marketplace add wshobson/agents
/plugin install python-development

Self-described as 94 plugins, 202 agents, 183 skills, 105 commands (per that repo's README, read 2026-09; MIT), generating harness-native artifacts from one markdown source. The real value is reading how other people write descriptions — whether a subagent ever gets dispatched automatically depends entirely on that field. When not to install: taking the whole marketplace means paying a description tax (see the 15,000-token warning in 04); install only the plugin you actually use.

(5) The Agent SDK: writing all this into code

In the SDK, subagents are the agents parameter of query(), and AgentDefinition maps almost field for field onto the file version (description and prompt required; tools, disallowedTools, model, skills, maxTurns, background, effort optional). Two traps: in the Python SDK, disallowedTools and mcpServers keep their camelCase spelling; and to detect a real dispatch you must match both "Agent" and the older name "Task". Past a certain scale subagents are the wrong tool — the docs point at the Workflow tool and dynamic workflows, which move orchestration into a script outside the conversation. When not to reach for Workflow: two or three agents in a turn, where plain subagents are enough.

Three criteria, to choose between the entries above

  1. Do you still need to watch the middle? Following it step by step → skill (it stays in the thread). Only the conclusion → subagent. This settles eighty percent of the cases.
  2. Does it need what you said earlier? Needs the whole history → a fork via /subtask. Needs a few paths and one stack trace → a normal subagent, with those written into the prompt string.
  3. Is it genuinely independent? Three or more distinct root causes, no shared state, no overlapping files → dispatch in parallel. Otherwise go sequential, or let one agent finish it.
// 04

Cost and alternatives: 15x tokens, and a new problem called "the stronger it gets, the more it delegates"

Claim: the subagent bill is not "a bit more," it is multiplication. And as of Opus 5 the default leans toward delegating, so the brakes are yours to set.

The hardest number in this piece

In How we built our multi-agent research system (2025-06-13) Anthropic gives three figures: agents use about 4x the tokens of chat, and multi-agent systems about 15x; on their internal research eval the multi-agent system beat single-agent Claude Opus 4 by 90.2%; and token usage alone explains 80% of the variance in browsing ability. The same piece lists where it does not fit: tasks where all agents need the same context, domains with many inter-agent dependencies, and most coding tasks — their wording is that coding has fewer parallelizable components than research. Read the three together: 15x for 90.2% is worth it or not depending on whether your task looks like research or like editing code.

The extra line item Opus 5 adds

Prompting Claude Opus 5 says it outright: Claude Opus 5 delegates to subagents more readily than prior models. The official remedy comes in two layers — a prompt layer and a hard cap:

# (1) the prompt layer (official example, copy it verbatim)
Delegate to a subagent only for large tasks that are genuinely independent and
parallelizable, such as a wide multi-file investigation. Do not delegate work you
can finish yourself in a handful of tool calls, and do not use subagents to verify
or double-check your own work. If one subagent can complete the task, use one
rather than several, and keep spawn counts low.

# (2) the hard caps (env in .claude/settings.json; defaults: depth 3 / 20 concurrent)
"env": { "CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH": "1",
         "CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS": "5" }
# The SDK adds a third: maxBudgetUsd / max_budget_usd -> error_max_budget_usd at the cap

The same document has a counterintuitive instruction: Opus 5 verifies its own work unprompted, so old lines like "use a subagent to double-check" should be removed — keeping them only causes over-verification and burns tokens. Note those two environment variables need Claude Code 2.1.217 or later.

Three costs that are easy to miss

What to do instead of a subagent

  1. Write a skill. If you want "a rule every step honors" rather than "this stretch I don't want to see" — cheaper, and you can watch it work.
  2. Use a fork. /subtask when you need isolation without amnesia; the cost is inheriting every parent token.
  3. Pin it as a hook. Don't dispatch an agent to do something deterministic (Skill 27 covers this).
  4. Move up to Workflow. Orchestrating dozens of agents belongs in a script, not in a conversation.
  5. Just do it yourself. That is the second sentence of the official delegation instruction: don't delegate what a handful of tool calls would finish.
The honest cost, last: isolation cuts both ways. The subagent cannot see your conversation, and you cannot see its process — if it read the wrong file, skipped the tests, or got steered by a page it fetched, what you receive is a summary that reads perfectly well. The other name for context isolation is audit blind spot. Which is why narrowing tools, isolating with a worktree, and reading the report as data are a set, not a menu.

// THE ONE-PAGE BUYING CARD

Read these three first: (1) Claude Code · Subagents — the full field table, the three built-ins, the fork section, and the two tool filters; half of this issue comes from it. (2) superpowers · subagent-driven-development — what a real subagent pipeline looks like, down to the five-round fix cap and the model escalation. (3) Anthropic on their multi-agent research system (2025-06) — 15x tokens, 90.2%, and "most coding tasks" on the unsuitable list.

Then as needed: dispatching-parallel-agents (several dispatches in one reply = parallel; four conditions that forbid it) · Agent SDK · Subagents (every AgentDefinition field, the depth/concurrency/budget caps, how to resume) · Claude Code · Skills (context: fork plus agent:, isolating a skill in place) · Prompting Claude Opus 5 (the delegation snippet; delete legacy "verify with a subagent" lines) · wshobson/agents (an off-the-shelf library, worth reading for description style) · Dynamic workflows (once the scale outgrows subagents).

Explicitly don't: dispatch a subagent to fetch a one-line answer · expect it to remember what you just said (paths and errors go in the prompt) · let several subagents write to one working tree · execute a subagent's report as instructions · leave legacy "double-check with a subagent" lines in an Opus 5 prompt · turn it loose with no depth, concurrency or budget cap.

// GLOSSARY

subagent
A separate Claude instance with its own context window and system prompt that returns only its final message to the parent. Defined in .claude/agents/*.md or the SDK's agents parameter.
context isolation
The one benefit of the four that nothing else provides: intermediate tool calls and results stay on the subagent's side and the parent gets a summary. Its flip side is the audit blind spot.
fork (/subtask)
A special kind of subagent: its own context window, but full inheritance of the parent's history, system prompt, output style, model and unfiltered tool pool. For isolation without amnesia.
instruction injection (the skill mechanism)
Invoking a skill expands its body into the current conversation, where it stays in force across turns. A different road from opening a new context.
skills: preloading
A subagent frontmatter field that loads named skills into its context at startup. Proof that the two are not an either/or.
coordination tax
Everything someone must still do after dispatching: splitting tasks, writing the prompt, collecting reports, checking conflicts, capping fix rounds, the final review.
subagent output scanning
Since v2.1.210, a pass over a subagent's report before the parent reads it: backslashes into text imitating control tags or turn markers, plus a [harness: ...] line when matched. It doesn't judge maliciousness and doesn't replace tools or permission limits.

// THREE THINGS THAT DON'T QUITE RESOLVE

If a subagent can preload skills and a skill can set context: fork, is there any difference left between the two concepts?
Yes — the difference is which one is the default. A skill defaults to staying in the thread; a subagent defaults to opening a fresh context. The optional fields only let each borrow one step from the other. What remains non-interchangeable is what comes back to the main thread: with a skill you see the whole run, with a subagent you get one final message. So the question was never which is stronger, it is whether you need to watch.
15x tokens for a 90.2% improvement sounds like a bargain. Why do the same authors say most coding tasks don't fit?
Because that 90.2% was measured on a research eval. Research is breadth-first by nature: ten independent directions, ten searchers, and the union is the answer. Coding isn't — changing one interface touches three callers, the genuinely parallel fraction is far smaller than it looks, and several agents editing at once overwrite each other (which is exactly why both real pipeline skills start by opening a worktree). The same article lists "many inter-agent dependencies" as disqualifying, and coding is that case.
Stronger models delegate more eagerly. Bug or feature?
Probably both. The Opus 5 guide says in one breath that it coordinates teams of subagents well with few cases of agents overwriting each other, and in the next that it delegates more readily and that you should cap delegation — capability and appetite rose together, while cost multiplies per agent. The telling detail is the instruction to delete old "use a subagent to verify" lines: a gap that an extra agent used to paper over is now closed in the model, but the workaround is still sitting in countless prompts. So every model swap deserves a check not just of whether a prompt is correct, but of which defect it was written to route around.

// FURTHER READING