Guide for orchestrating and controlling Claude Code agent teams. Use when working with or managing multi-agent team coordination in Claude Code, including: (1) Creating and starting agent teams, (2) Controlling teammates (display modes, task assignment, delegation), (3) Best practices for parallel work, (4) Troubleshooting team issues. Covers concepts like team lead, teammates, shared task lists, and inter-agent messaging.
| Command | Description |
|---------|-------------|
| Create an agent team... | Spawn teammates for parallel work |
| Clean up the team | Shut down all teammates gracefully |
| Delegate mode | Press Shift+Tab after starting team |
| Shift+Up/Down | Select teammate in in-process mode |
Agent teams are experimental. Enable via environment variable:
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
Or set the environment variable in your shell before running Claude Code.
Start a team by describing parallel work that would benefit from multiple perspectives:
Create an agent team to explore this from different angles: one
teammate on UX, one on technical architecture, one playing devil's advocate.
Claude creates:
Shift+Up/Down to select a teammateteammateMode in settings.json:{ "teammateMode": "in-process" }
claude --teammate-mode in-processPrevents the lead from implementing tasks itself, keeping it focused on coordination:
Shift+Tab to cycle into delegate modeFor complex tasks:
Spawn an architect teammate to refactor the authentication module.
Require plan approval before they make any changes.
Teammates don't inherit lead's conversation history. Include details in spawn prompt:
Spawn a security reviewer teammate with the prompt: "Review the authentication
module at src/auth/ for security vulnerabilities. Focus on token handling,
session management, and input validation..."
Break work so each teammate owns different files. Two teammates editing same file causes overwrites.
Check progress, redirect approaches, synthesize findings. Don't leave teams unattended too long.
When finished:
Clean up the team
The lead removes shared team resources. Always use the lead for cleanup, not teammates.
| Issue | Solution |
|-------|----------|
| Teammates not visible | Press Shift+Down to cycle; ensure task warrants a team |
| Too many permission prompts | Pre-approve operations in permission settings |
| Teammates stopping on errors | Check output, give additional instructions, or spawn replacement |
| Lead shuts down early | Tell lead to keep going and wait for teammates |
| Orphaned tmux sessions | tmux ls then tmux kill-session -t <name> |
Best for:
Not ideal for:
Create an agent team to review PR #142. Spawn three reviewers:
- One focused on security implications
- One checking performance impact
- One validating test coverage
Have them each review and report findings.
Users report the app exits after one message instead of staying connected.
Spawn 5 agent teammates to investigate different hypotheses. Have them talk
to each other to try to disprove each other's theories.
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