How-to · how to spawn subagents in claude code
How to spawn subagents in Claude Code
Spawn Claude Code subagents for parallel research, isolated reviews, custom agent files and safer agentic workflows.
Quick answer
Claude Code can spawn subagents through the Agent tool. Use them for focused subtasks such as codebase research, review, QA, security checks or independent analysis.
Best use case
Spawn subagents when the work can run in parallel or when you want isolated context. Brief each subagent with goal, repo context, exact files or commands to inspect and output format.
What not to do
Do not spawn subagents for one command, vague work or deeply contextual decisions. Subagent driven work beats inline execution only when isolation or parallelism pays for the overhead.
FAQ
Can Claude Code subagents spawn subagents?
They can, but one level is usually cleaner. Multi-level trees add overhead and reduce observability.
What is the best first subagent?
A branch-readiness or code-review subagent is a good first build because it has a narrow job and returns a clear verdict.