Run agents in parallel - Claude Code Docs
Skip to main content
Subagents, agent view, agent teams, and dynamic workflows each parallelize work in a different way. The right one depends on whether you want to stay in each conversation yourself, hand tasks off and check back later, or have Claude coordinate a group of workers for you.
In every approach the workers are Claude sessions. To involve a different tool, expose it to Claude as an MCP server. Two more tools support this work without being a way to run agents themselves:
  • Worktrees give each session a separate git checkout, so parallel sessions never edit the same files. Use them for sessions you run yourself. Agent view moves each dispatched session into its own worktree automatically, and subagents you spawn can each get one too.
  • /batch is a skill that has Claude split one large change into 5 to 30 worktree-isolated subagents that each open a pull request. It’s a packaged use of subagents and worktrees, not a separate coordination style.
A few other features run Claude without you driving each step, but they solve a different problem than splitting work across agents:
  • A background bash command runs one shell command without blocking the conversation. It doesn’t spawn an agent.
  • A forked subagent is a subagent that inherits your full conversation context instead of starting fresh. It’s a way to spawn a subagent, not a separate surface.
  • A routine runs a session on a schedule in Anthropic’s cloud, not in parallel on your machine.
Running several sessions or subagents at once multiplies token usage. See Costs for usage and rate-limit details.

Choose an approach

The right approach depends on who coordinates the work, whether the workers need to communicate, and whether they edit the same files:
  • Who coordinates the work?
  • Do the workers need to talk to each other? Subagents report results back to the conversation that spawned them, and agent view sessions report only to you. Teammates in an agent team share a task list and message each other directly.
  • Do the tasks touch the same files? Isolate the work with worktrees. Subagents and sessions you run yourself can each use a separate worktree. Agent teams don’t isolate teammates in worktrees, so partition the work so each teammate owns a different set of files.

Check on running work

The command for checking on running work depends on which approach you used:
  • For background sessions, claude agents opens agent view: one screen showing every session, its state, and which ones need your input.
  • For subagents in the current session, /agents opens a panel with a Running tab listing live subagents and a Library tab where you create and edit custom subagents. Despite the similar name, this is separate from claude agents.
  • For anything running in the background of the current session, /tasks lists each item and lets you check on, attach to, or stop it.
  • For dynamic workflows, /workflows lists running and completed runs, the phase each is in, and how many agents have finished.
For a desktop view of all your sessions, see parallel sessions in the desktop app.

Learn more

Each guide below covers setup and configuration for one approach: