Claude Code supports multi-agent orchestration — spinning up multiple AI agents working in parallel to complete complex tasks faster than a single agent could alone.
How it works
When you ask Claude to handle a large or parallelizable task, it can:
- Break the task into independent subtasks
- Spawn sub-agents via
AgentTool for each subtask
- Each sub-agent runs independently with its own tools and context
- Results are collected and synthesized by the parent agent
Spawning sub-agents
You don’t need to do anything special — just ask:
Claude decides when parallelization helps and spawns agents accordingly.
Team-based workflows
For larger coordinated work, Claude can create a named team of agents:
TeamCreateTool provisions the team. Each agent in the team can communicate via SendMessageTool, enabling coordination patterns like:
- One agent reads files, others write changes
- A coordinator agent breaks down work and delegates
- A reviewer agent validates results from worker agents
Teams are cleaned up automatically or with TeamDeleteTool.
Coordinator mode
The coordinator/coordinatorMode.ts subsystem handles multi-agent orchestration at a higher level — managing agent lifecycles, work distribution, and result aggregation for complex swarm tasks.
Plan before execution
For large multi-agent tasks, enter plan mode first:
Review the plan, then approve execution:
Example: parallel test generation
Claude will:
- List all files in
src/services/ using GlobTool
- Spawn one sub-agent per file (or group small files)
- Each agent reads its assigned file and writes a test file
- Parent agent reports completion
Limitations
- Sub-agents share your permission settings but each gets a fresh context window
- Very large swarms may hit API rate limits — Claude handles backoff automatically
- Sub-agent work is visible in the parent session’s output
Multi-agent workflows shine for tasks with many independent files (e.g., adding types to every module, generating tests, or updating imports across a large codebase).