Claude Code v2.1.172 lets sub-agents spawn sub-agents, up to 5 levels deep
Claude Code v2.1.172, released June 10, lifts a long-standing restriction and allows sub-agents to spawn their own sub-agents, nesting up to five levels deep with a hard server-side cap.
Score breakdown
The change replaces a hard architectural ceiling with a five-level nesting model, enabling noisy leaf tasks to be isolated in their own context frames so parent agents receive only summaries — but at the cost of token consumption that compounds rapidly and can produce large unexpected bills without spend limits in place.
- 01Claude Code v2.1.172, released June 10, allows sub-agents to spawn sub-agents for the first time in two years.
- 02Nesting is capped at five levels deep, enforced server-side with no setting to raise or lower it.
- 03Boris Cherny, who leads Claude Code at Anthropic, described the motivation as 'agents kicking off agents as a way to better manage context.'
Claude Code v2.1.172, released June 10, ends a two-year rule that barred sub-agents from launching their own sub-agents. The change is a single changelog line, but it fundamentally alters how agentic workflows can be structured. The five-level nesting limit is hard-enforced server-side with no configuration to raise or lower it. Boris Cherny, who leads Claude Code at Anthropic, framed the motivation as context management: noisy leaf tasks — log reads, grep operations, file scans — can now be isolated in their own context frames, returning only a summary to the parent rather than flooding it with raw tokens.
Each nested frame carries its own system prompt, model selection, and 200K token context window.
Each nested frame carries its own system prompt, model selection, and 200K token context window. The article recommends a tiered model strategy: Opus at the orchestration layer, Sonnet for mid-level work, and Haiku for leaf tasks, citing a cost difference of roughly $0.98 per session with tiering versus $2.02 for uniform Opus. Sub-agent definitions live in `.claude/agents/*.md` at the project level or `~/.claude/agents/*.md` for user scope, and the new `Agent()` field in the tools list acts as an allowlist controlling which sub-agent types a given agent is permitted to spawn.
The article flags serious cost risks: nesting multiplies token consumption at roughly 7× per branch per level, compounding quickly. One community report described hitting 887,000 tokens per minute, and a financial services team reportedly received a $47,000 invoice after running a "simple" code quality project with 23 sub-agents. The article also warns of circular spawning — where agents recursively delegate to one another within the five-level cap — as a pitfall the depth limit alone does not prevent. The source text is truncated before the full list of pitfalls is complete.
Key facts
- 01Claude Code v2.1.172, released June 10, allows sub-agents to spawn sub-agents for the first time in two years.
- 02Nesting is capped at five levels deep, enforced server-side with no setting to raise or lower it.
- 03Boris Cherny, who leads Claude Code at Anthropic, described the motivation as 'agents kicking off agents as a way to better manage context.'
- 04Each nested agent frame has its own system prompt, model selection, and 200K token context window.
- 05Token consumption multiplies at roughly 7× per branch per level, compounding quickly with depth.
- 06A financial services team reportedly received a $47,000 invoice after running a code quality project with 23 sub-agents.
- 07The new `Agent()` field in sub-agent tool definitions acts as an allowlist for which sub-agent types an agent can spawn.
Topics
Summary and scoring are generated automatically from the original article. We always link back to the publisher and never republish images or paywalled content. Last processed Jun 14, 2026 · 09:08 UTC. How this works →