| name | parallel-agents |
| description | Dispatch multiple agents to work on independent problems concurrently. Use when facing 3+ independent failures or tasks. |
Dispatching Parallel Agents
Assign separate agents to independent problem domains simultaneously for faster resolution.
When to Use
- 3+ test failures across different files/subsystems
- Multiple independent tasks that don't share state
- Investigations that won't interfere with each other
- Failures from unrelated root causes
When NOT to Use
- Failures are interconnected
- Tasks share state or create conflicts
- Agents would modify the same files
- You lack context to properly scope tasks
Implementation Steps
1. Group by Domain
Organize failures/tasks into independent categories:
Group A: Authentication tests (3 failures)
Group B: API endpoint tests (2 failures)
Group C: UI component tests (4 failures)
2. Define Focused Tasks
Each agent receives:
| Field | Description |
|---|
| Scope | Specific files/tests to focus on |
| Goal | Clear success criteria |
| Constraints | What NOT to change |
| Output | Expected deliverable |
3. Dispatch Concurrently
IMPORTANT: Launch all tasks in a single message (no run_in_background). Multiple Task calls in the same message automatically run in parallel, and Claude waits for all to complete.
# All three tasks run in parallel automatically when in the same message
Task(test-engineer, prompt="Fix auth test failures in src/auth/*.test.ts")
Task(test-engineer, prompt="Fix API test failures in src/api/*.test.ts")
Task(frontend-developer, prompt="Fix UI test failures in src/components/*.test.tsx")
# Claude waits for all to complete, then continues