Subagents
Delegate independent work to specialized agents.
Spin up sub-agents for parallel research, isolated work, or specialized review. Avoid the common pitfalls of prompt drift and context bloat.
All subagents questions (3)
-
How do I run multiple research subagents in parallel?
Ask for parallel subagents in one user turn. Each runs in a fresh context, returns one summary to the parent's live context, and (in normal use) exits; transcripts persist on disk for grep, but the live parent never receives the trail. Use it for noisy independent lookups, not for work you plan to iterate on.
-
Should I spawn subagents or build an agent team?
Subagents report to one parent and work independently. Agent teams share a mailbox and task list, letting teammates message each other directly. The experimental flag, display mode options, and the absence of /resume for in-process teams are the deciding details.
-
When do I drop down to the Agent SDK instead of using filesystem agents?
The Agent SDK is for building Claude-powered applications, not for using Claude Code itself. Use programmatic agents (defined in code via `agents` in query options) when you need dynamic agent definitions, when you are integrating into your own app, or when filesystem markdown is too static for your runtime.