AI agents

Depth vs Breadth: Splitting a Delegation Budget

Antonio Evans8 min read

A simple diagram: a fixed stack of 20 coin-like tokens labeled "calls" on the left.
Key points

Key points

  1. 1A delegation budget is a count of subagent invocations, not tokens, and every spawn (including retries and verification passes) draws from the same pool.
  2. 2Reserve 20 percent of the budget for retries and verification before you choose any depth or breadth split, because a chain with no slack fails completely when one step fails.
  3. 3Spend on breadth when subtasks are independent, since parallel workers each produce a leaf result, while depth produces one result no matter how many steps it takes.
  4. 4Cap chain length so that a single failure costs a fraction of the budget, and cap width so that returned summaries do not flood the parent's context.

What a delegation budget actually measures

Teams usually plan agent work in dollars or tokens, then discover the bill has no relation to the plan. The reason is that cost compounds through orchestration overhead rather than through model pricing: Anthropic's multi-agent research system uses roughly 15 times as many tokens as chat interactions, and token usage alone explains about 80 percent of performance variance on BrowseComp according to a cost analysis of multi-agent systems. That makes tokens a poor planning unit for delegation, because the same call can cost wildly different amounts.

A cleaner unit is the subagent invocation. One call to the Agent tool equals one unit. It does not matter whether that child reads two files or forty; what you are budgeting is the number of context windows you open, each of which receives a briefing, does work, and returns a summary. This framing matches how the harness itself thinks. Claude Code tracks per-session totals (default 200 subagent invocations since v2.1.212), concurrency (default 20 since v2.1.217) and spawn depth (default 3 since v2.1.219), each with its own environment variable, per a roundup of the subagent guardrails. Three independent limits, one resource.

Once you accept the invocation as the unit, the planning question changes from "how much will this cost" to "how do I split N calls between going deeper and going wider." Those are genuinely different shapes with different economics.

Depth means a chain: the parent delegates to a child, which delegates to a grandchild, which delegates again. Each level starts from a fresh context window and receives only the delegation prompt, plus its own system prompt and whatever memory and skill content the harness appends, as an orchestration guide on subagent mechanics describes. The parent reads only the leaf's summary. Everything between the parent and the leaf costs calls and disappears.

Breadth means fan-out: the parent dispatches k siblings at once, each independent, each returning a result. One call per leaf, no intermediate hops.

The whole allocation problem follows from that asymmetry. A chain of depth d costs d calls and yields one leaf result. A fan-out of width k costs k calls and yields k leaf results. If the work allows it, breadth is roughly k times more productive per call. Depth buys something else: it lets each level compress before handing up, which keeps noisy intermediate work out of the parent's window.

The cost model: how many calls each shape consumes

Write the budget as B. Before any splitting, subtract a reserve R for retries and verification. A workable default is 20 percent, so R = 0.2B and the allocatable pool is A = 0.8B. The reserve exists because agents fail multi-step tasks often: in simulation testing they fail nearly 70 percent of the time on multi-step office work, per an enterprise playbook on human-in-the-loop agents. You do not need to believe that number generalizes to your task to accept the implication: a plan with zero slack is a plan that has to succeed on the first try, every step.

Inside the allocatable pool, let d be chain depth and k be fan-out width at the deepest point. A pure chain of depth d costs d calls and produces 1 result. A pure fan-out of width k costs k calls and produces k results. A tree that branches b ways per level for L levels costs (b^(L+1) - 1) / (b - 1) calls, which grows geometrically and is the reason unbounded recursion burns budgets so fast. A real bug report describes exactly this: one delegation for "research Venmo integration options" spawned 48 or more background agents, most of them redundant, consuming over 1.5 million tokens, with the useful research done within the first three or four agents, as recorded in the Claude Code issue tracker.

Here is the same constraint set expressed as the arithmetic you can actually do before a run:

B = total subagent calls allowed
R = 0.2 * B          # reserve for retries and verification
A = B - R            # allocatable

pure chain:    cost = d,            results = 1
pure fan-out:  cost = k,            results = k
one branch:    cost = 1 + k,        results = k   (parent plans, k leaves execute)
b-ary tree:    cost = (b^(L+1)-1)/(b-1), results = b^L

constraint:    cost <= A
guardrail:     d <= min(depth_cap, A / 4)   # no single chain eats more than a quarter

That last line is the decision rule most teams miss. The maximum depth that fits is not the interesting number. The interesting number is the maximum depth you should allow, which is smaller, because a chain that consumes the whole allocatable pool turns one bad step into a total loss.

Worked example: two allocations of the same budget

Take B = 100 calls. Reserve 20 for retries and verification. Allocatable pool A = 80.

Strategy 1, depth-heavy. A single research chain of depth 8, with each level asking one question and handing its notes up. Cost: 8 calls. It produces 1 leaf result. You could run ten such chains (80 calls) and get 10 results, or run one chain with retries and spend 8 calls plus up to 72 on re-running failed steps. The problem is that if step 5 of a chain fails, everything above it is wasted, and the retry has to resume from step 5 with a fresh briefing, not the original context.

Strategy 2, breadth-heavy. A parent that plans once, then dispatches 8 workers, each of which can itself spawn up to 9 children before returning. Cost: 1 parent + 8 workers + 71 grandchildren is impossible under an 80-call pool, so the honest arithmetic is 1 + 8 + 71 = 80, which yields 71 leaf results at the deepest tier. Compare that with the depth strategy's 10 results. Breadth wins by more than 7 to 1 whenever the subtasks are independent.

Depth-heavyBreadth-heavy
ShapeChain of 8, repeated1 planner, 8 workers, 71 leaves
Calls used8080
Leaf results10 to 80 depending on retries71
Failure blast radiusEntire chain above the failed stepOne worker's subtree
Context cost at parent10 summaries8 worker summaries
Best whenSteps depend on prior stepsSubtasks are independent

The 7-to-1 gap is the insight the first search result will not hand you. But read the last two rows before you go build a fan-out: the failure blast radius and the context cost pull in opposite directions from raw throughput.

The decision rule for picking a split

Ask one question first: does step n+1 need the output of step n?

If no, the work is a list, and you should spend almost everything on breadth. The guidance in a comparison of subagent patterns is blunt about this: five steps that depend on each other belong in a single subagent with a raised turn limit, not in five nested calls, and nesting earns its keep mainly when the work is recursive in shape, per an analysis of nested subagent economics. A list wants width.

If yes, the work is a pipeline, and you spend on depth, but with two caps. Cap chain length at a quarter of the allocatable pool so no single failure is fatal. Cap the summary size each level returns, because returns add back to the parent's context window and running many subagents that each return detailed results re-floods the context you were trying to protect, as a distribution-versus-escalation guide notes.

A useful stop rule before you nest at all: write the summary you expect the leaf to return. If it is tiny, or the parent could have produced it with two tool calls, do not delegate, because you are paying a full subagent system prompt for very little.

There is a third shape worth naming, because it confuses people budgeting by depth. Some work is really a tree, not a list or a pipeline: exploring a monorepo where each package needs its own scoped sweep, or a review that needs security, performance and style specialists asked the same question. Trees pay for themselves because the leaf summaries roll up. But tree cost grows geometrically, so compute the call count before you run it, not after. The 48-agent incident is what happens when nobody does that arithmetic.

Spend the reserve deliberately

The 20 percent reserve is not lost capacity. It funds three things a plan without slack cannot do.

Verification passes. A verifier subagent that reads a leaf's output and checks it against the original brief costs one call per checked leaf. On a 71-leaf fan-out, checking every leaf would cost 71 calls, which is why you check a sample or check only the leaves with the riskiest claims. Budget the check before the run, or you will skip it under pressure.

Retries. A failed leaf is cheap to retry, one call. A failed chain step is expensive: the retry needs a re-briefing that reconstructs whatever the broken step was supposed to produce. This asymmetry is another reason to prefer breadth when the work allows it.

Human approval gates. If a leaf's output triggers a side effect, the approval is part of the control envelope, not a side conversation, and it should link to the same trace ID as the action it authorizes, per guidance on agent audit trails. Gates cost a call and some wall-clock time, and they belong in the plan rather than in an emergency.

Keep the tree observable while it burns calls

A budget you cannot see being spent is not a budget. Distributed tracing is the mechanism: the W3C Trace Context specification defines the standard headers and value format for propagating context between services, which is what lets a downstream span attach to an upstream trace instead of starting a new one, as the specification sets out. OpenTelemetry builds on it, and its default propagator uses exactly those headers, per its context propagation documentation.

Agent delegation tends to break this. When an agent framework runs its tool loops internally, you see one top-level span for the whole agent execution and nothing about what happened inside, and the practical result is that one logical operation produces three to ten orphaned root spans with no way to join them, as an analysis of tracing across agent service boundaries documents. A delegation budget is only enforceable if each spawn shows up as a span with a parent, so that you can count calls per subtree in real time.

There is no finalized standard for this yet. A proposal for distributed tracing semantic conventions for A2A describes the failure directly: when one agent delegates to another, the trace breaks, because the SDK has no standard way to propagate the context and each delegation starts a fresh, disconnected trace. Until conventions settle, the practical advice is to propagate the trace context yourself through whatever carrier your delegation prompt uses, and to tag each spawn with the parent agent identity. The plumbing already exists in some harnesses: Claude Code added agent identity and parent identity headers to API requests, plus matching OpenTelemetry span attributes, before nested spawning was turned on, per the nested subagent guide.

Once spawns are traced, the budget is a query. Count spans by subtree, compare against the reserve, and stop spawning when the pool runs dry.

When to hand the budget to someone with a bigger picture

The hardest part of the split is not arithmetic. It is judgment about whether your subtasks are genuinely independent, how much a failed chain step would cost you, and which leaves deserve a verification pass. Those are architecture decisions, and they benefit from someone who has run the pattern before. A consulting engagement with Quanta Intelligence can pair you with an expert who reads your actual workflow and helps you size the split before you ship it.

If you are still choosing models for the leaves and the parent, worth remembering that orchestration and model choice both drive cost independent of call count; Quanta Inference gives you text, image, video, audio and embedding models through one OpenAI-compatible API key, which keeps the per-call accounting in one place when you are comparing allocation strategies.

FAQ

FAQ

Does a retry count as a new subagent call?

Yes, and you should budget it that way. A retried leaf costs one call; a retried chain step costs one call plus the cost of reconstructing the failed step's context, which is why the reserve should be sized before the run rather than drawn down as failures appear.

What is a reasonable default reserve for retries and verification?

Twenty percent is a workable starting point for most workflows. Raise it when leaves trigger side effects that need approval gates, and lower it only when you have measured failure rates on the specific task and know the tail is short.

If breadth gives more results per call, why nest at all?

Because nesting compresses. When a leaf does noisy work (long searches, log greps, wide codebase scans) and returns only a distilled verdict, the parent's context stays lean, and the whole point of pushing work down is to keep the decisions happening in a high-signal window. Nest only when the leaf does meaningful work and returns a meaningfully compressed answer.

How do I stop a fan-out from running away?

Set three limits independently: a spawn depth cap, a concurrency cap, and a per-session total. The three are separately configurable in Claude Code, and a documented incident shows what happens without them, where a single delegation produced 48 or more background agents and over 1.5 million tokens of mostly redundant work.

How do I know the split I chose is working?

Instrument each spawn as a traced child of its dispatching call, then count calls per subtree against the reserve. If a subtree exhausts more than its share before returning anything useful, the split was wrong and the shape of the work was probably a list where you built a tree, or the reverse.

Sources

Sources

  1. Multi-Agent Cost Compounding: Why 3 Agents Cost 10x
  2. Claude Code Put Guardrails on Its Own Agent Fleets
  3. Claude Code Subagents and Multi-Agent Orchestration ...
  4. Human-in-the-Loop AI Agents: Deploying Agentic AI With Control
  5. General-purpose sub-agents recursively spawn ...
  6. Claude Code Nested Sub-Agents: 5 Levels Deep, Token ...
  7. Distribution vs Escalation: When to Use Subagents or ...
  8. AI Agent Audit Trail: Proving What an Agent Did and Why
  9. Trace Context - W3C
  10. Context propagation - OpenTelemetry
  11. Distributed Tracing Across Agent Service Boundaries - TianPan.co
  12. Proposal: Distributed Tracing Semantic Conventions for A2A #2103
  13. Claude Code Nested Subagents: 5 Levels Deep
About the author

About the author

Antonio Evans
Antonio Evans

Antonio Evans is the founder of Quanta Intelligence and a fractional CTO who builds HIPAA-ready AI systems for health and life-science companies. Before that he was technical co-founder of FriendsEAT for twenty years, CEO of Socialdraft, and a data engineer at IBM. Antonio lives with his dog Santino in Lisbon, Portugal.

All articles