dispatching-parallel-agents
npx machina-cli add skill parthalon025/autonomous-coding-toolkit/dispatching-parallel-agents --openclawDispatching Parallel Agents
Overview
When you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.
Core principle: Dispatch one agent per independent problem domain. Let them work concurrently.
When to Use
digraph when_to_use {
"Multiple failures?" [shape=diamond];
"Are they independent?" [shape=diamond];
"Single agent investigates all" [shape=box];
"One agent per problem domain" [shape=box];
"Can they work in parallel?" [shape=diamond];
"Sequential agents" [shape=box];
"Parallel dispatch" [shape=box];
"Multiple failures?" -> "Are they independent?" [label="yes"];
"Are they independent?" -> "Single agent investigates all" [label="no - related"];
"Are they independent?" -> "Can they work in parallel?" [label="yes"];
"Can they work in parallel?" -> "Parallel dispatch" [label="yes"];
"Can they work in parallel?" -> "Sequential agents" [label="no - shared state"];
}
Use when:
- 3+ test files failing with different root causes
- Multiple subsystems broken independently
- Each problem can be understood without context from others
- No shared state between investigations
Don't use when:
- Failures are related (fix one might fix others)
- Need to understand full system state
- Agents would interfere with each other
The Pattern
1. Identify Independent Domains
Group failures by what's broken:
- File A tests: Tool approval flow
- File B tests: Batch completion behavior
- File C tests: Abort functionality
Each domain is independent - fixing tool approval doesn't affect abort tests.
2. Create Focused Agent Tasks
Each agent gets:
- Specific scope: One test file or subsystem
- Clear goal: Make these tests pass
- Constraints: Don't change other code
- Expected output: Summary of what you found and fixed
3. Dispatch in Parallel
// In Claude Code / AI environment
Task("Fix agent-tool-abort.test.ts failures")
Task("Fix batch-completion-behavior.test.ts failures")
Task("Fix tool-approval-race-conditions.test.ts failures")
// All three run concurrently
4. Review and Integrate
When agents return:
- Read each summary
- Verify fixes don't conflict
- Run full test suite
- Integrate all changes
Common Mistakes
❌ Too broad: "Fix all the tests" - agent gets lost ✅ Specific: "Fix agent-tool-abort.test.ts" - focused scope
❌ No context: "Fix the race condition" - agent doesn't know where ✅ Context: Paste the error messages and test names
❌ No constraints: Agent might refactor everything ✅ Constraints: "Do NOT change production code" or "Fix tests only"
❌ Vague output: "Fix it" - you don't know what changed ✅ Specific: "Return summary of root cause and changes"
When NOT to Use
Related failures: Fixing one might fix others - investigate together first Need full context: Understanding requires seeing entire system Exploratory debugging: You don't know what's broken yet Shared state: Agents would interfere (editing same files, using same resources)
Verification
After agents return:
- Review each summary - Understand what changed
- Check for conflicts - Did agents edit same code?
- Run full suite - Verify all fixes work together
- Spot check - Agents can make systematic errors
Source
git clone https://github.com/parthalon025/autonomous-coding-toolkit/blob/main/skills/dispatching-parallel-agents/SKILL.mdView on GitHub Overview
When you face multiple unrelated failures, investigating them sequentially wastes time. Dispatch one agent per independent problem domain so they work concurrently. The pattern minimizes cross-task interference and speeds up resolution.
How This Skill Works
First, identify independent domains and scope each agent to a single problem. Then create focused agent tasks with clear goals and constraints, ensuring they do not touch other code. Finally, dispatch agents to run in parallel and collect summaries of findings and fixes for review.
When to Use It
- 3+ test files failing with different root causes
- Multiple subsystems broken independently
- Each problem can be understood without context from others
- No shared state between investigations
- Failures are independent and can be addressed in parallel
Quick Start
- Step 1: Identify Independent Domains and scope
- Step 2: Create Focused Agent Tasks with clear goals and constraints
- Step 3: Dispatch in Parallel and review summaries
Best Practices
- Identify Independent Domains
- Create Focused Agent Tasks
- Dispatch in Parallel
- Review and Integrate
- Constrain agents with explicit limits (do not touch production code)
Example Use Cases
- File A tests: Tool approval flow
- File B tests: Batch completion behavior
- File C tests: Abort functionality
- Independent subsystem failures in a CI pipeline
- Concurrent bug triage across unrelated components