sub-agents
Specialized AI agents within Claude Code that automatically handle specific task types (explore, plan, general-purpose) with isolated context windows
As defined in Every Claude Code Workflow Explained (& When to Use Each)
Where it comes up · 2
- Every Claude Code Workflow Explained (& When to Use Each)6 claims
- Lex Fridman Podcast #501 - DHH1 claim
Most important claims · 7 of 7Search all claims for “sub-agents” →
- Claude Code has three built-in sub-agents—explore (read-only scout running on Haiku), plan (activated in plan mode, read-only research), and general-purpose (full read-write on Sonnet for complex multi-step tasks)—that automatically route tasks based on complexity without explicit user instruction.Every Claude Code Workflow Explained (& When to Use Each)
- Sub-agents in split-and-merge can only report back to the main agent; they cannot communicate directly with each other, requiring all inter-agent coordination to funnel through the main agent in a hub-and-spoke topology.Every Claude Code Workflow Explained (& When to Use Each)
- Agent teams should only be used for genuinely complex projects requiring cross-collaboration between agents; most work should be solved with sub-agents or single-session approaches due to the 4-7x token multiplication and community concern that agent teams produce large quantities of work without ensuring the work is the right work.Every Claude Code Workflow Explained (& When to Use Each)
- DHH describes a progression from pre-agentic autocomplete and chatbot assistance, to agents that still required him to drive, to sub-agents that parallelized work, to a current phase where he states intent and the agent determines the path, making him optional in the implementation loop.Lex Fridman Podcast #501 - DHH
- Claude can create up to 10 sub-agents in parallel simultaneously within split-and-merge; any additional parallelizable tasks beyond 10 are queued as additional sub-agents waiting for capacity.Every Claude Code Workflow Explained (& When to Use Each)
- Agent teams require enabling a flag (claude_code_experimental_agent_teams=1) in settings.json as an environment variable, and must be explicitly specified in prompts by the user—unlike sub-agents, they do not activate automatically.Every Claude Code Workflow Explained (& When to Use Each)
- The Agentic Academy (linked in the video description) offers a full Claude Code track that covers building skills, creating custom sub-agents, structuring Claude.md, and putting the five patterns into practice with real projects.Every Claude Code Workflow Explained (& When to Use Each)