Home › Rules › Claude Code agent teams

Claude Code agent teams: how to turn them on, what they cost, and agent teams vs subagents

From Anthropic's own Claude Code docs (Agent teams, Manage costs, Settings reference, Environment variables, Subagents, Dynamic workflows, Hooks, Changelog), checked Nov 14, 2026. Sources below.

Short answer: agent teams let one Claude Code session (the lead) start several other Claude Code sessions (teammates) that share a task list and message each other. They're experimental and off by default: set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to 1 in your settings or shell, then ask Claude for a team in an interactive session. Anthropic says teams "use significantly more tokens than a single session", so they're worth it for research, review and features that split cleanly, not for routine edits. You don't need tmux; split panes are optional.

Turning on agent teams

Agent teams are disabled until you set one environment variable. Put it in the env block of a settings file (this is Anthropic's example), or export it in your shell:

From Anthropic's docs: the flag that turns agent teams on
{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}

Then describe the job and the teammates you want in plain words. If Claude uses subagents instead (they show up in the same agent panel, so the panel alone doesn't prove a team formed), ask again and say "agent team".

What agent teams cost, in Anthropic's words

"Agent teams use significantly more tokens than a single session. Each teammate has its own context window, and token usage scales with the number of active teammates." Anthropic adds: "For research, review, and new feature work, the extra tokens are usually worthwhile. For routine tasks, a single session is more cost-effective." The Manage costs page puts one number on it: "Agent teams use approximately 7x more tokens than standard sessions when teammates run in plan mode." That's Anthropic's figure, not a test of ours.

Anthropic's tips from its Manage costs page:

Caching: an in-process teammate's prompt cache lasts five minutes by default, even on a Claude subscription. Setting subagentPromptCacheTtl to "1h" keeps it for an hour, but the API bills 1-hour cache writes at a higher rate. Plan limits: Claude Pro vs Max vs Ultra.

How a team works

Anthropic's four parts of a team:

PartWhat it does
Team leadYour main session. It spawns teammates, hands out work and pulls the results together. It stays the lead for the whole session.
TeammatesSeparate Claude Code sessions, each with its own context window, working on their own tasks
Task listShared work items with three states (pending, in progress, completed). Tasks can wait on other tasks and show as blocked until those are done.
MailboxMessages between agents, kept as a JSON file per agent under ~/.claude/teams/

In-process or split panes (tmux, iTerm2)

By default every teammate runs in-process, inside your main terminal, and this works in any terminal. Teammates are listed in the agent panel under your prompt: up and down arrows pick one, Enter opens its transcript so you can message it, Escape interrupts it while you're viewing it, x stops it, and Ctrl+T shows or hides the task list.

Split panes give each teammate its own pane, so you can watch them all at once and click into one. They need tmux, or iTerm2 with the it2 CLI and iTerm2's Python API setting turned on. Anthropic notes tmux "traditionally works best on macOS" and suggests tmux -CC in iTerm2. You switch it on with teammateMode:

teammateModeWhat happens (Settings reference)
"in-process" (default)Teammates run inside your main terminal pane
"auto"Split panes when you're running inside tmux, or inside iTerm2 with it2 on your PATH or tmux installed; in-process otherwise
"tmux"Split panes using tmux or iTerm2, detected from your terminal. Started outside tmux and iTerm2, the panes open in a separate tmux session; run the command on the View teammates line in a second terminal to watch them
"iterm2"iTerm2's own split panes through it2; teammates start only when you run Claude Code in iTerm2 with it2 set up

For one session, use claude --teammate-mode auto. That flag is experimental and doesn't show in claude --help.

Plans, permissions and quality checks

Agent teams vs subagents vs workflows

Built from Anthropic's two comparison tables (Agent teams page and Dynamic workflows page), shortened:

SubagentsAgent teamsWorkflows
What it isA worker Claude spawns inside your sessionA lead agent supervising peer sessionsA script the runtime runs
Who decides what runs nextClaude, turn by turnThe lead agent, turn by turnThe script
How they talkReturn a result to the caller (named subagents can also message each other)Teammates message each other directly; you can message any teammateResults stay in script variables; only the answer reaches your chat
Where results liveClaude's context windowA shared task listScript variables
ScaleA few delegated tasks per turnA handful of long-running peersDozens to hundreds of agents per run
Token costLower: results summarized backHigher: each teammate is a separate Claude instanceA single run can use "meaningfully more tokens"
Best forFocused jobs where only the result mattersWork that needs discussion: research, review, competing theories, features split by layerSweeps, big migrations, cross-checked research you want to rerun
StatusStandardExperimental, off by defaultSee our workflows page

Anthropic's own advice is to check whether a lighter option does the job before you set up a team, and that sequential tasks, edits to the same file, or work with many dependencies go better in one session or with subagents. More on each: Claude Code subagents examples and Claude Code workflows. All five ways side by side, plus agent view and worktrees: Claude Code multi-agent setup.

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.

Our setup: a small team with clear lanes

One user settings file that turns teams on and opens split panes when you happen to be in tmux or iTerm2 (and stays in-process everywhere else):

Our example (VibeKits): agent teams on, split panes when available
{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  },
  "teammateMode": "auto"
}

Teammates read CLAUDE.md like any session, so house rules for teams can live there. This block follows the practices on Anthropic's Agent teams and Manage costs pages: small teams, Sonnet teammates, separate files, full context in the spawn prompt, and shutting teammates down.

Our example (VibeKits): house rules for agent teams
## Agent teams
- Only start a team when I ask for one. For a quick side job, use a subagent.
- Start with 3 teammates unless I give a number. Give each one a short name I can type.
- Run teammates on Sonnet unless I name another model.
- Each teammate owns its own files. Never have two teammates edit the same file.
- Put the file paths, the goal and what "done" means in every spawn prompt; teammates don't see this chat.
- Wait for teammates to finish their tasks before you start the same work yourself.
- When a teammate's work is done, ask it to shut down. Before you tell me the job is done, check the task list for anything still open.

And three prompts to start with. Anthropic suggests a first team on work with clear lanes that doesn't write code, like a review, so prompt 1 is the place to begin:

Our example (VibeKits): three team prompts
# 1. Review only, no code changes (a good first team)
Create an agent team to review the changes on this branch. Spawn three teammates
on Sonnet named sec, perf and tests: sec looks for security problems, perf for
slow code, tests for missing or weak tests. Don't edit any files. Each one reports
its findings with file and line, then you merge them into one list, worst first.

# 2. A bug with more than one possible cause
Create an agent team to find why the signup form sometimes saves twice. Spawn
three teammates, each testing a different theory: the button, the API route, the
database write. Have them message each other and try to rule out each other's
theory. Only change code after they agree on the cause.

# 3. A feature split by files
Create an agent team for the new settings page. Spawn three teammates on Sonnet:
ui owns src/pages/settings/, api owns src/api/settings/, tests owns tests/settings/.
Nobody edits files outside their folder. Wait for all three before you report back.

No CLAUDE.md yet? Copy one from our CLAUDE.md examples or make one with the free rules generator.

Known limits (experimental)

Turning agent teams off

Set the same variable to 0 in the env block of your user settings.json. You don't need a new session: Claude Code reapplies settings-file env values when you save, and the next subagent Claude names launches as a normal subagent. A 0 in user settings beats a shell export, but a project, local or --settings file that sets it to 1 still wins, and so do managed settings (ask your admin). To end one teammate instead, ask the lead: "ask the researcher teammate to shut down". The teammate can approve and exit, or refuse and say why.

Agent teams not working: 8 things to check

  1. Nothing happens when you ask for a team. Check the flag is 1 and that you're in an interactive session, not claude -p or the Agent SDK. Claude also decides whether a task is big enough for a team.
  2. You got subagents, not teammates. They share the agent panel. Ask again and say "agent team".
  3. You got teammates, not subagents. With the flag on, a subagent Claude names starts as a teammate. Set the flag to 0 (see above).
  4. A teammate vanished from the panel. Idle rows hide 30 seconds after the whole panel goes idle, and more than three idle teammates collapse into one N idle agents row (Enter expands it). The teammate is still running; message it by name.
  5. No split panes. Run which tmux to check tmux is on your PATH. For iTerm2, check it2 is installed and the Python API is on. With "auto", you have to start claude inside tmux or iTerm2. An unrecognized teammateMode value is skipped; since v2.1.325, claude doctor and the startup warning list it.
  6. Too many permission prompts. Teammate prompts go to the lead. Pre-approve common commands in your permission settings before you spawn. For split-pane teammates, --allowedTools isn't passed on; put the rules under permissions.allow in --settings instead.
  7. A teammate or the lead stops early. Open the teammate and give it more instructions, or spawn a replacement. If the lead starts doing the work itself, tell it: "Wait for your teammates to complete their tasks before proceeding". If it calls the job finished too soon, tell it to keep going.
  8. A tmux session is left behind. Run tmux ls, then tmux kill-session -t <session-name> for the team's session.

FAQ

How do I turn on agent teams in Claude Code?

Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to 1 in your shell or in the env block of settings.json (it's experimental and off by default), then ask Claude for a team in an interactive session.

Do agent teams cost more than subagents?

Yes. In Anthropic's comparison, teams cost more tokens than subagents: every teammate runs as its own Claude instance with its own context window, so usage grows with each active teammate.

What is the difference between agent teams and subagents?

A subagent does a job inside your session and sends its result back to the main agent. Agent team teammates are separate Claude Code sessions that share a task list, claim work, and message each other directly, and you can talk to any teammate yourself.

Do I need tmux for Claude Code agent teams?

No. The default in-process mode runs every teammate inside your main terminal and works in any terminal. tmux, or iTerm2 with the it2 CLI, is only needed if you want each teammate in its own split pane, which you turn on with the teammateMode setting.

How do I stop Claude from starting teammates instead of subagents?

Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to 0 in the env block of your user settings.json. It applies when you save, but a project, local, --settings or managed setting of 1 still wins.

Related setups

A team sits on top of the rest of a Claude Code setup. Put your project rules in CLAUDE.md, define reusable roles as subagents, pick models on Claude Code models, and use workflows when the job is too big for a handful of teammates. Want a stronger model to check one session's hard decisions instead? See the Claude Code advisor.

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)

A team splits one job across several Claude sessions. 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 setting, key, limit and version number here was checked Nov 14, 2026 on Anthropic's own Claude Code docs. Agent teams are experimental and the Agent teams page changes often (its split-pane steps were rewritten between Nov 13 and Nov 14), so run claude --version and check that 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.