subagent-orchestration
Skill2 starsChanged 7 months agoMITView on GitHub
Standardize subagent orchestration in OpenClaw — covering parallel dispatch, sequential delegation, task packaging, failure recovery, and result integration. Use when a task requires splitting into multiple subagent sessions (parallel or sequential), coordinating fan-out execution, handling timeout/failure re-dispatch, or merging multi-branch outputs with verification. Consolidates the patterns from dispatching-parallel-agents and subagent-driven-development into one actionable skill.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- zxyycom/skillstheir own version, first seen Nov 8, 2026
- SWEStash/swe-workflow-skillstheir own version, first seen Nov 8, 2026
- bookchaowalit/platform-agent-skillstheir own version, first seen Oct 20, 2026
- elastic/sourcerertheir own version, first seen Oct 13, 2026
- wzy-20130517/Claude-Code-Mobiletheir own version, first seen Oct 11, 2026
- wicii2120/skillstheir own version, first seen Aug 29, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- elastic/sourcerer★ 20same name
- moabualruz/fulcrum★ 4same name
- ArcanEdge-AI/coding-agent-playbook-codex★ 3same name
- wzy-20130517/Claude-Code-Mobile★ 3same name
- zxyycom/skills★ 2same name
- SWEStash/swe-workflow-skills★ 1same name
- wicii2120/skills★ 1same name
- ArcanEdge-AI/coding-agent-playbook-claude-code★ 0same name
- bookchaowalit/platform-agent-skills★ 0same name
- nbsp1221/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository47 other files it gives its agents.
- brainstormingSkill
- claude-code-termux-runbookSkill
- cli-patcherSkill
- code-review-workflowSkill
- commit-commandsSkill
- consulting-analysisSkill
- context7-cleanSkill
- data-analysisSkill
- deep-researchSkill
- edit-tool-compat-guardSkill
- env-managerSkill
- executing-plansSkill
- feature-devSkill
- firecrawlSkill
- frontend-designSkill
- gateway-device-pairingSkill
- githubSkill
- glibc-prebuilt-bundleSkill
- gogSkill
- image-generationSkill
- memory-setupSkill
- module-auditorSkill
- module-scaffoldSkill
- openclaw-config-guardianSkill
- openclaw-ollama-runtime-kbSkill
- plugin-cutover-guardianSkill
- plugin-runtime-guardianSkill
- python-env-managerSkill
- self-improving-agentSkill
- simplify-and-hardenSkill
- skill-benchSkill
- skill-creatorSkill
- skill-unificationSkill
- skill-vetterSkill
- socratic-groundingSkill
- systematic-debuggingSkill
- tailscale-oauth-bridgeSkill
- termux-packagerSkill
- termux-runnerSkill
- test-driven-developmentSkill
- vercel-deploy-claimableSkill
- verification-before-completionSkill
- video-generationSkill
- workspace-cleanupSkill
- writing-plansSkill
- yt-dlp-ingest-firstSkill
- zero-downtime-cutoverSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 11 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 72
No clear task contract or partition exists.
- Distinctive: line 75
If shared-state collision risk is high, redesign split or fall back to sequential.
- Distinctive: line 76
If task contract is weak, strengthen it before spawning.
- Distinctive: line 77
If fan-out exceeds 8 branches, justify or reduce.
- Distinctive: line 84
Create backup: if the work mutates shared state (files, configs).
- Very specific: line 89
Spawn subagents: Use sessions_spawn with mode="run", unique labels, clear task instructions.
- Distinctive: line 94
On timeout/failure: Check which items were actually completed vs.
- Distinctive: line 104
Do not assume all work was lost.
- Very specific: line 106
Consider increasing runTimeoutSeconds if the original was too tight.
- Distinctive: line 108
Stop and rewrite the task package with tighter constraints.
- Very specific: line 118
Never call sessions_list or exec sleep to poll for results.
- Distinctive: line 119
Wait for completion events to arrive as user messages.
- Distinctive: line 132
Must show bounded task contracts + post-completion verification.
- Distinctive: line 133
Must not claim done without automated verification scan.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Subagent Orchestration
Unified skill for orchestrating subagent sessions — parallel, sequential, or mixed — with task packaging, failure recovery, and disciplined integration.
Indexed Reference Map
- @[SKILL.md#L1-L142] Frontmatter, scope, trigger rules, SOP, error handling, output contract.
- @[references/INDEX.md#L1-L23] Reading order and reference inventory.
- @[references/task-packaging.md#L1-L55] How to build a subagent task package (handoff contract).
- @[references/parallel-dispatch.md#L1-L65] Parallel fan-out: suitability, partitioning, fan-out limits.
- @[references/sequential-delegation.md#L1-L40] Sequential delegation: plan-first, handoff, control loop.
- @[references/failure-recovery.md#L1-L55] Timeout handling, re-dispatch, partial completion detection.
- @[references/merge-and-verify.md#L1-L45] Result collection, merge checkpoints, post-integration verification.
- @[references/worked-examples.md#L1-L120] Real-world orchestration patterns with concrete code/tool flows.
Scope
- In-scope:
- Splitting work into bounded subagent tasks (parallel or sequential).
- Packaging task contracts with clear scope, constraints, and deliverables.
- Spawning via
sessions_spawnwith appropriate timeout/mode settings. - Tracking completion events (push-based, no polling).
- Handling timeout/failure: detecting partial completion, re-dispatching remainder.
- Merging multi-branch outputs with verification before reporting done.
- Out-of-scope:
- Spawning subagents for trivial single-agent work.
- Vague delegation without a task contract.
- Autonomous long-running agent swarms without integration checkpoints.
- Polling
sessions_listin loops (violates push-based model).
KB Mode Notes
- Reading order:
references/INDEX.mdreferences/task-packaging.mdreferences/parallel-dispatch.mdreferences/sequential-delegation.mdreferences/failure-recovery.mdreferences/merge-and-verify.mdreferences/worked-examples.md
- Coverage Matrix:
- Task contract design ->
task-packaging.md - Parallel fan-out patterns ->
parallel-dispatch.md - Sequential plan-first delegation ->
sequential-delegation.md - Timeout/failure/re-dispatch ->
failure-recovery.md - Result merge + verification ->
merge-and-verify.md - Concrete worked examples ->
worked-examples.md
- Task contract design ->
- Portability note:
- "Subagent" means OpenClaw
sessions_spawnwith bounded tasks and push-based completion. - Patterns transfer to any runtime supporting session orchestration with auto-announce.
- "Subagent" means OpenClaw
Trigger Rules
- Positive:
- Task has 2+ independent workstreams that benefit from parallel execution.
- Implementation is large enough that one agent should orchestrate others.
- User says: parallelize, split into subagents, fan out, delegate, dispatch workers.
- Need to coordinate investigation + implementation + verification in separate sessions.
- Batch processing where items are independent (e.g., translate N files, audit N skills).
- Negative:
- Task is small enough for one agent in one session.
- Subtasks are tightly coupled with heavy shared-state mutation.
- No clear task contract or partition exists.
- User only wants brainstorming/planning, not execution.
- Escalation:
- If shared-state collision risk is high, redesign split or fall back to sequential.
- If task contract is weak, strengthen it before spawning.
- If fan-out exceeds 8 branches, justify or reduce.
SOP
Phase 1: Assess & Plan
- Determine orchestration mode: parallel, sequential, or mixed.
- Assess suitability: Are branches genuinely independent? Is fan-out justified?
- Create backup if the work mutates shared state (files, configs).
- Define task packages: Each subagent gets a bounded contract (see
task-packaging.md).
Phase 2: Dispatch
- Set appropriate timeouts:
runTimeoutSecondsbased on expected workload per batch. - Spawn subagents: Use
sessions_spawnwithmode="run", unique labels, clear task instructions. - Track expected completions: Record child session keys and labels; do NOT poll.
Phase 3: Monitor & Recover
- Wait for push-based completion events: Each subagent auto-announces when done.
- On timeout/failure: Check which items were actually completed vs. remaining.
- Re-dispatch remainder: Split failed batches into smaller sub-batches with tighter scope.
Phase 4: Merge & Verify
- Collect results: Track completed vs. pending across all branches.
- Run final verification: Automated scan/check that all intended changes were applied.
- Report completion: With verification evidence, backup/rollback path, and any remaining risks.
Error Handling
- Subagent timeout:
- Do not assume all work was lost; check which items were actually completed.
- Re-dispatch only the remaining items in smaller batches.
- Consider increasing
runTimeoutSecondsif the original was too tight.
- Subagent task too vague:
- Stop and rewrite the task package with tighter constraints.
- Returned output lacks evidence:
- Request artifacts or re-run with stricter deliverable requirements.
- Shared-state collision:
- Pause, reconcile, then continue with stricter isolation.
- Too many branches (fan-out explosion):
- Cap at 6-8 parallel branches; batch remaining into subsequent waves.
- Completion event arrives after final report:
- Respond with
NO_REPLY(late arrivals after synthesis).
- Respond with
- Push-based model violation:
- Never call
sessions_listorexec sleepto poll for results. - Wait for completion events to arrive as user messages.
- Never call
Output Contract
- Deliverable:
Orchestration Mode:parallel | sequential | mixed.Task Packages:branch/batch -> objective, scope, file list, deliverable.Dispatch Summary:subagent labels, session keys, timeouts.Completion Tracking:N/M batches done, any failures/timeouts.Recovery Actions:re-dispatched batches (if any).Verification Evidence:automated check confirming all changes applied.Backup/Rollback Path:where backups live, how to restore.Remaining Risks:anything unverified.
- Validation:
- Must show bounded task contracts + post-completion verification.
- Must not claim done without automated verification scan.
- Compliance Verdict:
PASSwhen all branches completed, verified, and integrated safely.PARTIALwhen some branches succeeded but gaps remain documented.FAILwhen orchestration violated safety boundaries or lost work.
Relationship to Superseded Skills
dispatching-parallel-agents: Parallel dispatch patterns are now inreferences/parallel-dispatch.md.subagent-driven-development: Sequential delegation patterns are now inreferences/sequential-delegation.md.- Both skills' reference content has been consolidated and enriched with real-world failure recovery patterns.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

