| name | dispatching-parallel-agents |
| description | Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies. |
Dispatching Parallel Agents
Overview
When you have multiple unrelated failures or investigations, handle them in parallel instead of forcing one agent to juggle everything.
Core principle: one agent per independent problem domain.
When to Use
- Multiple failures with different root causes
- Separate subsystems or files
- No shared write set
- No sequential dependency between the tasks
The Pattern
- Identify the independent domains.
- Give each agent a narrow, self-contained prompt.
- Dispatch them in parallel.
- Review the results and integrate carefully.
Codex CLI Example
ext spawn_agent(role=explorer, task="Investigate agent-tool-abort.test.ts failures") spawn_agent(role=explorer, task="Investigate batch completion behavior failures") spawn_agent(role=explorer, task="Investigate tool approval race conditions")
Common Mistakes
- One prompt that covers unrelated problems
- Missing context or constraints
- Parallel work on overlapping files
- No integration pass after the agents return