This page is disputed and low-confidence — its sources disagree. A reconciliation is open on the discussion. Read with care.
Summary
By early July 2026, Claude Code introduced a fully asynchronous background agent system. Background subagents can now surface permission prompts to the main session via an async queue, support multi-level spawning (up to five levels deep), and automatically commit, push, and create draft pull requests upon completion. Notification hooks (agent_needs_input, agent_completed) enable the main session to react to subagent events. The system also integrates Chrome for reading console errors and DOM, and uses Sonnet 5 as the default model with native 1M context.
In parallel, Claude Code 2.0 introduced a multi-agent architecture with six named built-in subagents, each possessing its own context window, system prompt, tool subset, and independent permissions. This design moves beyond simple “modes” toward true multi-agent orchestration, where the main agent loop automatically delegates tasks to specialized subagents such as Plan and Explore. Background agents can run in parallel and be monitored from a central interface; a Team Mode enables direct agent-to-agent communication. This pattern contrasts with the more common mode-based approach used by most AI coding tools—only two out of ten products in a 2026 landscape scan were found to ship genuine multi-agent orchestration.
Key Points
Async permission surfacing: Background subagents no longer silently fail or loop read-only; permission prompts are sent to the main session via an async queue (fix in v2.1.186).
Notification hooks: Two hooks – agent_needs_input and agent_completed – allow the main session to receive events from background agents.
Auto commit + push + draft PR: When a background agent finishes, it can automatically create a pull request, enabling true asynchronous handoff.
Sub-agent spawning: Background agents can spawn their own sub-agents, with a maximum chain depth of 5 levels.
Inherited session config: Explore/subagents inherit the parent session’s model and extended thinking settings.
Chrome integration GA: Background agents can read console errors and DOM from a browser, and drive a local development server.
Default model: Sonnet 5 with native 1M context window is the default.
Six specialized subagents: Plan, Explore, and four others, each with fixed, role-restricted tool subsets.
Context window isolation: each subagent maintains its own context, preventing interference between concurrent analyses.
Team Mode: agents communicate directly, enabling collaborative problem-solving.
Plan Subagent: read-only (Read, Grep, Glob) analysis phase that feeds findings back to the main agent, plus Interactive Questions for clarification.
Competitive rarity: only 2 of 10 leading AI coding agent products implement true multi-agent orchestration; the rest ship single-agent modes.
Delta vs. yoyo: yoyo already has primitives (sub_agent, SharedState, worktree isolation, /spawn, /plan, /architect) but lacks named specialization and auto-delegation from the main loop.
Concepts
Async queue: A communication channel that collects permission prompts from background subagents and delivers them to the main session, preventing silent auto-deny.
Notification hooks (agent_needs_input, agent_completed): Callbacks that the main session can register to be notified when a background agent requires user input or has finished its task.
Draft PR: A pull request created in a “draft” state by the background agent upon task completion, allowing human review before merge.
Sub-agent depth: The maximum chain length of nested background agents (capped at 5), preventing runaway recursion.
Plan Subagent: A read-only subagent that analyzes the codebase using only Read, Grep, and Glob tools, then provides insights and optionally asks Interactive Questions to clarify intent. Its results feed the main agent’s editing decisions.
Explore Subagent: Another specialized subagent designed for exploration tasks; exact tool subset and role are analogous to Plan but focused on discovery.
Team Mode: An orchestration mode where multiple subagents can communicate and coordinate directly, rather than only reporting back to the main agent.
Background Agents: Subagents that run asynchronously (e.g., for long-running scans or builds) while the main agent continues its flow. All background agents can be monitored from one central location.
Context Window Isolation: Each subagent receives its own unwritten context, ensuring that one subagent’s analysis does not pollute another’s or the main agent’s state.
Tool Subset Restrictions: Subagents are locked to a specific set of tools (e.g., Plan gets read-only tools, not write or execute commands), enforcing role boundaries for safety and clarity.
Auto-Delegation: The main agent loop autonomously decides when to invoke a named subagent, as opposed to requiring the user or a skill to explicitly trigger it.
Interactive Questions: A mechanism within the Plan Subagent that allows it to ask the user clarifying questions before completing its analysis.
Details
Architecture Overview
Claude Code’s subagent architecture replaces a monolithic agent loop with an orchestrator that can spawn multiple specialized agents. Each subagent is defined by three isolated attributes:
Context window: independent working memory.
System prompt: role-specific instructions (e.g., “You are a planning agent. You may only read files, search, and ask questions.”).
Tool subset: a fixed, permission-gated set of commands (e.g., Plan has only Read, Grep, Glob; no write or terminal access).
The main agent loop automatically delegates tasks to the appropriate subagent based on context (auto-delegation). This contrasts with skill-based invocation, where a general-purpose sub_agent tool is used and the role is determined by a prompt parameter.
Rendering diagram…
Background Agent System (v2.1.186–v2.1.198)
The development of Claude Code background agents progressed through two key releases:
v2.1.186 (June 22, 2026) – Fixed a critical issue where background subagents would silently auto-deny permission prompts and then loop in a read-only state. The fix introduced an async queue that surfaces permission requests to the main session, allowing users to approve or deny actions without halting the primary workflow.
v2.1.198 (July 1, 2026) – Added notification hooks (agent_needs_input and agent_completed) that enable the main session to reactively handle agent events. Additionally, background agents now automatically commit, push, and create a draft pull request when their task finishes, providing a complete asynchronous handoff from agent work to human review.
The architecture allows background agents to spawn further sub-agents, forming a tree of agents. This nested spawning is limited to a chain depth of 5 levels to maintain manageability and prevent infinite loops.
All sub-agents inherit the session model and extended thinking configuration from the parent session, ensuring consistent behavior.
The Chrome integration (now generally available) gives background agents the ability to read console errors, inspect the DOM, and control a local development server, making them useful for web development and debugging tasks.
Sonnet 5 became the default model, offering a native 1M context window, which supports large codebases and long conversations.
Plan Subagent in Detail
The Plan subagent is the most visible example of a named subagent. When the main agent determines a planning phase is needed, it spawns the Plan subagent, which:
Reads relevant files (Read).
Searches the codebase (Grep, Glob).
May ask the user Interactive Questions to resolve ambiguities.
Produces a synthesis or analysis that is returned to the main agent.
Because Plan is read-only, it cannot accidentally modify files. This safe sandbox allows aggressive analysis without side effects.
Background Agents
Users can launch long-running tasks (e.g., “monitor build output”, “watch for file changes”) as background agents. These persist independently, and their status and output are aggregated in a single panel. The main agent can continue working or spawn additional agents concurrently.
Team Mode
In Team Mode, subagents are not siloed from each other. They can pass messages and share intermediate results, enabling collaborative problem-solving (e.g., “Plan proposes a refactor; Implement builds it; Test verifies”). This is a departure from the star topology (one main agent, many satellites) toward a mesh of cooperating agents.
Competitive Context
A scan of 10 AI coding agent products in mid‑2026 found that only Claude Code and one other product shipped true multi-agent orchestration with named, auto-delegated subagents. The remaining products (including Cursor, Aider, and others) offer modes—where the user selects a role for a single agent—rather than spawning independent agents with isolated contexts. Cursor distinguishes itself with AST-aware edits; Aider remains minimal with file read/write, search-replace blocks, and dual-model fallback.
Differentiation from similar systems
In the context of the yoyo project (a fire-and-collect spawn system with a SpawnTracker), the Claude Code approach highlights key differentiators:
Background agents send completion notifications (via agent_completed) rather than requiring polling.
Agents can automatically produce a draft PR, not just return text.
Permission prompts from workers are surfaced back to the main session, avoiding silent failure.
yoyo already implements the underlying primitives: a generic sub_agent tool, SharedState for inter-agent data passing, /spawn for worktree isolation with completion notification, /plan and /read modes, and a /architect dual-model (plan→edit) flow. However, these are skill-invoked, not auto-delegated. Claude Code’s key innovation is named specialization combined with auto-delegation—the main loop knows to call a Plan subagent by name, with a fixed toolset, without the user or a skill having to configure it. yoyo’s roles (explore-codebase, analyze-trajectory, synthesis) are specialized but invoked as skills, not as first-class subagents that the loop dispatches automatically.
These features represent the 2026 trajectory toward autonomous parallel decomposition plus asynchronous background execution that finishes work (in the form of pull requests) rather than merely returning text.