Complete documentation for Claude Code agent teams — coordinating multiple Claude Code instances working in parallel, with shared task lists, inter-agent messaging, and team lead/teammate architecture. Load when discussing parallel Claude sessions, multi-agent coordination, teammate spawning, or task delegation across sessions.
This skill provides the complete official documentation for Claude Code agent teams — coordinating multiple Claude Code instances working together, with shared tasks, inter-agent messaging, and centralized management.
Agent teams are disabled by default. Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS in settings or the environment:
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
| | Subagents | Agent teams | | :---------------- | :----------------------------------------------- | :-------------------------------------------------- | | Context | Own context window; results return to the caller | Own context window; fully independent | | Communication | Report results back to the main agent only | Teammates message each other directly | | Coordination | Main agent manages all work | Shared task list with self-coordination | | Best for | Focused tasks where only the result matters | Complex work requiring discussion and collaboration | | Token cost | Lower: results summarized back to main context | Higher: each teammate is a separate Claude instance |
| Component | Role | | :------------ | :---------------------------------------------------------------------- | | Team lead | The main Claude Code session that spawns teammates and coordinates work | | Teammates | Separate Claude Code instances that each work on assigned tasks | | Task list | Shared list of work items that teammates claim and complete | | Mailbox | Messaging system for communication between agents |
| Mode | Description | Requires |
| :------------ | :------------------------------------------------------------------ | :-------------------- |
| "in-process" | All teammates run inside your main terminal (default since v2.1.179) | Any terminal |
| "auto" | Split panes when inside tmux/iTerm2, falls back to in-process | tmux or iTerm2 |
| "tmux" | Split-pane mode, auto-detects tmux or iTerm2 | tmux or iTerm2 |
| "iterm2" | iTerm2 native split panes explicitly (v2.1.186+) | it2 CLI + Python API |
Set via ~/.claude/settings.json:
{ "teammateMode": "auto" }
Or per session: claude --teammate-mode auto
| Path | Contents |
| :--- | :--- |
| ~/.claude/teams/{team-name}/config.json | Runtime state (session IDs, pane IDs) — do not hand-edit |
| ~/.claude/tasks/{team-name}/ | Task list — persists across session resumes |
Team name is session- + first 8 characters of the session ID. Team config directory is removed on session end; task directory persists (governed by cleanupPeriodDays).
| Key | Action |
| :-- | :----- |
| Up/Down arrows | Select a teammate in the agent panel |
| Enter | Open selected teammate's transcript; type to message directly |
| Escape | Interrupt the selected teammate's current turn |
| x on selected | Stop the selected teammate |
| Ctrl+T | Toggle the task list |
Idle teammate rows hide after 30 seconds and reappear on the next turn (v2.1.181+).
| Hook | When | How to block |
| :--- | :--- | :--- |
| TeammateIdle | Teammate about to go idle | Exit code 2 — sends feedback, keeps teammate working |
| TaskCreated | Task being created | Exit code 2 — prevents creation, sends feedback |
| TaskCompleted | Task being marked complete | Exit code 2 — prevents completion, sends feedback |
--dangerously-skip-permissions, all teammates do tooReference a subagent type by name when asking Claude to spawn:
Spawn a teammate using the security-reviewer agent type to audit the auth module.
tools allowlist and modelSendMessage, task management) are always available even when tools restricts othersskills and mcpServers frontmatter fields are not applied when running as a teammate| Practice | Guidance | | :--- | :--- | | Team size | Start with 3–5 teammates; 5–6 tasks per teammate keeps everyone productive | | Task sizing | Self-contained units with a clear deliverable (function, test file, review) | | Context | Include task-specific details in the spawn prompt; teammates don't inherit lead's history | | File conflicts | Assign each teammate a different set of files to avoid overwrites | | Lead patience | Tell the lead "wait for your teammates to complete their tasks before proceeding" if it starts implementing itself | | First use | Start with research/review tasks before parallel implementation |
/resume and /rewind don't restore teammates)For the complete official documentation, see the reference files:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer