When Does a Subagent Pay for Itself?

Handing a subtask to a subagent keeps tool output out of the parent's context, but the subagent starts with a cold cache. We modeled one subtask three ways at Anthropic list prices. A 12-step subtask costs $0.72 inline, $0.57 in a same-model subagent and $0.15 in a Haiku 5.5 subagent, while a two-step lookup costs 3.6x more when delegated on the same model. Four seaborn charts, a seven-step guide, and the Python model. Illustrative, not measured traffic.

Published 2026-11-16 by Dor Amir on the Nadir blog.

Filed under Agents.

Delegating a subtask saves money only when the tokens it keeps out of the parent's context are worth more than the cost of starting a second agent.

Abstract.

Agent frameworks now make it a one-line change to hand a subtask to a subagent, and vendor docs recommend it as a cost control. We ask when that is true. We model one subtask run three ways: inline on the parent, in a subagent on the same model, and in a subagent on a small model, at Anthropic list prices. On a 12-step subtask the inline run costs $0.72, and 59% of that is not the subtask's own work. A same-model subagent costs $0.57 and a Haiku 5.5 subagent $0.15. On a two-step lookup the order flips: the same-model subagent costs 3.6x inline. Delegation has a break-even, set by subtask size, turns left in the session, and startup tokens. Route on it, and route the child's model separately.

All figures come from our own illustrative model. It is not measured production traffic, and nothing here comes from Nadir customer data.

Introduction.

Most of an agent's bill is rereading. Every tool result stays in context and is billed again, at the cache-read rate, on every later turn. We covered that in Mostly Rereading.

Subagents are the standard answer. Claude Code's cost docs say to delegate verbose operations "so the verbose output stays in the subagent's context while only a summary returns to your main conversation." Anthropic's context engineering post describes subagents that spend tens of thousands of tokens exploring and return a summary of "often 1,000-2,000 tokens."

The same docs carry the warning: "The subagent's own requests still draw on your usage." A subagent starts cold. Paul Irolla read the transcripts of 19 subagents in one Opus session and found each wrote between 12,427 and 40,763 tokens to cache on its first request, with zero cache reads. That is one session on one machine, but the mechanism is general: a fresh system prompt can't reuse the parent's cache. At the fleet level, multi-agent systems run about 15x the tokens of chat.

So delegation removes one cost and adds another. Which one is bigger?

Research question.

For a given subtask, when does running it in a subagent cost less than running it inline, and how much of the saving comes from isolating context versus from using a cheaper model?

Methodology.

A parent agent on Claude Opus 5.5 holds 80,000 tokens of cached context and has 30 turns left. It needs a subtask of k tool steps. Each step returns 3,000 tokens of tool output and costs 250 output tokens.

StrategyWhat gets billed
InlineThe parent rereads its 80K context on each of the k steps, pays for the steps, then carries all the tool output for the remaining turns
Same-model subagentThe parent pays two turns, a 400-token brief, and a 1,500-token summary. A fresh Opus child writes a 25,000-token startup prefix, then runs the steps
Small-model subagentThe same, on Haiku 5.5. We assume it takes 1.3x the steps and fails 10% of the time, and each failure is caught and redone inline

Prices are Anthropic list, retrieved November 16, 2026: Opus 5.5 at $5 cache write, $0.20 cache read, and $20 output per million tokens. Haiku 5.5 at $0.125, $0.01, and $0.50, rising 5x once a prompt passes 100,000 tokens. The 25,000-token startup sits inside Irolla's observed range. The step multiplier and failure rate are assumptions, not measurements.

Results.

Stacked bar chart of USD for one 12-step subtask. Inline on the parent costs $0.72, split between the parent rereading its context, the subtask steps, and residue carried forward. A same-model subagent costs $0.57, mostly subtask steps plus subagent startup. A small-model subagent costs $0.15, about half of it the expected redo after failure.
Stacked bar chart of USD for one 12-step subtask. Inline on the parent costs $0.72, split between the parent rereading its context, the subtask steps, and residue carried forward. A same-model subagent costs $0.57, mostly subtask steps plus subagent startup. A small-model subagent costs $0.15, about half of it the expected redo after failure.

Most of the inline cost is overhead. Of the $0.72, the steps themselves are $0.30. The parent rereading its own 80K context twelve times is $0.19, and carrying 39,000 tokens of residue for 30 more turns is $0.23.

The same-model subagent saves 21%, and startup takes most of what isolation earned. It removes nearly all the rereading and residue, then spends $0.13 on a cold start and more on rereading its own prefix.

The small model does most of the work. The Haiku child lands at $0.15, 79% under inline, and $0.07 of that is the redo budget. Isolation alone was worth 21 points. The model choice was worth the rest.

Line chart of USD per subtask against tool steps from 1 to 24. Inline rises steeply from $0.06 to $1.54. The same-model subagent starts at $0.24 and crosses below inline near 7 steps. The small-model subagent stays lowest from 2 steps on and bends upward near 19 steps where Haiku 5.5 crosses its 100K price cliff.
Line chart of USD per subtask against tool steps from 1 to 24. Inline rises steeply from $0.06 to $1.54. The same-model subagent starts at $0.24 and crosses below inline near 7 steps. The small-model subagent stays lowest from 2 steps on and bends upward near 19 steps where Haiku 5.5 crosses its 100K price cliff.

Small subtasks lose. For a two-step lookup returning 1,000 tokens a step, inline costs $0.070, the same-model subagent $0.249, and the Haiku subagent $0.073. The same-model subagent breaks even near 7 steps. The Haiku line bends at about 19 steps, where the child's own context passes Haiku 5.5's 100K price cliff.

Heatmap of the saving from same-model delegation versus inline, in percent, by tool steps in the subtask and turns left in the parent session. Two-step subtasks lose 83 to 243 percent in every row. Twelve-step subtasks range from minus 15 percent with no turns left to plus 39 percent with 60 turns left.
Heatmap of the saving from same-model delegation versus inline, in percent, by tool steps in the subtask and turns left in the parent session. Two-step subtasks lose 83 to 243 percent in every row. Twelve-step subtasks range from minus 15 percent with no turns left to plus 39 percent with 60 turns left.

Session position matters as much as size. The residue saving scales with turns left. The same 12-step subtask saves 39% with 60 turns left, breaks even at 10, and loses 15% as the last thing a session does.

Bar chart of wall-clock seconds for four independent 12-step subtasks. Inline sequential takes 296 seconds and $2.90. Small-model subagents one at a time take 233 seconds and $0.61. Small-model subagents in parallel take 82 seconds and the same $0.61.
Bar chart of wall-clock seconds for four independent 12-step subtasks. Inline sequential takes 296 seconds and $2.90. Small-model subagents one at a time take 233 seconds and $0.61. Small-model subagents in parallel take 82 seconds and the same $0.61.

Parallelism buys time, not tokens. Under assumed speeds, four subtasks take 296 seconds inline and 82 seconds as parallel Haiku subagents. The parallel and one-at-a-time delegated runs cost the same $0.61.

Discussion.

Delegation is two decisions. Whether to isolate depends on subtask size and session position. Which model runs the child depends on difficulty. Frameworks tend to bundle them, and a subagent that inherits the session's model gets isolation at the highest price.

Startup is yours to shrink. Moving the startup prefix from 12,400 to 40,800 tokens, the two ends of Irolla's range, moves the same-model run from $0.48 to $0.69. Instruction files, tool definitions, and long briefs all sit in that prefix.

A small model is cheap until its failures go unseen. With every failure caught, the Haiku child could fail 89% of the time on the 12-step subtask and still tie inline, or 41% on a two-step one. The catch is the hard part. An uncaught wrong summary enters the parent's context and costs more than tokens. See The Retry Tax.

Parallel fan-out can raise the bill. It costs the same per subtask, but it makes spawning easy, and each spawn below break-even loses money. Parallel tool calls show the same pattern.

Implementation guide.

  1. Instrument by stage. Log tokens per parent turn and per subagent, split into cache write, cache read, and output. Subagent usage often lives in separate transcripts.
  2. Separate work from carrying. For each subtask, record tool-output tokens and how many turns followed. That product is the residue you could have avoided.
  3. Measure your startup tokens. Read the first request of a fresh subagent. Trim what loads into it.
  4. Set a size threshold. Delegate when expected tool output times turns left clearly exceeds startup. Keep one-or-two-call lookups inline.
  5. Route the child's model by difficulty. Searches, log reads, and test runs rarely need the parent's model. Keep the child's context under any price cliff.
  6. Check the summary before trusting it. A cited file path, a test result, or a schema check is cheap. Escalate or redo on failure.
  7. Track cost, latency, and success together. A cheaper run that fails more is not cheaper.

The model, in code.

P = {"opus": (5.0, 0.20, 20.0), "haiku": (0.125, 0.01, 0.50)}  # $/M: cache write, cache read, output

def loop(m, base, k, tool, out=250):
    w, r, o = P[m]; step = tool + out
    return sum(((base + i*step)*r + step*w + out*o) / 1e6 for i in range(round(k)))

def inline(k, tool, C0=80_000, R=30):
    return loop("opus", C0, k, tool) + R*k*(tool + 250)*P["opus"][1]/1e6

def delegated(k, tool, child, C0=80_000, R=30, S=25_000, brief=400, summary=1_500, mult=1.0, fail=0.0):
    w, r, o = P["opus"]; cw, cr, co = P[child]
    parent = (2*C0*r + brief*o + (brief + summary)*w + R*(brief + summary)*r) / 1e6
    kid = S*cw/1e6 + loop(child, S, k*mult, tool) + summary*co/1e6
    return parent + kid + fail*inline(k, tool, C0, R)

for k, tool in [(12, 3_000), (2, 1_000)]:
    print(k, round(inline(k, tool), 3), round(delegated(k, tool, "opus"), 3),
          round(delegated(k, tool, "haiku", mult=1.3, fail=0.10), 3))

This prints about 0.724, 0.574, and 0.154 for the 12-step subtask, and 0.070, 0.249, and 0.073 for the lookup. It leaves out the Haiku 100K cliff, which the charts include. Replace every default with numbers from your own logs.

Where Nadir fits.

The second decision, which model runs a step, is the one a routing layer is built to make. Instead of treating every subagent call as an Opus-level problem, classify the step and route it. Nadir's gateway takes model="auto" and picks a model per request by classifying the task. Its observe mode records what it would have routed without changing anything, so you can see how much of your subagent traffic is simple before you move any of it. For coding agents, Nadir Lens shows spend by team and member, cache economics, and agent loops.

We don't publish a savings rate, and nothing in this post forecasts yours.

Limitations.

Conclusion.

A subagent is a trade: startup tokens now for rereading avoided later. It pays on large subtasks early in long sessions and loses on small ones near the end. The larger saving in our model came from running the child on a model sized for the job. The future of LLM cost optimization is not just cheaper models. It is better orchestration, better routing, better retrieval discipline, and better measurement.

Run the model above on your own numbers. Then get a free key and benchmark your own workflow in observe mode, or estimate savings from your current spend.


Sources: [Claude Code Docs, "Manage costs effectively"](https://code.claude.com/docs/en/costs), retrieved November 16, 2026. [Anthropic, "Effective context engineering for AI agents," September 29, 2025](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents). [Paul Irolla, "Claude Code Subagents Token Usage: What They Really Cost," DEV Community, October 25, 2026](https://dev.to/paul_irolla_6b5ae261d0224/claude-code-subagents-token-usage-what-they-really-cost-fp0). [Claude API Docs, Pricing](https://platform.claude.com/docs/en/about-claude/pricing), retrieved November 16, 2026: Claude Opus 5.5 $4 input, $5 five-minute cache write, $0.20 cache read, and $20 output per million tokens. Claude Haiku 5.5 $0.10, $0.125, $0.01, and $0.50 for prompts up to 100,000 tokens, and 5x those rates above. Charts were generated with Python and seaborn from the illustrative model above.

More on agents

Pages on this site

Machine-readable summaries of this site: llms.txt and llms-full.txt.