Agent Teams - Parallel Orchestration Utility
Coordinate multiple independent Claude Code sessions. Each teammate has own context window, loads project context (CLAUDE.md, skills, agents), communicates via shared task list and messaging.
Requires: Agent Teams enabled. Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in settings.json env.
Requires: CLI terminal — TaskCreate/TaskUpdate/TaskGet/TaskList and TeamCreate/TeamDelete are disabled in VSCode extension (isTTY check). Agent Teams CANNOT run in VSCode.
Model requirement: All teammates must run Opus 4.6 (Agent Teams constraint).
Usage
/vc:team <template> <context> [flags]
Templates: research, execute, review, debug
Flags:
--devs N | --researchers N | --reviewers N | --debuggers N -- team size
--plan-approval / --no-plan-approval -- plan gate (default: on for execute)
--delegate -- lead only coordinates, never touches code
--worktree -- use git worktrees for implementation isolation (default: on for execute)
Execution Protocol
Pre-flight (MANDATORY -- merged into step 2 of every template):
- Step 2 of every template calls
TeamCreate(team_name: "...", ...). Do NOT check whether the tool exists first -- just call it.
- If the call SUCCEEDS: continue with the template.
- If the call returns an ERROR or is unrecognized: STOP. Tell user: "Agent Teams requires
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in settings.json. Team mode is not available."
- Do NOT fall back to subagents.
/vc:team MUST use Agent Teams or abort.
- Ensure
TeamCreate was called before spawning teammates -- team association happens via session context.
When activated, first confirm team creation if the user has not already explicitly approved using agent teams for this task.
Do not use this skill to bypass the repo's normal human approval gates.
Execute the tool calls in order only after team usage is approved. Report progress after each major step.
--delegate Mode
When --delegate flag is passed:
- Lead enters delegate mode (
Shift+Tab after TeamCreate)
- Lead ONLY: spawns teammates, manages tasks, sends messages, synthesizes reports
- Lead NEVER: edits files, runs tests, executes git commands directly
- For execute Step 7 MERGE: spawn a dedicated merge teammate instead of lead doing it
- For all templates: lead coordinates and reports, delegates ALL implementation work
Tool Reference (Quick)
Agent Tool (spawn teammates)
Agent(
subagent_type: "research-agent" | "execute-agent" | "code-reviewer" | "debugger" | "tester" | ...,
description: "short task summary",
prompt: "full instructions + CK Context Block",
model: "opus", # Required for Agent Teams teammates
run_in_background: true, # Non-blocking spawn
isolation: "worktree" # Git worktree isolation (execute devs)
)
Note: Task was renamed to Agent in v2.1.63. Both names work; prefer Agent for new code.
Team Management Tools
| Tool |
Purpose |
Params |
TeamCreate |
Create team + task list |
team_name, description |
TeamDelete |
Remove team resources |
none -- just call it |
TaskCreate |
Create work item |
subject, description, priority, addBlockedBy, addBlocks |
TaskUpdate |
Claim/complete task |
taskId, status, owner, metadata |
TaskGet |
Full task details |
taskId |
TaskList |
All tasks (minimal fields) |
none |
SendMessage |
Inter-agent messaging |
type, to/recipient, message |
SendMessage Types
| Type |
Purpose |
message |
DM to one teammate (requires recipient) |
broadcast |
Send to ALL teammates (use sparingly) |
shutdown_request |
Ask teammate to gracefully exit |
shutdown_response |
Teammate approves/rejects shutdown (requires request_id) |
plan_approval_response |
Lead approves/rejects teammate plan (requires request_id) |
CK Context Block
Every teammate spawn prompt MUST include this context at the end:
CK Context:
- Work dir: {CK_PROJECT_ROOT or CWD}
- Feature: {CK_FEATURE or "none"}
- Reports: {CK_REPORTS_PATH or "process/general-plans/reports/"}
- Plans: {CK_PLANS_PATH or "process/general-plans/active/"}
- Branch: {CK_GIT_BRANCH or current branch}
- Naming: {CK_NAME_PATTERN or "YYMMDD-HHMM"}
- Active plan: {CK_ACTIVE_PLAN or "none"}
- Commits: conventional (feat:, fix:, docs:, refactor:, test:, chore:)
- Refer to teammates by NAME, not agent ID
ON /vc:team research <topic> [--researchers N]:
Coordinates parallel research-agent teammates plus shared helper skills where useful.
IMMEDIATELY execute in order:
Derive N angles from <topic> (default N=3):
- Angle 1: Architecture, patterns, proven approaches
- Angle 2: Alternatives, competing solutions, trade-offs
- Angle 3: Risks, edge cases, failure modes, security
- (If N>3, derive additional angles from topic context)
CALL TeamCreate(team_name: "<topic-slug>") after user approval to use agent teams
CALL TaskCreate x N -- one per angle:
- Subject:
Research: <angle-title>
- Description:
Investigate <angle> for topic: <topic>. Save report to: {CK_REPORTS_PATH}/research-agent-{N}-{CK_NAME_PATTERN}-{topic-slug}.md. Format: Executive summary, key findings, evidence, contradictions, unresolved questions. Do not recommend implementations. Mark task completed when done. Send findings summary to lead.
SPAWN teammates x N via Agent tool:
subagent_type: "research-agent", model: "opus"
run_in_background: true (non-blocking -- spawn all N concurrently)
name: "research-agent-{N}"
- Prompt: task description + CK Context Block
MONITOR via TaskCompleted hook events + TaskList fallback:
- TaskCompleted events auto-notify when
research-agent subagents finish
- Fallback: Check TaskList if no event received in 60s
- If stuck >5 min, message teammate directly
READ all research-agent reports from {CK_REPORTS_PATH}/
SYNTHESIZE into: {CK_REPORTS_PATH}/research-summary-{CK_NAME_PATTERN}-{topic-slug}.md
Format: exec summary, key findings, comparative analysis, trade-off evidence, unresolved questions, decision inputs for the orchestrator.
SHUTDOWN: SendMessage(type: "shutdown_request") to each teammate
CLEANUP: TeamDelete (no parameters -- just call it)
REPORT: Tell user Research complete. Summary: {path}. N reports generated.
FOLLOW-UP: If durable process/context learnings surfaced, suggest ENTER UPDATE PROCESS MODE.
ON /vc:team execute <plan-path> [--devs N]:
Coordinates approved-plan execution with parallel execute-agent teammates, testing, review, and final reporting without introducing a separate execution owner.
Do not use this template to flatten an entire multi-phase program into one execution wave. If the
selected work is really a phase program, the lead must first pick one current phase plan and execute
that phase only. See process/development-protocols/phase-programs.md.
IMMEDIATELY execute in order:
PRE-FLIGHT APPROVAL CHECK:
- Require one explicit approved plan file path under
process/general-plans/active/ or process/features/*/active/
- If the user supplied only a description or an unapproved draft, STOP and tell the user to create/select a plan first, then return with
ENTER EXECUTE MODE
- Do not use
vc:team execute to bypass the repo's explicit execute approval gate
- If the selected plan is an umbrella/orchestration plan for a large program, STOP and require
one explicit current phase plan instead of executing the whole program at once
READ the selected plan and parse it into N independent task groups with file ownership boundaries
CALL TeamCreate(team_name: "<feature-slug>") after user approval to use agent teams
CALL TaskCreate x (N + 1) -- N dev tasks + 1 tester task:
- Dev tasks: include
File ownership: <glob patterns> -- NO overlap between devs
- Tester task:
addBlockedBy all dev task IDs
- Each task description includes: implementation scope, file ownership, acceptance criteria
SPAWN developer teammates x N via Agent tool:
subagent_type: "execute-agent", model: "opus"
isolation: "worktree" -- each dev gets isolated git worktree (no file conflicts)
run_in_background: true
name: "dev-{N}"
- Prompt: task description + exact plan path + CK Context Block
- If
--plan-approval: require a short task-level implementation outline before coding, but do not reopen the top-level execute approval gate
- REVIEW and APPROVE each developer's task outline via
plan_approval_response before code changes
MONITOR dev completion via TaskCompleted events:
- TaskCompleted hook notifies when each dev task finishes
- When all N dev tasks show completed, spawn tester immediately
- TeammateIdle events confirm devs are available for shutdown
- Fallback: Check TaskList if no events received in 60s
- Spawn tester:
Agent(subagent_type: "tester", model: "opus", name: "tester")
- Tester runs full test suite, reports pass/fail
MERGE worktree branches (if isolation: "worktree" was used):
- Discover branches: check Agent result for branch names, or
git worktree list
- In
--delegate mode, spawn a dedicated merge teammate for this step
- Otherwise, for each dev branch:
git merge <dev-branch> --no-ff
- If conflict: resolve manually (lead owns shared files), then
git add . && git merge --continue
- Cleanup:
git worktree remove <path> for each worktree
- Verify:
git log --oneline --graph to confirm merge topology
DOCS SYNC EVAL:
Docs impact: [none|minor|major]
Action: [no update needed -- <reason>] | [updated <page>] | [needs separate PR]
SHUTDOWN all teammates via SendMessage(type: "shutdown_request")
CLEANUP: TeamDelete (no parameters -- just call it)
REPORT: Tell user what was implemented, test results, docs impact, and any remaining concerns.
FOLLOW-UP: If durable process/context learnings surfaced, suggest ENTER UPDATE PROCESS MODE.
ON /vc:team review <scope> [--reviewers N]:
Coordinates parallel code-reviewer teammates using the absorbed review methodology now owned by the agent path.
IMMEDIATELY execute in order:
DERIVE N review focuses from <scope> (default N=3):
- Focus 1: Security -- vulnerabilities, auth, input validation, OWASP
- Focus 2: Performance -- bottlenecks, memory, complexity, scaling
- Focus 3: Test coverage -- gaps, edge cases, error paths
- (If N>3, derive from scope: architecture, DX, accessibility, etc.)
CALL TeamCreate(team_name: "review-<scope-slug>") after user approval to use agent teams
CALL TaskCreate x N -- one per focus:
- Subject:
Review: <focus-title>
- Description:
Review <scope> for <focus>. Output severity-rated findings only. Format: [CRITICAL|IMPORTANT|MODERATE] <finding> -- <evidence> -- <recommendation>. No "seems" or "probably" -- concrete evidence only. Save to: {CK_REPORTS_PATH}/reviewer-{N}-{CK_NAME_PATTERN}-{scope-slug}.md. Mark task completed when done.
SPAWN reviewers x N via Agent tool:
subagent_type: "code-reviewer", model: "opus"
run_in_background: true
name: "reviewer-{N}"
- Prompt: task description + CK Context Block
MONITOR via TaskCompleted hook events + TaskList fallback:
- TaskCompleted events auto-notify when reviewers finish
- Fallback: Check TaskList if no event received in 60s
SYNTHESIZE into: {CK_REPORTS_PATH}/review-{scope-slug}.md
- Deduplicate findings across reviewers
- Prioritize by severity: CRITICAL > IMPORTANT > MODERATE
- Create action items list with owners
SHUTDOWN all teammates via SendMessage(type: "shutdown_request")
CLEANUP: TeamDelete (no parameters -- just call it)
REPORT: Tell user Review complete. {X} findings ({Y} critical). Report: {path}.
FOLLOW-UP: If the review changes durable process/context guidance, suggest ENTER UPDATE PROCESS MODE.
ON /vc:team debug <issue> [--debuggers N]:
Coordinates parallel debugger teammates using the absorbed root-cause-first debug workflow now owned by the debugger path.
IMMEDIATELY execute in order:
GENERATE N competing hypotheses from <issue> (default N=3):
- Each hypothesis must be independently testable
- Each must predict different observable symptoms
- Frame as: "If , then we should see "
CALL TeamCreate(team_name: "debug-<issue-slug>")
CALL TaskCreate x N -- one per hypothesis:
- Subject:
Debug: Test hypothesis -- <theory>
- Description:
Investigate hypothesis: <theory>. For issue: <issue>. ADVERSARIAL: actively try to disprove other theories. Message other debuggers to challenge findings. Report evidence FOR and AGAINST your theory. Save findings to: {CK_REPORTS_PATH}/debugger-{N}-{CK_NAME_PATTERN}-{issue-slug}.md. Mark task completed when done.
SPAWN debugger teammates x N via Agent tool:
subagent_type: "debugger", model: "opus"
run_in_background: true
name: "debugger-{N}"
- Prompt: task description + CK Context Block
MONITOR via TaskCompleted events. Debuggers should message each other -- let them converge.
- TaskCompleted events notify as each hypothesis is tested
- TeammateIdle events indicate debugger awaiting peer input
- Fallback: Check TaskList if no events in 60s
READ all debugger reports. Identify surviving theory as root cause.
WRITE root cause report: {CK_REPORTS_PATH}/debug-{issue-slug}.md
Format: Root cause, evidence chain, disproven hypotheses, recommended fix.
SHUTDOWN all teammates via SendMessage(type: "shutdown_request")
CLEANUP: TeamDelete (no parameters -- just call it)
REPORT: Tell user Debug complete. Root cause: <summary>. Report: {path}.
FOLLOW-UP: If the debug session produced durable process/context learnings, suggest ENTER UPDATE PROCESS MODE.
When to Use Agent Teams vs Subagents
| Scenario |
Subagents (Agent tool) |
Agent Teams |
| Focused task (test, lint, single review) |
Yes |
Overkill |
| Sequential chain (plan -> code -> test) |
Yes |
No |
| 3+ independent parallel workstreams |
Maybe |
Yes |
| Competing debug hypotheses |
No |
Yes |
| Cross-layer work (FE + BE + tests) |
Maybe |
Yes |
| Workers need to discuss/challenge findings |
No |
Yes |
| Token budget is tight |
Yes |
No (high cost) |
Token Budget
| Template |
Estimated Tokens |
Notes |
| Research (3) |
~150K-300K |
Read-only, moderate cost |
| Execute (4) |
~400K-800K |
Highest cost -- code generation |
| Review (3) |
~100K-200K |
Read-only, moderate cost |
| Debug (3) |
~200K-400K |
Mixed read/execute |
Agent Memory
Teammates with memory: project in their agent definition retain learnings across team sessions. Memory persists in .claude/agent-memory/<name>/ (gitignored). Useful for:
- Code reviewer remembering project conventions
- Debugger recalling past failure patterns
- Tester tracking flaky tests and coverage gaps
- Researcher accumulating domain knowledge
Memory persists after team cleanup -- it's in .claude/agent-memory/, not ~/.claude/teams/.
Worktree Isolation (Execute Template)
For implementation teams, isolation: "worktree" on the Agent tool gives each dev:
- Own git worktree -- isolated working directory, staging area, HEAD
- Own branch -- auto-created, returned in agent result
- No file conflicts -- devs can edit same files independently
- Safe parallel editing --
.git dir shared, everything else isolated
After all devs complete, lead merges branches sequentially. This is the safest pattern for parallel code changes.
Error Recovery
- Check status:
Shift+Up/Down (in-process) or click pane (split)
- Redirect: Send direct message with corrective instructions
- Replace: Shut down failed teammate, spawn replacement for same task
- Reassign:
TaskUpdate stuck task to unblock dependents
Abort Team
Shut down all teammates. Then call TeamDelete (no parameters).
If unresponsive: close terminal or kill session. Clean orphaned configs at ~/.claude/teams/ manually.
Display Modes
- auto (default): split panes if in tmux, otherwise in-process
- in-process: all in one terminal.
Shift+Up/Down navigate. Ctrl+T task list.
- tmux/split: each teammate own pane. Requires tmux or iTerm2.
Rules Reference
See process/development-protocols/orchestration.md for teammate coordination, status handling, and context-isolation rules.
v3.0.0: Agent tool migration, worktree isolation for execute devs, run_in_background spawning, updated model requirements.
1---2name: vc-team-23description: Orchestrate Agent Teams for parallel multi-session collaboration. Use for research, implementation, review, and debug workflows requiring independent teammates.4---56# Agent Teams - Parallel Orchestration Utility78Coordinate multiple independent Claude Code sessions. Each teammate has own context window, loads project context (CLAUDE.md, skills, agents), communicates via shared task list and messaging.910**Requires:** Agent Teams enabled. Set `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in settings.json env.11**Requires:** CLI terminal — `TaskCreate`/`TaskUpdate`/`TaskGet`/`TaskList` and `TeamCreate`/`TeamDelete` are **disabled in VSCode extension** (`isTTY` check). Agent Teams CANNOT run in VSCode.12**Model requirement:** All teammates must run Opus 4.6 (Agent Teams constraint).1314## Usage1516```17/vc:team <template> <context> [flags]18```1920**Templates:** `research`, `execute`, `review`, `debug`2122**Flags:**23- `--devs N` | `--researchers N` | `--reviewers N` | `--debuggers N` -- team size24- `--plan-approval` / `--no-plan-approval` -- plan gate (default: on for execute)25- `--delegate` -- lead only coordinates, never touches code26- `--worktree` -- use git worktrees for implementation isolation (default: on for execute)2728## Execution Protocol2930**Pre-flight (MANDATORY -- merged into step 2 of every template):**311. Step 2 of every template calls `TeamCreate(team_name: "...", ...)`. Do NOT check whether the tool exists first -- just call it.322. If the call SUCCEEDS: continue with the template.333. If the call returns an ERROR or is unrecognized: **STOP. Tell user:** "Agent Teams requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in settings.json. Team mode is not available."344. Do NOT fall back to subagents. `/vc:team` MUST use Agent Teams or abort.355. Ensure `TeamCreate` was called before spawning teammates -- team association happens via session context.3637When activated, first confirm team creation if the user has not already explicitly approved using agent teams for this task.38Do not use this skill to bypass the repo's normal human approval gates.39Execute the tool calls in order only after team usage is approved. Report progress after each major step.4041### --delegate Mode4243When `--delegate` flag is passed:44- Lead enters delegate mode (`Shift+Tab` after TeamCreate)45- Lead ONLY: spawns teammates, manages tasks, sends messages, synthesizes reports46- Lead NEVER: edits files, runs tests, executes git commands directly47- For execute Step 7 MERGE: spawn a dedicated merge teammate instead of lead doing it48- For all templates: lead coordinates and reports, delegates ALL implementation work4950---5152## Tool Reference (Quick)5354### Agent Tool (spawn teammates)5556```57Agent(58 subagent_type: "research-agent" | "execute-agent" | "code-reviewer" | "debugger" | "tester" | ...,59 description: "short task summary",60 prompt: "full instructions + CK Context Block",61 model: "opus", # Required for Agent Teams teammates62 run_in_background: true, # Non-blocking spawn63 isolation: "worktree" # Git worktree isolation (execute devs)64)65```6667**Note:** `Task` was renamed to `Agent` in v2.1.63. Both names work; prefer `Agent` for new code.6869### Team Management Tools7071| Tool | Purpose | Params |72|------|---------|--------|73| `TeamCreate` | Create team + task list | `team_name`, `description` |74| `TeamDelete` | Remove team resources | *none* -- just call it |75| `TaskCreate` | Create work item | `subject`, `description`, `priority`, `addBlockedBy`, `addBlocks` |76| `TaskUpdate` | Claim/complete task | `taskId`, `status`, `owner`, `metadata` |77| `TaskGet` | Full task details | `taskId` |78| `TaskList` | All tasks (minimal fields) | *none* |79| `SendMessage` | Inter-agent messaging | `type`, `to`/`recipient`, `message` |8081### SendMessage Types8283| Type | Purpose |84|------|---------|85| `message` | DM to one teammate (requires `recipient`) |86| `broadcast` | Send to ALL teammates (use sparingly) |87| `shutdown_request` | Ask teammate to gracefully exit |88| `shutdown_response` | Teammate approves/rejects shutdown (requires `request_id`) |89| `plan_approval_response` | Lead approves/rejects teammate plan (requires `request_id`) |9091---9293## CK Context Block9495Every teammate spawn prompt MUST include this context at the end:9697```98CK Context:99- Work dir: {CK_PROJECT_ROOT or CWD}100- Feature: {CK_FEATURE or "none"}101- Reports: {CK_REPORTS_PATH or "process/general-plans/reports/"}102- Plans: {CK_PLANS_PATH or "process/general-plans/active/"}103- Branch: {CK_GIT_BRANCH or current branch}104- Naming: {CK_NAME_PATTERN or "YYMMDD-HHMM"}105- Active plan: {CK_ACTIVE_PLAN or "none"}106- Commits: conventional (feat:, fix:, docs:, refactor:, test:, chore:)107- Refer to teammates by NAME, not agent ID108```109110---111112## ON `/vc:team research <topic>` [--researchers N]:113114*Coordinates parallel `research-agent` teammates plus shared helper skills where useful.*115116IMMEDIATELY execute in order:1171181. **Derive N angles** from `<topic>` (default N=3):119 - Angle 1: Architecture, patterns, proven approaches120 - Angle 2: Alternatives, competing solutions, trade-offs121 - Angle 3: Risks, edge cases, failure modes, security122 - (If N>3, derive additional angles from topic context)1231242. **CALL** `TeamCreate(team_name: "<topic-slug>")` after user approval to use agent teams1251263. **CALL** `TaskCreate` x N -- one per angle:127 - Subject: `Research: <angle-title>`128 - Description: `Investigate <angle> for topic: <topic>. Save report to: {CK_REPORTS_PATH}/research-agent-{N}-{CK_NAME_PATTERN}-{topic-slug}.md. Format: Executive summary, key findings, evidence, contradictions, unresolved questions. Do not recommend implementations. Mark task completed when done. Send findings summary to lead.`1291304. **SPAWN** teammates x N via `Agent` tool:131 - `subagent_type: "research-agent"`, `model: "opus"`132 - `run_in_background: true` (non-blocking -- spawn all N concurrently)133 - `name: "research-agent-{N}"`134 - Prompt: task description + CK Context Block1351365. **MONITOR** via TaskCompleted hook events + TaskList fallback:137 - TaskCompleted events auto-notify when `research-agent` subagents finish138 - Fallback: Check TaskList if no event received in 60s139 - If stuck >5 min, message teammate directly1401416. **READ** all `research-agent` reports from `{CK_REPORTS_PATH}/`1421437. **SYNTHESIZE** into: `{CK_REPORTS_PATH}/research-summary-{CK_NAME_PATTERN}-{topic-slug}.md`144 Format: exec summary, key findings, comparative analysis, trade-off evidence, unresolved questions, decision inputs for the orchestrator.1451468. **SHUTDOWN**: `SendMessage(type: "shutdown_request")` to each teammate1471489. **CLEANUP**: `TeamDelete` (no parameters -- just call it)14915010. **REPORT**: Tell user `Research complete. Summary: {path}. N reports generated.`15111. **FOLLOW-UP**: If durable process/context learnings surfaced, suggest `ENTER UPDATE PROCESS MODE`.152153---154155## ON `/vc:team execute <plan-path>` [--devs N]:156157*Coordinates approved-plan execution with parallel `execute-agent` teammates, testing, review, and final reporting without introducing a separate execution owner.*158159Do not use this template to flatten an entire multi-phase program into one execution wave. If the160selected work is really a phase program, the lead must first pick one current phase plan and execute161that phase only. See `process/development-protocols/phase-programs.md`.162163IMMEDIATELY execute in order:1641651. **PRE-FLIGHT APPROVAL CHECK**:166 - Require one explicit approved plan file path under `process/general-plans/active/` or `process/features/*/active/`167 - If the user supplied only a description or an unapproved draft, STOP and tell the user to create/select a plan first, then return with `ENTER EXECUTE MODE`168 - Do not use `vc:team execute` to bypass the repo's explicit execute approval gate169 - If the selected plan is an umbrella/orchestration plan for a large program, STOP and require170 one explicit current phase plan instead of executing the whole program at once1711722. **READ** the selected plan and parse it into N independent task groups with file ownership boundaries1731743. **CALL** `TeamCreate(team_name: "<feature-slug>")` after user approval to use agent teams1751764. **CALL** `TaskCreate` x (N + 1) -- N dev tasks + 1 tester task:177 - Dev tasks: include `File ownership: <glob patterns>` -- NO overlap between devs178 - Tester task: `addBlockedBy` all dev task IDs179 - Each task description includes: implementation scope, file ownership, acceptance criteria1801815. **SPAWN** developer teammates x N via `Agent` tool:182 - `subagent_type: "execute-agent"`, `model: "opus"`183 - `isolation: "worktree"` -- each dev gets isolated git worktree (no file conflicts)184 - `run_in_background: true`185 - `name: "dev-{N}"`186 - Prompt: task description + exact plan path + CK Context Block187 - If `--plan-approval`: require a short task-level implementation outline before coding, but do not reopen the top-level execute approval gate188 - REVIEW and APPROVE each developer's task outline via `plan_approval_response` before code changes1891906. **MONITOR** dev completion via TaskCompleted events:191 - TaskCompleted hook notifies when each dev task finishes192 - When all N dev tasks show completed, spawn tester immediately193 - TeammateIdle events confirm devs are available for shutdown194 - Fallback: Check TaskList if no events received in 60s195 - Spawn tester: `Agent(subagent_type: "tester", model: "opus", name: "tester")`196 - Tester runs full test suite, reports pass/fail1971987. **MERGE** worktree branches (if `isolation: "worktree"` was used):199 - Discover branches: check Agent result for branch names, or `git worktree list`200 - In `--delegate` mode, spawn a dedicated merge teammate for this step201 - Otherwise, for each dev branch: `git merge <dev-branch> --no-ff`202 - If conflict: resolve manually (lead owns shared files), then `git add . && git merge --continue`203 - Cleanup: `git worktree remove <path>` for each worktree204 - Verify: `git log --oneline --graph` to confirm merge topology2052068. **DOCS SYNC EVAL**:207 ```208 Docs impact: [none|minor|major]209 Action: [no update needed -- <reason>] | [updated <page>] | [needs separate PR]210 ```2112129. **SHUTDOWN** all teammates via `SendMessage(type: "shutdown_request")`21310. **CLEANUP**: `TeamDelete` (no parameters -- just call it)21421511. **REPORT**: Tell user what was implemented, test results, docs impact, and any remaining concerns.21612. **FOLLOW-UP**: If durable process/context learnings surfaced, suggest `ENTER UPDATE PROCESS MODE`.217218---219220## ON `/vc:team review <scope>` [--reviewers N]:221222*Coordinates parallel `code-reviewer` teammates using the absorbed review methodology now owned by the agent path.*223224IMMEDIATELY execute in order:2252261. **DERIVE** N review focuses from `<scope>` (default N=3):227 - Focus 1: Security -- vulnerabilities, auth, input validation, OWASP228 - Focus 2: Performance -- bottlenecks, memory, complexity, scaling229 - Focus 3: Test coverage -- gaps, edge cases, error paths230 - (If N>3, derive from scope: architecture, DX, accessibility, etc.)2312322. **CALL** `TeamCreate(team_name: "review-<scope-slug>")` after user approval to use agent teams2332343. **CALL** `TaskCreate` x N -- one per focus:235 - Subject: `Review: <focus-title>`236 - Description: `Review <scope> for <focus>. Output severity-rated findings only. Format: [CRITICAL|IMPORTANT|MODERATE] <finding> -- <evidence> -- <recommendation>. No "seems" or "probably" -- concrete evidence only. Save to: {CK_REPORTS_PATH}/reviewer-{N}-{CK_NAME_PATTERN}-{scope-slug}.md. Mark task completed when done.`2372384. **SPAWN** reviewers x N via `Agent` tool:239 - `subagent_type: "code-reviewer"`, `model: "opus"`240 - `run_in_background: true`241 - `name: "reviewer-{N}"`242 - Prompt: task description + CK Context Block2432445. **MONITOR** via TaskCompleted hook events + TaskList fallback:245 - TaskCompleted events auto-notify when reviewers finish246 - Fallback: Check TaskList if no event received in 60s2472486. **SYNTHESIZE** into: `{CK_REPORTS_PATH}/review-{scope-slug}.md`249 - Deduplicate findings across reviewers250 - Prioritize by severity: CRITICAL > IMPORTANT > MODERATE251 - Create action items list with owners2522537. **SHUTDOWN** all teammates via `SendMessage(type: "shutdown_request")`2548. **CLEANUP**: `TeamDelete` (no parameters -- just call it)2552569. **REPORT**: Tell user `Review complete. {X} findings ({Y} critical). Report: {path}.`25710. **FOLLOW-UP**: If the review changes durable process/context guidance, suggest `ENTER UPDATE PROCESS MODE`.258259---260261## ON `/vc:team debug <issue>` [--debuggers N]:262263*Coordinates parallel `debugger` teammates using the absorbed root-cause-first debug workflow now owned by the debugger path.*264265IMMEDIATELY execute in order:2662671. **GENERATE** N competing hypotheses from `<issue>` (default N=3):268 - Each hypothesis must be independently testable269 - Each must predict different observable symptoms270 - Frame as: "If <cause>, then we should see <evidence>"2712722. **CALL** `TeamCreate(team_name: "debug-<issue-slug>")`2732743. **CALL** `TaskCreate` x N -- one per hypothesis:275 - Subject: `Debug: Test hypothesis -- <theory>`276 - Description: `Investigate hypothesis: <theory>. For issue: <issue>. ADVERSARIAL: actively try to disprove other theories. Message other debuggers to challenge findings. Report evidence FOR and AGAINST your theory. Save findings to: {CK_REPORTS_PATH}/debugger-{N}-{CK_NAME_PATTERN}-{issue-slug}.md. Mark task completed when done.`2772784. **SPAWN** debugger teammates x N via `Agent` tool:279 - `subagent_type: "debugger"`, `model: "opus"`280 - `run_in_background: true`281 - `name: "debugger-{N}"`282 - Prompt: task description + CK Context Block2832845. **MONITOR** via TaskCompleted events. Debuggers should message each other -- let them converge.285 - TaskCompleted events notify as each hypothesis is tested286 - TeammateIdle events indicate debugger awaiting peer input287 - Fallback: Check TaskList if no events in 60s2882896. **READ** all debugger reports. Identify surviving theory as root cause.2902917. **WRITE** root cause report: `{CK_REPORTS_PATH}/debug-{issue-slug}.md`292 Format: Root cause, evidence chain, disproven hypotheses, recommended fix.2932948. **SHUTDOWN** all teammates via `SendMessage(type: "shutdown_request")`2959. **CLEANUP**: `TeamDelete` (no parameters -- just call it)29629710. **REPORT**: Tell user `Debug complete. Root cause: <summary>. Report: {path}.`29811. **FOLLOW-UP**: If the debug session produced durable process/context learnings, suggest `ENTER UPDATE PROCESS MODE`.299300---301302## When to Use Agent Teams vs Subagents303304| Scenario | Subagents (Agent tool) | Agent Teams |305|----------|----------------------|-------------|306| Focused task (test, lint, single review) | **Yes** | Overkill |307| Sequential chain (plan -> code -> test) | **Yes** | No |308| 3+ independent parallel workstreams | Maybe | **Yes** |309| Competing debug hypotheses | No | **Yes** |310| Cross-layer work (FE + BE + tests) | Maybe | **Yes** |311| Workers need to discuss/challenge findings | No | **Yes** |312| Token budget is tight | **Yes** | No (high cost) |313314## Token Budget315316| Template | Estimated Tokens | Notes |317|----------|-----------------|-------|318| Research (3) | ~150K-300K | Read-only, moderate cost |319| Execute (4) | ~400K-800K | Highest cost -- code generation |320| Review (3) | ~100K-200K | Read-only, moderate cost |321| Debug (3) | ~200K-400K | Mixed read/execute |322323## Agent Memory324325Teammates with `memory: project` in their agent definition retain learnings across team sessions. Memory persists in `.claude/agent-memory/<name>/` (gitignored). Useful for:326- Code reviewer remembering project conventions327- Debugger recalling past failure patterns328- Tester tracking flaky tests and coverage gaps329- Researcher accumulating domain knowledge330331Memory persists after team cleanup -- it's in `.claude/agent-memory/`, not `~/.claude/teams/`.332333## Worktree Isolation (Execute Template)334335For implementation teams, `isolation: "worktree"` on the Agent tool gives each dev:336- **Own git worktree** -- isolated working directory, staging area, HEAD337- **Own branch** -- auto-created, returned in agent result338- **No file conflicts** -- devs can edit same files independently339- **Safe parallel editing** -- `.git` dir shared, everything else isolated340341After all devs complete, lead merges branches sequentially. This is the safest pattern for parallel code changes.342343## Error Recovery3443451. **Check status**: `Shift+Up/Down` (in-process) or click pane (split)3462. **Redirect**: Send direct message with corrective instructions3473. **Replace**: Shut down failed teammate, spawn replacement for same task3484. **Reassign**: `TaskUpdate` stuck task to unblock dependents349350## Abort Team351352```353Shut down all teammates. Then call TeamDelete (no parameters).354```355356If unresponsive: close terminal or kill session. Clean orphaned configs at `~/.claude/teams/` manually.357358## Display Modes359360- **auto** (default): split panes if in tmux, otherwise in-process361- **in-process**: all in one terminal. `Shift+Up/Down` navigate. `Ctrl+T` task list.362- **tmux/split**: each teammate own pane. Requires tmux or iTerm2.363364## Rules Reference365366See `process/development-protocols/orchestration.md` for teammate coordination, status handling, and context-isolation rules.367368> v3.0.0: Agent tool migration, worktree isolation for execute devs, run_in_background spawning, updated model requirements.