Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
Core principle: One agent per independent problem domain. Let them work concurrently.
Use: 3+ failures/tasks with different root causes, no shared state, each problem self-contained. Skip: Failures are related (fix one might fix others), agents would edit same files, you don't know what's broken yet.
Group by what's broken. E.g.: File A = tool approval flow, File B = batch completion, File C = abort. Each is independent.
Each agent gets: specific scope, clear goal, constraints (don't touch other code), expected output format.
Every spawn names a model — execution model: sonnet, validation model: opus, frontier-in-the-loop model: inherit (routing doctrine, commands/model-routing.md). Unpinned spawns inherit the session model.
Task("Fix agent-tool-abort.test.ts failures", model="sonnet")
Task("Fix batch-completion-behavior.test.ts failures", model="sonnet")
Task("Fix tool-approval-race-conditions.test.ts failures", model="sonnet")
// All three run concurrently
Read each summary → verify fixes don't conflict → run full test suite.
Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
1. "should abort tool with partial output capture" - expects 'interrupted at' in message
2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
3. "should properly track pendingToolCount" - expects 3 results but gets 0
These are timing/race condition issues. Your task:
1. Read the test file and understand what each test verifies
2. Identify root cause - timing issues or actual bugs?
3. Fix (replace arbitrary timeouts with event-based waiting, fix bugs, adjust expectations)
Do NOT just increase timeouts.
Return: Summary of what you found and what you fixed.
After agents return: review each summary → check for same-file conflicts → run full suite → spot check for systematic errors.
Use Codex (via clavain:interserve): Well-scoped tasks with clear file lists, true parallel sandboxes, cost/context optimization.
Keep Claude: Deep cross-file understanding, exploratory investigation, architectural decisions.
Independent tasks, distinct domains, no shared files. All dispatched in one message.
Task("Review authentication module", model="sonnet") ─┐
Task("Review database migrations", model="sonnet") ─┤── all in one message
Task("Review API error handling", model="sonnet") ─┘
Use when plan has 3+ independent modules.
Sequential handoff — agent N's output feeds agent N+1.
Agent 1: Research & design → design.md
Agent 2: Implement from design.md → code changes
Agent 3: Write tests for code changes → test files
Use when tasks have strict data dependencies.
N agents, same question, different perspectives → synthesize.
Task("Review from security perspective", model="sonnet") ─┐
Task("Review from performance perspective", model="sonnet") ─┤── fan-out
Task("Review from UX perspective", model="sonnet") ─┘
│
Synthesize findings ── fan-in
Used by /flux-drive and /quality-gates.
npx skills add mistakeknot/dispatching-parallel-agents下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer