Direct answer
Claude Code agent teams run several Claude Code sessions together: one lead assigns work, and teammates each work in their own context window and message each other directly. The feature is experimental and off by default; turn it on with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.

An agent team is a lead session that runs other Claude Code sessions
Claude Code agent teams let one session, the lead, start other Claude Code sessions as teammates. Each teammate works in its own context window. Teammates message each other directly, and you can message any of them without going through the lead.
The feature is experimental and off by default. A team has four parts:
| Part | What it does | Where it lives |
|---|---|---|
Team lead | What it does Starts teammates, assigns work and combines the results | Where it lives Your main Claude Code session |
Teammates | What it does Separate Claude Code sessions that each work on their tasks | Where it lives In your terminal, or each in its own pane |
Task list | What it does Work items that teammates claim and complete | Where it lives ~/.claude/tasks/, kept after the session ends |
Mailbox | What it does Carries messages between agents | Where it lives A JSON file per agent under ~/.claude/teams/ |
Use a team when the parts of the work can run apart
Claude Code's docs name four strong uses:
- Research and review: teammates look at different sides of a problem, then share and challenge what they found.
- New modules or features: each teammate owns a separate piece.
- Debugging with competing ideas: teammates test different causes at the same time and argue them out.
- Changes across layers: one teammate each for the frontend, the backend and the tests.
- Skip a team for work that must happen in order, edits to the same file, or tasks with many links between them. One session or subagents do that better.
Agent teams compared with subagents
Subagents report a result back to the agent that started them. Teammates share a task list, claim work and talk to each other.
| What you compare | Subagents | Agent teams |
|---|---|---|
Context | Subagents Own context window; results return to the caller | Agent teams Own context window; fully independent |
Communication | Subagents Return a result to the caller | Agent teams Teammates message each other directly |
Coordination | Subagents The main agent manages all work | Agent teams Messages plus a shared task list |
Best for | Subagents Focused tasks where only the result matters | Agent teams Complex work that needs discussion |
Token cost | Subagents Lower: results are summarized back | Agent teams Higher: each teammate is a separate instance |
How to start your first Claude Code agent team
- Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to 1 in your shell, or in the env block of settings.json.
- Start an interactive Claude Code session. Teams do not form in claude -p runs or the Agent SDK.
- Describe the task and the teammates in plain words, for example: Spawn three teammates to explore this from different angles: one on UX, one on technical architecture, one playing devil's advocate.
- Watch the agent panel under the prompt. Use the arrow keys to pick a teammate and Enter to read its work or message it.
- Press Ctrl+T to show the task list. The lead combines the results when the teammates finish.
- If Claude started subagents instead, ask again and say agent team. Subagents show in the same panel, so the panel alone does not prove a team formed.
Claude Code agent teams in four steps
The four steps, in the order you take them.

- Step 1: Turn on teams
- Step 2: Ask for teammates
- Step 3: Track the task list
- Step 4: Combine results
See teammates in one terminal or in split panes
Split panes do not work in VS Code's built-in terminal, Windows Terminal or Ghostty.
| Setting | What you see | What it needs |
|---|---|---|
in-process (default) | What you see All teammates inside your main terminal; pick one in the agent panel | What it needs Any terminal |
auto | What you see Split panes when you are already in tmux or iTerm2 with the it2 tool; otherwise in-process | What it needs Nothing extra |
tmux | What you see Split panes, using tmux or iTerm2, whichever your terminal has | What it needs tmux, or iTerm2 |
iterm2 | What you see Native iTerm2 split panes | What it needs iTerm2 with the it2 tool and its Python API turned on |
Steer the team while it works
- Pick each teammate's model in the prompt, such as Use Sonnet for each teammate. Otherwise a teammate uses its subagent definition's model, then CLAUDE_CODE_SUBAGENT_MODEL, then the lead's model. With CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1 on v2.1.257 or later, every teammate uses CLAUDE_CODE_SUBAGENT_MODEL, or the lead's model when it is unset or inherit, whatever the prompt says.
- Reuse a role by naming a subagent definition: Spawn a teammate using the security-reviewer agent type to audit the auth module.
- Put the lead in plan mode before you ask for a teammate, and that teammate plans first too. Claude Code approves its plan as soon as it arrives, unless you changed the teammate's mode yourself.
- Assign a task to a named teammate through the lead, or let teammates claim the next open task. A task waiting on another task shows as blocked.
- Ask a teammate to shut down by name, such as Ask the researcher teammate to shut down. It finishes its current step first.
- Add TeammateIdle, TaskCreated or TaskCompleted hooks to check work. A hook that exits with code 2 sends feedback: it keeps an idle teammate working, or blocks a task from being created or marked complete.
Start with three to five teammates to keep tokens down
Every teammate is a separate Claude Code session with its own context window, so token use grows with each one you add. Claude Code's docs give this guidance:
- Start with 3 to 5 teammates for most work. For 15 independent tasks, 3 teammates is a good start.
- Give each teammate 5 to 6 tasks, each a self-contained piece such as a function, a test file or a review.
- Teammates read CLAUDE.md, MCP servers and skills, but not the lead's chat. Put the task details in the request that starts them.
- Give each teammate its own files. Two teammates that edit one file overwrite each other.
- If you are new to teams, start with review or research, where no one writes code.
- If the lead starts doing the work itself, tell it: Wait for your teammates to complete their tasks before proceeding.
Agent team limits to know first
- While agent teams are on, a subagent that Claude names starts as a teammate. A team can then form when you did not ask for one.
- /resume and /rewind do not bring back in-process teammates. Ask the lead to start new ones.
- A teammate sometimes fails to mark its task done, which blocks the tasks after it.
- A session has one team. Teammates cannot start their own teams, and the lead cannot hand over its role.
- Each new teammate starts in the lead's permission mode, bypass permissions included. You cannot set a different mode when it starts.
Steal this workflow
Run this guide in your own assistant. The prompt carries the guide link and the workflow summary, so the assistant can adapt it to your project.
Read the guide "Claude Code agent teams: how to turn them on, run a team and keep the cost down" at https://better-design.com/blog/claude-code-agent-teams and help me apply it to my project.
Claude Code agent teams run several Claude Code sessions together: one lead assigns work, and teammates each work in their own context window and message each other directly. The feature is experimental and off by default; turn it on with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.
Start by asking what I am building and which tools I use. Then walk me through the workflow step by step, adapted to my answers.Claude and ChatGPT open with the prompt filled in. Gemini copies the prompt to your clipboard first, so paste it when the app opens.
Questions
How do I turn on Claude Code agent teams?
Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to 1 in your shell or in the env block of settings.json, then ask Claude for teammates in an interactive session.
What is the difference between agent teams and subagents?
Subagents report a result back to the main agent. Teammates in an agent team share a task list and message each other directly, at a higher token cost.
Can I choose the model for each teammate?
Yes. Name it in your request, such as Use Sonnet for each teammate, or name a subagent definition that sets a model.
How many teammates should a Claude Code agent team have?
Claude Code's docs suggest 3 to 5 teammates for most work, with 5 to 6 tasks each. There is no hard limit, but cost grows with each teammate.
Can teammates use split panes in VS Code?
No. Split panes need tmux or iTerm2 and do not work in VS Code's built-in terminal, Windows Terminal or Ghostty. The default in-process mode works in any terminal.
Where these Claude Code agent teams facts come from
Each fact comes from the pages listed here, read on November 13, 2026. Products change, so check those pages for the current version.
Related
Give the team a design system
A coding agent such as Claude Code, Cursor or Codex can build your interface in your own code. Better Design gives that agent, and each teammate, a design system, interface principles and review rules, so the result looks designed.