Claude Code Sub-Agents Can Now Spawn Their Own Sub-Agents: Five-Level Nesting Changes Your Model Routing and Cost Architecture
Anthropic's June 10 Claude Code release unlocks five-level sub-agent nesting. Here's what that means for model routing, cost architecture, and governance in agentic coding workflows.

Anthropic shipped a significant architectural change to Claude Code on June 10: sub-agents can now spawn their own sub-agents, up to five levels deep. This is not a cosmetic quality-of-life tweak. It turns Claude Code's agent runtime into a hierarchical delegation engine — and that hierarchy creates a natural model-tier routing surface that every AI engineering team should understand.
What happened
The June 10 release introduces recursive sub-agent spawning with a five-level depth cap. A parent agent can dispatch a sub-task to a child agent, which can in turn dispatch sub-tasks to a grandchild, and so on, up to five layers.
Other changes in the same release include:
- Amazon Bedrock region precedence: Claude Code now reads the AWS region from
~/.aws/configwhenAWS_REGIONis not set, matching the standard AWS SDK resolution order. - Plugin marketplace search bar: the
/plugincommand now includes search when browsing marketplace plugins. - OTEL model attribute: the
claude_code.lines_of_code.countOpenTelemetry metric now carries amodelattribute, giving observability pipelines per-model usage breakdowns. - 1M context auto-compact: sessions using 1M context without usage credits now automatically compact back under the standard context limit instead of getting stuck.
- Background agent safety fixes: fixes for background agents reading the wrong directory's
.mcp.jsonapprovals and trust settings when dispatched onto a pre-warmed worker.
The nesting change is the headline. Everything else is solid, but none of it reshapes how teams architect their agent workflows the way five-level delegation does.
Why it matters for AI engineering teams
Before this release, Claude Code's agent model was flat: a primary agent spawns sub-agents, each runs one level deep, and the parent waits. That forced teams to bake complex task decomposition into single agent prompts — long, brittle, expensive.
Five-level nesting changes the decomposition model entirely. A coding workflow can now look like this:
- Level 0 (planning agent): reads the full repo, understands the task, decides decomposition strategy. Uses the strongest available model (Opus).
- Level 1 (orchestration agent): receives a sub-task, breaks it into parallel work items. Uses a mid-tier model (Sonnet).
- Level 2 (execution agent): implements one work item, writes code, runs tests. Uses the same or a cheaper model.
- Level 3 (verification agent): reviews the diff, runs linters, checks for regressions. Uses a cheaper model (Haiku).
- Level 4 (leaf helper): fetches a file, counts lines, runs a utility command. Uses the cheapest available model.
Each delegation level is a natural routing decision point. The parent agent implicitly chooses which model tier to dispatch to. This is not theoretical — Claude Code already supports CLAUDE_CODE_SUBAGENT_MODEL environment variable overrides, and the /model picker now correctly propagates availableModels restrictions to sub-agent model overrides.
The router/operator angle
The five-level nesting creates a routing hierarchy that mirrors the cascading service delegation patterns operators have used for years in API gateways. Here is what changes for teams running agentic coding at scale:
Cost granularization. Each delegation level can route to a different model tier. A five-level workflow where levels 3–4 run on Haiku instead of Opus can reduce per-task cost by 40–60% on typical refactoring jobs. The June 10 release's 1M context auto-compact also prevents runaway token spend on sessions that accidentally hit the context ceiling.
Reliability layering. If a leaf agent (level 3–4) fails — hallucinated a test path, hit a rate limit, produced incorrect code — the parent at level 2 can detect the failure, re-dispatch to a different model, or fall back to doing the work itself. This is fallback at the agent level, not the provider level. It requires no external routing infrastructure, but the pattern is identical to what an API gateway does with provider failover.
Governance controls. The five-level cap is a governance knob. Teams that want tighter cost control can limit nesting depth via the availableModels restriction. The OTEL metric changes also make it possible to track per-nesting-level cost and latency in observability pipelines — if you instrument it.
Provider dependency. With ANTHROPIC_BASE_URL pointing to a compatible endpoint, teams can run the entire five-level hierarchy against a different model provider. The nesting architecture is model-agnostic at the routing layer; the cost and latency characteristics change, but the delegation pattern holds.
What to watch
- Rate-limit stacking: each nesting level issues its own API calls. A level-0 agent dispatching three level-1 agents, each dispatching three level-2 agents, creates nine concurrent API streams. Rate-limit planning needs to account for multiplicative fan-out.
- Depth limits in CI: teams running Claude Code in CI pipelines should test whether their workflows hit the five-level ceiling and how the runtime behaves at the boundary.
- Bedrock region change: the
~/.aws/configprecedence fix means Claude Code on Bedrock may resolve to a different region than before. If your routing depends on explicitAWS_REGION, verify your environment after updating. - Cost observability: the new OTEL
modelattribute pairs well with gateway-level request ledgers to build per-delegation-level cost dashboards for coding agent spend. - Model-tier routing strategy: five-level nesting makes the case for explicit model-tier routing in coding agents. Planning tasks need the strongest model; leaf tasks do not. If your provider fallback policy is still flat — same model for everything — this release is the trigger to stratify it.

Anthropic Model Hardware Standard: The New Safety Boundary for Physical AI Agents
Anthropic Model Hardware Standard turns lab devices into discoverable agent tools. For operators, the critical work is routing authority, safety limits, and audit paths before code touches hardware.

Claude Code Now Breaks Down Usage Cost per Skill, Agent, and MCP Server in VSCode — What Enterprise Operators Need to Know
The June 12 Claude Code release adds per-skill, per-agent, and per-MCP-server cost attribution to the VSCode /usage dialog, fixes a Bedrock GovCloud bug, and closes a background-session credential leak.

OpenAI Agents API Beta: The New Gateway Bypass Operators Need to Account For
OpenAI's Agents API beta ships a dedicated session harness under client.beta.agents that doesn't route through /v1/chat/completions. For teams using AI gateways, this means billing blind spots, missing audit trails, and a new API key scope to manage.