Use when facing 3+ independent test failures or broken subsystems with different root causes. Dispatches one agent team per domain in parallel. Each team gets focused scope and constraints. Results are reviewed for conflicts and verified with a full test suite run.
When invoked standalone:
When invoked from /coding-team, the lead provides grouped failures. Skip the above.
Use agent teams (default when AGENT_TEAMS_AVAILABLE = true) if:
Fall back to Agent tool if:
Group failures by what's broken. Each domain must be independent — fixing one shouldn't affect another.
Each investigation team gets:
Each team can be a single agent (for simple investigations) or a full task team (implementer + reviewers) for complex fixes.
Agent teams mode (AGENT_TEAMS_AVAILABLE = true, 3+ domains, possibly shared infrastructure):
Create team:
Teammate({ operation: "spawnTeam", team_name: "parallel-fix-<timestamp>" })
Create tasks (one per domain):
TaskCreate({
subject: "Fix: <domain>",
description: "<scope, goal, context, constraints, expected output>",
activeForm: "Investigating <domain>..."
})
Spawn one teammate per domain:
Monitor:
Review and integrate (same as subagent step 4 below)
Shutdown and cleanup:
Teammate({ operation: "requestShutdown", target_agent_id: "<each>" })
Wait for approvals.
Teammate({ operation: "cleanup" })
Subagent mode (AGENT_TEAMS_AVAILABLE = false, or 2 domains, or provably independent):
Use the Agent tool with multiple calls in a single message. All teams run concurrently.
When teams return:
Fix the N failing tests in [file]:
1. "[test name]" - [error description]
2. "[test name]" - [error description]
Your task:
1. Read the test file and understand what each test verifies
2. Identify root cause
3. Fix the issue
4. Do NOT change code outside [scope]
Return: summary of root cause and what you fixed.
The lead NEVER writes code directly. Dispatch all fixes through Agent tool or Teammate tool. If you catch yourself about to use Edit or Write — STOP and spawn an agent instead. Direct fixes bypass the verification loop and are not trusted.
Before claiming all fixes are complete: