How it works
When Claude encounters a task that benefits from parallelism, it uses the Agent tool to spawn worker agents. Each worker:- Starts with the task description you provide
- Has access to the standard tools (file reads, shell, code search, and more)
- Runs independently and reports its result back to the coordinator
- Can be continued, redirected, or stopped while running
When to use multi-agent
Multi-agent mode is most effective when:- The task has distinct, independent sub-tasks (researching two unrelated modules, writing tests for multiple services)
- You are working with a large codebase where parallel investigation is faster
- You want parallel implementation with separate verification
Triggering parallel work
You can trigger multi-agent work with plain language:Agent tool calls in a single message to start them concurrently.
/tasks — view and manage background tasks
Run /tasks to see all running and completed background agents in the current session.
/tasks has the alias /bashes for historical reasons — both commands open the same task management view.Teams
For larger parallel workloads, Claude can create a team — a group of named agents that share a task list and coordinate with each other. When you ask Claude to tackle a complex multi-step project, it may create a team automatically. You can also request one explicitly:- Claude creates a team with a shared task list
- It spawns teammate agents, each with a name and role
- Teammates claim tasks from the shared list, complete them, and check for new work
- Teammates communicate with the coordinator and with each other via messages
- When all tasks are done, the coordinator shuts down the team
~/.claude/teams/ and ~/.claude/tasks/ respectively.
Worktree mode — isolated git branches
For tasks that require parallel changes to the codebase without conflicts, Claude supports git worktree isolation. When a worker runs withisolation: "worktree", it gets its own copy of the repository in a temporary git worktree on a separate branch.
This is useful when you want multiple agents to make independent changes (for example, two different refactors) without interfering with each other.
Monitoring progress and results
While agents are running, Claude narrates their status. You can also ask directly:Example: parallel test generation
Here is a realistic example of using multi-agent to write tests across multiple modules in parallel:1
Ask for parallel work
2
Claude launches workers
Claude spawns one worker per module, each with a specific description and task:
- “Write tests for UserService”
- “Write tests for OrderService”
- “Write tests for PaymentService”
- “Write tests for NotificationService”
3
Monitor in /tasks
4
Review the results
As each worker completes, Claude summarizes what tests were written. When all four finish, Claude gives you a summary across all modules.
Coordinator mode
For advanced use cases, you can launch Claude Code in dedicated coordinator mode by setting theCLAUDE_CODE_COORDINATOR_MODE=1 environment variable. In this mode, Claude’s role is exclusively to orchestrate workers — it delegates all file reads, edits, and shell commands to sub-agents rather than doing them itself.