Skip to main content
Module 2: Multi-Agent 3 / 6
Intermediate S09 Agent Teams Communication

Agent Teams & Communication

Coordinate a lead and independent teammates through a shared task list and mailbox.

March 20, 2026 13 min read
Experimental Curriculum reviewed: Oct 21, 2026

What You’ll Learn

Agent Teams are Claude Code’s experimental mode for sustained collaboration among multiple independent sessions. This session focuses on the public operating model:

  • one lead coordinates the team;
  • teammates work in separate context windows;
  • a shared task list tracks ownership and dependencies;
  • a mailbox carries direct messages between agents.

Agent Teams are experimental and disabled by default. The workflow below is verified against the official documentation on October 21, 2026 (Claude Code 2.1.305).

The Public Team Model

ComponentResponsibility
Team leadSpawns teammates, coordinates work, assigns tasks, and synthesizes the result
TeammatesIndependent Claude Code sessions that investigate or implement bounded work
Shared task listHolds pending, in-progress, and completed tasks, including dependencies
MailboxDelivers messages between the lead and teammates, or directly between teammates

A teammate receives the project context it would normally load, such as CLAUDE.md, skills, and MCP servers, plus its spawn prompt. It does not inherit the lead’s conversation history. Put every task-specific fact needed for success in the spawn prompt or a message.

A teammate runs on the model your spawn prompt names; otherwise Claude Code uses its subagent definition’s model, then CLAUDE_CODE_SUBAGENT_MODEL, then the lead’s current model (this order applies since Claude Code 2.1.251). The old teammateDefaultModel setting was removed in Claude Code 2.1.234, so name the model in the prompt when it matters.

Agent Teams vs. Subagents

Use a subagent when a focused worker can return one result to its caller. Use an Agent Team when workers need to exchange findings, challenge one another, claim work, or stay independently addressable.

SubagentAgent Team teammate
ContextOwn context window; the result returns to the callerOwn context window; a fully independent session
CommunicationReturns a result to the caller; subagents Claude named can also message each otherTeammates message the lead and each other directly
CoordinationMain agent manages the workMessages, plus a shared task list when the agents have the Task tools
CostLowerHigher; every teammate is a separate Claude instance with its own context

Before you form a team, check whether a lighter option is enough: a subagent, or cross-session messaging between sessions you run yourself.

Enable Agent Teams

Set the experimental flag in your environment or settings. On current models, also opt in to the Task tools: without them there is no shared task list, and agents coordinate through messages only (see Session 7).

{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
    "CLAUDE_CODE_ENABLE_TODO_TOOLS": "1"
  }
}

Teams need an interactive session. In -p runs and Agent SDK sessions, Claude doesn’t spawn teammates. Enabling the flag also changes ordinary delegation: while it is on, a subagent that Claude spawns with a name launches as a teammate, so a team can form even when you didn’t ask for one.

Then describe the team and its boundaries in natural language:

Create an agent team with three teammates:
- researcher: map the current authentication flow
- reviewer: look for security and permission risks
- tester: identify missing tests

Give each teammate a separate task. Ask them to share evidence with one another,
then wait for all tasks to finish before synthesizing the result.

With the flag set, every session has one implicit team, and the session you start is its lead (Claude Code 2.1.178 and later). Claude launches a teammate by calling the Agent tool with a name; there is no public TeamCreate or TeamDelete tool to script around. If Claude used plain subagents instead, ask again and explicitly request an agent team.

Coordinate Through Tasks and Messages

The lead can assign a task explicitly, while a teammate that finishes its work can claim the next unassigned, unblocked task. Dependencies keep work pending until prerequisites are complete, and Claude Code unblocks dependent tasks automatically when the task they wait on is completed. Agents without the Task tools skip the task list and coordinate through messages.

Use messages for information that changes another agent’s work:

Tell reviewer that researcher found token parsing in src/auth/token.ts.
Ask tester to validate the same boundary and report the failing command.

Messages are delivered automatically; the lead doesn’t poll. Each message goes to one named recipient, so reaching everyone means one message per teammate. When a teammate finishes and goes idle, it notifies the lead and includes its final answer. The task list records work state; it is not a substitute for explaining acceptance criteria, file ownership, or evidence.

A Reliable Operating Pattern

  1. Split work into independent deliverables with distinct file ownership.
  2. Give each teammate the relevant paths, constraints, and definition of done.
  3. Put dependencies in the shared task list instead of relying on timing.
  4. Ask teammates to send evidence, not only conclusions.
  5. Wait for all active work to finish, then have the lead reconcile conflicts and verify the combined result.

Start with three to five teammates only when parallelism is worth the coordination and token cost. Sequential work, tightly coupled tasks, and same-file edits are usually better handled in one session.

Lifecycle and Limits

  • In the default in-process display, select a teammate in the agent panel below the prompt and press Enter to view and message it; x stops the selected teammate and Ctrl+T toggles the task list. Split panes (tmux or iTerm2) are opt-in through the teammateMode setting.
  • Teammates start with the lead’s permission mode (except dontAsk), and their permission prompts appear in the lead session. One agent cannot approve a prompt on your behalf or relay a denied action to another agent.
  • Ask the lead to shut a teammate down when its work is finished; the teammate can accept, or reject with an explanation.
  • Claude Code removes the team’s runtime config when the session ends. The task list directory stays on disk until the normal cleanupPeriodDays cleanup. Don’t edit or pre-author these files.
  • Documented limitations: /resume and /rewind don’t restore in-process teammates, task status can lag, shutdown can be slow, there is one team per session, teammates cannot spawn teammates of their own, and the lead can’t be changed.

The durable contract is the behavior above: lead, teammates, shared tasks, and messaging. The official reference documents where team and task files live, but describes them as runtime state that Claude Code overwrites. Build on the behavior, not on the files.

Official Sources

Next Session

Next, turn collaboration into an explicit protocol: ownership, evidence, handoff, and completion rules.