Claude Code agent view showing multiple parallel sessions in the terminal with status indicators Screenshot from Anthropic's Claude Code docs
by VibecodedThis

Claude Code 2.1.172: Sub-Agents Can Now Spawn Their Own Sub-Agents

Anthropic shipped Claude Code 2.1.172 on June 10, adding support for sub-agents that can delegate to their own sub-agents, up to five levels deep. The update also improves AWS Bedrock region detection and adds search to the plugin marketplace.

Share

Anthropic shipped Claude Code version 2.1.172 on June 10, and the headline feature is something that was hard to do before: sub-agents can now spawn their own sub-agents. The nesting goes up to five levels deep.

Until this update, only the top-level Claude Code session could delegate to a subagent. Now any subagent can call the Agent tool itself, and so can each of its children, down to that five-level hard ceiling. Each subagent gets a fresh context window, so the main practical use case is managing context — an agent handling a large codebase can offload work to a child before its own window fills, and that child can do the same.

Anthropic set the cap at five levels deliberately. There’s no configuration to change it, which keeps the behavior predictable and avoids recursion that could burn tokens with no clear stopping point.

What Else Shipped

AWS Bedrock region detection got smarter. Claude Code now reads the AWS region from ~/.aws config files when the AWS_REGION environment variable isn’t set, which matches how the official AWS SDK handles precedence. The /status command now shows where the region came from, so you can tell at a glance whether it’s coming from the env var, the config file, or a default fallback.

Plugin search is now available when browsing the marketplace in /plugin. Previously you had to scroll through the full list. You can now type to filter, which matters more as the marketplace has grown.

A new model attribute was added to the claude_code.lines_of_code.count OTEL metric, letting teams track usage by model in their observability pipelines.

Bug Fixes

The changelog lists a batch of fixes alongside the new features:

  • Sessions using 1M context without available usage credits were getting permanently stuck. They now automatically compact back under the standard context limit.
  • A repeating “an image in the conversation could not be processed and was removed” error when conversations contained multiple images is fixed.
  • The agents view was keeping sessions in a “Working” state with a busy spinner for up to 30 seconds after the agent had already replied. That delay is gone.
  • Background agents were occasionally reading project settings from the wrong directory when dispatched onto a pre-warmed worker.
  • A background sub-agent could get stuck as “active” in the agent panel after a nested agent it spawned was stopped.
  • Model suggestions in /model were rendering with a misleading slash prefix and showing models disabled for the user’s org.
  • availableModels restrictions weren’t being applied to subagent model overrides or the agent dispatch model picker.
  • The Bedrock model picker was offering models the provider doesn’t serve.
  • Model IDs were getting a doubled 1M-context suffix (e.g., [1M][1m]).
  • The up-arrow prompt history was showing the main agent’s prompts while a subagent’s chat tab was open.
  • Remote sessions weren’t finding memory stored in mounted team memory stores.
  • Workflow validation was incorrectly rejecting scripts that mentioned Date.now() or Math.random().
  • The /plugin marketplace list was losing cursor position and had navigation issues.

On performance, the release improves response times in long conversations and cuts idle CPU usage. Claude in Chrome tool loading is faster. The VSCode extension got fixes for PowerShell tool call rendering and ANSI escape code stripping.

Getting the Update

Run npm update -g @anthropic-ai/claude-code or let Claude Code auto-update. The nested sub-agent feature is available immediately on all plans that support agent use.

Source: Claude Code changelog

Share