Home › Rules › Claude Code multi-agent

Claude Code multi-agent setup: subagents, agent view, agent teams, workflows and Projects, and which one to use

From Anthropic's Claude Code docs (Run agents in parallel, agent view, subagents, agent teams, dynamic workflows, worktrees, cross-session messaging, Projects, costs), checked Nov 15, 2026. Sources below.

Short answer: Claude Code can work on several things at once in five ways. Subagents are helpers inside your session. Agent view (claude agents) lets you start background sessions and watch them all on one screen. Agent teams have a lead session that hands out work to teammates. Dynamic workflows run a script that starts many subagents and checks their results against each other. Projects start parallel sessions in the cloud from one conversation. Pick by who should run the show: Claude inside one chat (subagents), you (agent view), a lead Claude (teams), a script (workflows), or a long-running cloud conversation (Projects). If parallel agents edit the same repo, give each one its own git worktree. Every one of these uses more of your plan than a single session.

We already have full pages on three of these: subagents (with 7 to copy), agent teams and workflows. This page puts all five side by side and covers the parts those pages don't: agent view, worktrees, sessions messaging each other, and the commands that tie them together.

The five ways, side by side

Anthropic's "Run agents in parallel" page names these five. The table is our summary of it plus each feature's own page:

ApproachWho runs itWhere it runsCan workers talk?StatusStart it with
SubagentsClaude, inside one conversationYour sessionThey report back to the session that started themStandardAsk for one, or /​subtask for a fork
Agent viewYou: you start each session and check backYour machine, in the backgroundReport to you; Claude can message them with cross-session messagingResearch previewclaude agents or claude --bg
Agent teamsA lead Claude sessionYour machine (or inside a cloud session)Teammates message each other directlyExperimental, off by defaultCLAUDE_​CODE_​EXPERIMENTAL_​AGENT_​TEAMS=1, then ask for a team
Dynamic workflowsA script Claude writes, which you can rerunYour session, in the backgroundResults stay in the script; only the answer reaches youSee our workflows pageA bundled workflow such as /​deep-research, or ask for a workflow
ProjectsClaude, in one ongoing conversationThe cloud (or your computer through Remote Control)Threads report to the project conversationPublic beta on Pro, Max and Ultraclaude.ai/code or the desktop app

Three more things help but aren't a way to run agents on their own: worktrees (a separate git checkout per session), cross-session messaging (Claude passes notes between your sessions) and /​batch (a built-in skill that splits one big change into 5 to 30 subagents, each in its own worktree). A background shell command, a forked subagent and a cloud scheduled task also run without you, but Anthropic says they solve a different problem.

Which one should I use?

Anthropic boils the choice down to three questions. Here they are in plain words, with what we'd pick:

  1. Who should coordinate? Claude, inside the chat you're in: subagents. You, handing off separate jobs and checking back: agent view. A lead Claude that plans, assigns and supervises: agent teams. A script, so the plan is fixed and repeatable: workflows. Claude, over days or weeks, even with your computer off: Projects.
  2. Do the workers need to talk to each other? Subagents report to the session that started them. Agent view sessions report to you, though Claude can pass messages between them. Only agent teams are built for workers to talk among themselves, with one shared list of tasks.
  3. Will they edit the same files? Use worktrees. Subagents and sessions you run yourself can each get one, and sessions you start from agent view move into one before they edit. Agent teams don't use worktrees, so split the work so each teammate owns different files.

Pick this if:

If you're new to this, start with subagents. They need no setup, and Anthropic's own advice for teams is to begin with research and review jobs that don't write code.

How many agents can run at once?

ApproachLimit Anthropic givesChange it with
Subagents20 running in one session by default; no limit on the total over a session. Subagents can start their own, up to 3 layers deepCLAUDE_​CODE_​MAX_​CONCURRENT_​SUBAGENTS (needs v2.1.217+); CLAUDE_​CODE_​MAX_​SUBAGENT_​SPAWN_​DEPTH (1 turns nesting off)
Agent viewNo cap given. Each session uses your plan on its ownn/a
Agent teamsNo hard limit; Anthropic suggests 3 to 5 teammates, one team per session, no nested teamsAsk the lead for a number
Dynamic workflows16 agents at once by default (fewer on machines with fewer CPUs), 1,000 agents per run; a "Large workflow" warning past 25 agents or 1.5 million projected tokensCLAUDE_​CODE_​WORKFLOW_​MAX_​CONCURRENT_​AGENTS, 1 to 256 (needs v2.1.269+)
/​batchSplits the change into 5 to 30 units, one background subagent eachn/a
ProjectsNo fixed number of running threads; 500 new threads per day across your projectsAsk Claude in the project to run fewer at a time

The subagent cap counts only subagents Claude starts with its Agent tool. Workflow agents and teammates follow their own limits, and sessions with ultracode on skip the subagent cap.

What it costs, in Anthropic's words

There's no separate price for any of this. It all comes out of the same plan or API usage, just faster:

Run /​usage to see where your usage goes; Anthropic's breakdown shows the share that went to subagents. Plan limits by tier are on Claude Pro vs Max vs Ultra.

Agent view: background sessions on one screen

Agent view is the part none of our other pages cover, and it's what most "parallel agents" and "background agents" searches are about. It was added in Claude Code 2.1.139 (May 11, 2026) as a research preview, so keys and screens may still change.

  1. Open it: run claude agents in your project folder. You'll get the workspace trust prompt first if you haven't trusted that folder.
  2. Start a session: type a task at the bottom and press Enter. Every prompt starts a new session; it doesn't send a follow-up to the last one. Each row shows Working, Needs input, Idle, Completed, Failed or Stopped.
  3. Peek and reply: select a row and press Space to see the latest output or the question it's stuck on, and reply without leaving the list.
  4. Attach: press Enter or → on a row to open the full conversation. Press ← on an empty prompt to go back to the list.
  5. Move a running chat into the background: run /​bg (or press ← on an empty prompt) in a normal session. /​fork sends a copy to the background and keeps you working in the original.

You can also start sessions straight from your shell. The --bg flag goes first and the prompt is a normal argument (not -p, which Claude Code rejects with --bg). Add --agent <name> to run one of your subagents as the session's main agent.

Our example (VibeKits): three jobs from the shell
# From your project folder: start three background sessions
claude --bg "fix the failing login test and open a draft PR"
claude --bg "update the README install steps to match package.json"
claude --agent code-reviewer --bg "review this branch, don't edit files"
# (the last one needs a code-reviewer subagent in .claude/agents/)

# Check on them
claude agents            # full-screen list: working, needs input, done
claude logs <id>         # recent output from one session
claude attach <id>       # open it in this terminal
claude stop <id>         # stop it
claude rm <id>           # remove it from the list

Things to know before you leave it running:

Not to be mixed up: /​agents (inside a session) only points you to your subagent files. claude agents (in your shell) opens agent view. /​tasks lists the background work in the session you're in, and /​workflows lists workflow runs.

Prefer the desktop app? Click + New (Cmd+N on Mac, Ctrl+N on Windows) for another session, Ctrl+Tab to switch, and Option-click or Alt-click a session for split view. Turn on Worktree under the prompt box to give a session its own copy of the project.

Worktrees: keep parallel agents out of each other's files

A git worktree is a second folder with its own files and branch that shares your repo's history. Anthropic recommends one per session when sessions run side by side, so one can build a feature while another fixes a bug.

Our example (VibeKits): .worktreeinclude
# Copied into every new worktree Claude Code creates.
# Same syntax as .gitignore. Only files that are also
# gitignored get copied, so tracked files never double up.
.env
.env.local
Our example (VibeKits): test-fixer.md
---
name: test-fixer
description: Fixes one failing test at a time in its own worktree. Use when a test fails and the fix may touch several files.
isolation: worktree
model: sonnet
tools: Read, Edit, Bash, Grep, Glob
---

Fix the failing test you are given. Work only inside your worktree.
Run that test, then the full test suite. Commit on your branch when both pass.
Report back: what was wrong, which files you changed, and the branch name.
Never push to main and never force-push.

More subagent files to copy, plus every frontmatter field, are on Claude Code subagents examples. Base branch, starting from a PR, cleanup and fixes in full: Claude Code worktrees.

Matching kit: MVP Spec-to-Build Pack ($7)

The free rules set the boundaries. The MVP pack gives you the build order: a 1-page spec to fill in first, then 7 prompts in sequence (skeleton, review, login, database, security, one feature at a time, polish), plus a "did I leak user data?" checklist.

See the MVP Spec-to-Build Pack ($7) →

Instant download. 7-day refund, no questions asked.

Let your sessions message each other

With cross-session messaging, one Claude session can send a short note to another one: "the schema changed", "the migration finished". It's on by itself from Claude Code v2.1.224 on macOS, Linux and WSL 2, and v2.1.234 on native Windows. Type /​list-agents (or /​peers) to see which sessions Claude can reach, or mention one with @name in your prompt, such as "Let @api-worker know the tests pass now".

The commands, in one place

CommandWhat it does
claude agentsOpens agent view (shell)
claude --bg "<task>"Starts a background session from the shell
/​bg or /​backgroundMoves the chat you're in to the background and frees the terminal
/​forkCopies the chat into a new background session; you keep working in the original. With agent view turned off, it starts a forked subagent instead
/​subtask <task>Starts a forked subagent: it sees the whole chat so far, works in the background and sends its result back here
/​tasksLists background work in this session, including finished subagents
/​batch <change>Plans a big change as 5 to 30 units, then runs one subagent per unit in its own worktree; each runs tests and opens a PR or reports back
/​workflowsLists workflow runs, their phase and how many agents finished
claude --worktree <name>Starts a session in its own worktree
/​list-agentsShows which of your sessions this one can message

Orchestration patterns that work

These come from Anthropic's pages. The example prompts are ours.

Our example (VibeKits): CLAUDE.md rules for parallel work
## Parallel work
- For a noisy side job (test runs, logs, big searches), use a subagent
  and give me only the summary.
- If I hand you several separate tasks, tell me which ones could run
  as background sessions instead of doing them one by one here.
- Anything that edits files in parallel goes in its own worktree.
  Never let two agents edit the same file.
- Commit to a branch and open a draft PR. Never push to main.
- Before you start more than 5 subagents, a workflow or an agent team,
  tell me the plan and wait for my OK.
- When you finish, say where the work is: branch, PR or file path.
Our example (VibeKits): lower parallel limits
{
  "env": {
    "CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS": "8",
    "CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH": "2",
    "CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS": "8"
  },
  "worktree": {
    "bgIsolation": "worktree"
  }
}

Our settings lower the defaults (20 subagents running, 3 layers deep, 16 workflow agents at once) to keep usage down on a smaller plan. "bgIsolation": "worktree" is already the default; we spell it out so nobody turns it off by accident. Delete any line you don't need.

Parallel agents not working: 8 things to check

  1. claude agents prints your subagents and exits. That's how older versions behaved. Run claude update. If it still happens, check disableAgentView and CLAUDE_​CODE_​DISABLE_​AGENT_​VIEW.
  2. "Concurrent subagent limit reached". 20 subagents are already running. Wait for some to finish, or raise CLAUDE_​CODE_​MAX_​CONCURRENT_​SUBAGENTS.
  3. A background session can't edit files. It has to move into a worktree first. If permissions.​blockWritesOutsideWorkingDirectories is on, Claude loses its worktree tools; start it with claude --bg --worktree or set worktree.​bgIsolation to "none".
  4. The app won't start in a worktree: missing .env. Add the file to .​worktreeinclude, and ask Claude to install dependencies in the new worktree.
  5. Two agents overwrote each other. Agent teams don't use worktrees. Give each teammate its own files, or use subagents with isolation: worktree.
  6. Sessions show "failed" after a restart. Shutting down stops them. Within 48 hours, reply to the session to resume it. After that it shows as stopped: press Enter twice on the row.
  7. "Operation not permitted" on Desktop, Documents or Downloads (Mac). The background host asks for folder access separately. Allow the Claude Code entry under Privacy & Security > Files and Folders; after an update, look for a new entry named for the new version.
  8. .​claude/​worktrees/ keeps growing. Run git worktree list, then git worktree remove <path>. If git says the worktree is locked, run git worktree unlock first.

Where Anthropic's pages don't line up

  1. Can subagents talk to each other? Run agents in parallel says subagents "report results back to the conversation that spawned them". The Agent teams page's comparison says subagents Claude named when it spawned them "can also message each other".
  2. Do teammates survive an interruption? The Dynamic workflows comparison says "Teammates keep running". The Agent teams limits say /​resume and /​rewind don't bring back in-process teammates.
  3. /​fork has two meanings. With agent view on, it copies the chat into a background session. With agent view off, it starts a forked subagent, and /​subtask isn't there. Not a mistake, but easy to trip on.
  4. claude agents used to mean something else. An older changelog entry added it "to list all configured agents". It now opens agent view, and Anthropic's troubleshooting says a version that still lists subagents needs claude update.

FAQ

Can Claude Code run multiple agents at once?

Yes. Anthropic lists five ways: subagents (helpers inside one session), agent view (background sessions you start and watch from one screen with claude agents), agent teams (a lead session that runs teammates, experimental and off by default), dynamic workflows (a script that runs many subagents and cross-checks them), and Projects (one conversation that starts parallel cloud sessions, in public beta on Pro, Max and Ultra). In every one of them the workers are Claude sessions.

What's the difference between subagents and agent teams?

A subagent works inside your session, does a side task in its own context and hands back a summary. An agent team is a lead session plus teammate sessions that talk to one another and work from one shared list of tasks. Teams cost more, since every teammate runs as its own Claude with its own context. Teams are experimental and need CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS set to 1.

How many agents can Claude Code run in parallel?

It depends on the method. By default a session stops spawning subagents while 20 are running (CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS changes that). A dynamic workflow runs up to 16 agents at once by default and 1,000 per run. Agent teams have no hard limit, and Anthropic suggests starting with 3 to 5 teammates. Projects have no fixed number of running threads, with an enforced limit of 500 new threads per day. Agent view doesn't publish a cap, but every session uses your plan on its own.

Do parallel agents use more of my Claude plan?

Yes. Anthropic says running several sessions or subagents at once multiplies token usage. Its agent view page says running ten agents in parallel uses quota roughly ten times as fast as running one. Its costs page puts agent teams at about 7x the tokens of a normal session when teammates are in plan mode, and its workflows page warns that one run can use a lot more tokens than doing the job by chat.

Can Claude Code orchestrate other AI tools or agents?

Not directly. Anthropic's Run agents in parallel page says that in every approach the workers are Claude sessions, and that to involve a different tool you expose it to Claude as an MCP server. You don't need an outside harness to run Claude sessions in parallel: agent view, worktrees and cross-session messaging are built in.

Related setups

Every parallel setup starts with good project rules: CLAUDE.md examples. Then go deeper on the one you picked: subagents, agent teams or workflows. Picking models for the workers is on Claude Code models. Using Kiro instead? Kiro Crew is Kiro's take on long-running agents. Before you let agents commit while you're away, go through the vibe coding security checklist.

Next step for Claude Code: Agent Skills

Skills are folders your AI coding agent loads only when the job comes up, and Claude Code, Cursor and OpenAI Codex all read the same SKILL.md format. The Vibe Coder Skills Pack ($9) is 6 ready-to-copy SKILL.md skills (fix-one-bug, stop-the-loop, leak-check, ship-check, explain-project, builder-handoff) for Claude Code, Cursor and OpenAI Codex. Also included in the 6-kit bundle.

Get the Skills Pack for $9 on Gumroad → See what's inside

One .zip of skill folders plus one markdown file. 7-day refund, no questions asked.

Best value

All 6 kits for $29 — or $20.30 with code WELCOME30 (through Nov 30)

Parallel agents go faster when each one has a clear piece of a clear plan. The kits give your AI the plan for a whole project, step by step: a small game, a Discord bot, an email-triage agent, an MVP, or a cleanup of messy code.

Get all 6 kits for $29 → See what's in each kit

$29 instead of $48 for the six kits bought separately; WELCOME30 takes 30% off that at checkout ($20.30). Instant download from Gumroad. 7-day refund, no questions asked.

Related

Sources

Every command, setting, limit and version number here was checked Nov 15, 2026 on Anthropic's own Claude Code docs. Agent view is a research preview, agent teams are experimental and Projects are in beta, so these pages change often. Run claude --version and check Anthropic's page if something looks different. If something here no longer matches, tell us at [email protected].

Free rules starter pack for Cursor, Claude Code, Codex and Antigravity

One shared AGENTS.md that works across Cursor, Claude Code, Codex, Copilot and Antigravity, plus database and test rules in each tool's format. Unzip it into your project and fill in two sections. I'll email you the link.

After that, an occasional email when I publish a new guide or rules file.

Free. No spam. Unsubscribe anytime. See our privacy note.