← Blog

How-to7 min read

Claude Code agent teams, and teams that mix agents and people

Claude Code's agent teams let a lead session split work across Claude teammates. How to turn them on, what they cost, and how Mira mixes Codex and people in.

Two Mira sessions side by side, one handed over from Claude Code to Kimi CodeTwo Mira sessions side by side, one handed over from Claude Code to Kimi Code

The short answer

Agent teams are an experimental Claude Code feature from Anthropic, off by default. One session acts as the team lead: it splits the work, assigns tasks and pulls the results together. The teammates are other Claude Code sessions, each with its own context, sharing a task list and messaging each other directly.

  1. Turn it on

    Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in settings.json or the environment

  2. Ask for a team

    In an interactive session, the lead spawns teammates and hands out tasks

  3. Split the files

    Teammates share one checkout, so give each its own part

Anthropic notes that agent teams use significantly more tokens than a single session, and work best when teammates can operate independently.

Turn it on and start a team

In a Claude Code settings.json, or export the same variable in your shell.
{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}
  1. Describe the task and the teammates

    For example: “Spawn three teammates to explore this from different angles: one on UX, one on the architecture, one playing devil's advocate.” Roles that don't wait on each other work best.

  2. Let the lead split the work

    The lead fills a shared task list, spawns the teammates and pulls their findings together. If Claude uses subagents instead, ask again and say “agent team”.

  3. Stay in an interactive session

    With claude -p and the Agent SDK, Claude doesn't spawn teammates; a named subagent runs as an ordinary subagent.

Watch and steer the teammates

In the lead's terminalWhat it does
↑ / ↓ in the agent panelSelect a teammate
EnterOpen its transcript and message it directly
EscapeClear the selection; while viewing a teammate, interrupt its current turn
xStop the selected teammate
Ctrl+TShow or hide the task list
  • To give each teammate its own pane, run Claude Code in tmux or iTerm2 (with the it2 CLI and the Python API on) and set "teammateMode": "auto" in your settings, or pass claude --teammate-mode auto for one session.
  • Name the model in your request, such as “Use Sonnet for each teammate”. A teammate's model and fast mode are fixed when it spawns.
  • Put the lead in plan mode before asking for a teammate, and that teammate plans first and sends a plan approval request before it implements.
  • Tasks are pending, in progress or completed, and can depend on each other. Teammates claim the next unblocked task on their own, or the lead assigns them.
  • Hooks can hold the line: TeammateIdle, TaskCreated and TaskCompleted exit with code 2 to send feedback and keep a teammate working, or stop a task from being created or closed.

How big a team, and what it costs

  • Start with 3–5 teammates; three focused teammates often do better than five scattered ones.
  • Give each teammate 5–6 self-contained tasks with a clear deliverable, such as a function, a test file or a review.
  • Token use grows with every active teammate; when teammates work in plan mode, a team uses roughly 7× the tokens of a normal session.
  • Teammate permission requests go up to the lead, so pre-approve the common commands in your permission settings first.

When it doesn't behave

Teammates don't appear
In-process teammates sit in the agent panel under the prompt; an idle row hides after 30 seconds but the teammate keeps running. For split panes, check that which tmux finds tmux, or that it2 and iTerm2's Python API are set up. Simple tasks may not get a team at all.
Claude makes teammates when you wanted subagents
While agent teams are on, a subagent Claude names launches as a teammate. Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to 0 in your settings; the next subagent starts as a subagent without restarting.
A teammate or the lead stops early
Open the teammate and give it more instructions, or spawn a replacement. If the lead declares the team done too soon, tell it to keep going.
A tmux session is left over
Run tmux ls, then tmux kill-session -t <name> for the one the team created.

Claude Code's five ways to run agents in parallel

What it isUse it when
SubagentsWorkers inside one session that report a summary backA side task would flood your main conversation
Agent viewOne screen to dispatch and watch background sessions (claude agents); research previewYou have several independent tasks to hand off
Agent teamsA lead plus teammates with a shared task list and messaging; experimental, off by defaultClaude should split a project and keep the workers in sync
Dynamic workflowsA script that runs many subagents and cross-checks their resultsThe job is too big for a handful of subagents
ProjectsOne ongoing conversation at claude.ai/code or in the desktop app that starts parallel threadsYou want Claude to coordinate a longer body of work

In every one of these, the workers are Claude sessions. Anthropic's guide points to MCP for bringing another tool in.

Teams that mix agents and people, in Mira

A Claude Code sessionName another session with @, or let the agent start one
  • A Codex sessionStarted with the agent and model the task needs
  • A Kimi Code sessionRead where it has got to, or send it a message
  • A teammate's sessionIn a team space, people steer sessions too
Session messaging works across agents: one session's agent can read another session, message it, or start a new session with a chosen agent, model and opening task.
  • Each parallel session can start in its own git worktree, so sessions don't overwrite each other's files.
  • In a team space, several people send into the same session, each message signed with its sender.
  • Every session, whichever agent runs it, is in one sidebar.

Questions

Are agent teams on by default?
No. They're experimental; set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to 1 to turn them on. Teammates are only spawned in interactive sessions, not with -p.
What's the difference between subagents and agent teams?
Subagents work for one session and report a summary back. Agent teams are separate sessions that share a task list and message each other, which costs more tokens.
Can an agent team include Codex?
Not in Claude Code: its teammates are Claude sessions. In Mira, a Claude Code session can start or message a Codex session through session messaging.
Do teammates get their own worktree?
Anthropic's guide says agent teams don't isolate teammates in worktrees, so split the work so each teammate owns different files.

Sources

Agent teams and Claude Code's other parallel options were checked against Anthropic's documentation on November 8, 2026, and the setup, steering, cost and troubleshooting sections on November 27, 2026: code.claude.com/docs/en/agent-teams and code.claude.com/docs/en/agents. The feature is experimental and changes quickly, so check those pages for the latest.

Keep reading