Orchestration: Subagents, Agent Teams & Parallel Execution
These rules govern ALL parallelization decisions. Apply them on every task.
Not for single-action requests, simple file edits, or sequential-only workflows.
Dispatch
| $ARGUMENTS |
Action |
| (empty) |
Load full orchestration guide; apply Decomposition Gate to current request |
pattern <A-F> |
Show the named pattern from references/patterns.md |
tier |
Display Tier Selection table and model guidance |
recovery |
Show the Accounting Rule and Recovery Ladder |
Canonical Vocabulary
| Canonical Term |
Meaning |
| subagent |
A Task-tool-spawned agent running in parallel within a session |
| wave |
A batch of parallel subagents dispatched in a single message |
| team |
A TeamCreate-spawned group of teammates coordinated by a lead |
| teammate |
A member of an agent team with assigned file ownership |
| lead |
The orchestrating agent in a team; never implements directly |
| dispatch |
Send one or more subagents/teammates to execute in parallel |
| gate |
A mandatory checkpoint that must pass before proceeding |
| accounting rule |
N dispatched = N resolved; no agent silently dropped |
0. Decomposition Gate (MANDATORY before any work)
Before executing any request that involves tool-mediated work:
- DECOMPOSE: List the actions needed (file reads, edits, searches, commands, analyses).
- CLASSIFY: Which actions are independent (no data dependency)? Which are dependent?
- MAXIMIZE: Actively split actions further — find every opportunity to parallelize. Each independent action = its own subagent. Challenge: can any action be split into two?
- CONFLICT CHECK: Two independent actions editing the same file → make those sequential; all others remain parallel.
- DISPATCH: Default is Pattern E — TeamCreate with nested subagent waves per teammate. Pre-approve permissions before spawning. Use bare subagent waves only when single domain, no coordination, no context pressure. Single session only when there is literally 1 action.
- TRACK: For orchestrated work, create TaskCreate entries before dispatch (see Section 7).
Fast path: Single-action requests skip directly to single session.
Explore-first path: Cannot decompose without exploration → spawn parallel exploration team first (Pattern F Wave 1), then re-enter this gate.
Transition heuristic: Subagent waves hitting context limits or agents need to share findings → upgrade to Pattern E (teams + nested waves).
User override: Explicit user requests for a specific execution approach take precedence.
Common rationalizations (all invalid)
- "It's faster to do it myself" — Parallel subagents complete N tasks in time of the slowest 1.
- "The task is too simple" — If it has 2+ independent actions, parallelize them.
- "I'll just do this one thing first" — Decompose BEFORE doing anything.
Mode constraints
- Plan mode: Read-only subagents only. No teams, no write-capable agents.
- Implementation mode: All tiers available. Default to highest applicable tier.
- Delegate mode: Lead orchestrates only. All implementation via teammates/subagents.
Skill integration
When a superpowers skill is active, the gate operates WITHIN the skill's execution structure:
- Phase-gated skills: Parallelize within each phase. Do not parallelize across phase boundaries.
- Per-task review loop skills: The skill's sequential structure takes precedence. Parallelize exploration within each task, not across tasks.
- Dispatch-precondition skills: The skill's "Don't use when" conditions remain valid. The gate does not override skill-level safety guards.
1. Tier Selection (mandatory — highest applicable tier wins)
| Tier |
Mechanism |
Use when |
Model |
| Team + nested waves (Pattern E) |
TeamCreate + subagent waves per teammate — up to ~50 agents total |
2+ independent streams — THE DEFAULT |
opus (default) / Copilot: Opus 4.6 max thinking; Sonnet 4.6 max thinking only for extremely trivial /fleet work |
| Subagent wave |
Task tool, parallel calls |
2+ actions, single domain, no coordination, no context pressure |
opus (default) / Copilot: Opus 4.6 max thinking; Sonnet 4.6 max thinking only for extremely trivial /fleet work |
| Single session |
Direct execution |
Exactly 1 action |
N/A |
Select the highest tier whose criteria are met. Never select a lower tier to reduce cost.
2. Subagent Best Practices
Spawning
- One response, multiple Task calls. All independent subagents MUST be dispatched in the same message.
- Use
run_in_background: true for subagents whose results are not needed immediately.
- N independent actions = N parallel subagents. Merge only when they share file/directory scope.
Prompt-tuning
- Give every subagent a detailed, self-contained prompt with exact file paths, expected output format, and domain context.
- Do NOT rely on the subagent inheriting conversation history — it does not.
Model selection
- Default policy:
opus for every subagent, teammate, and wave.
- GitHub Copilot CLI override: all plans should be
/fleet-optimized per /orchestrator. For /fleet, use Claude Opus 4.6 with max thinking for every non-trivial subagent, teammate, wave, and /fleet member.
- Use Claude Sonnet 4.6 with max thinking only for incredibly/extremely trivial
/fleet subagents. If there is any ambiguity, escalate to Opus.
- When both policies are present, apply the environment-specific override for the active runtime.
Context management
- Delegate verbose operations (test suites, log parsing, doc fetching) to subagents.
- Use subagent resumption (agent ID) for multi-phase work rather than spawning fresh.
- After a wave completes, apply the Accounting Rule (Section 4) before synthesizing.
3. Agent Team Best Practices
- Scale teammates to match the work — no artificial cap. Use as many as needed for maximum parallelism (up to ~50 agents total including nested subagents). Token budget is not a constraint.
- Pre-approve common permissions before spawning teammates to reduce friction.
- Assign each teammate a distinct domain and non-overlapping file ownership.
- Assign as many tasks per teammate as the domain requires — no artificial limit.
- Include all task-specific context in spawn prompts: file paths, architecture decisions, acceptance criteria. Teammates do not inherit conversation history.
- Use delegate mode to prevent the lead from implementing work itself.
- Task claiming uses file locking — no race conditions when multiple teammates claim simultaneously.
- Never assign two teammates overlapping file ownership.
- The lead must not proceed to synthesis until all teammate tasks are accounted for (Section 4).
4. Quality Gates & Failure Recovery
The Accounting Rule (MANDATORY after every parallel dispatch)
When N agents are dispatched, all N must be accounted for before proceeding:
- COLLECT: Wait for all N agents to return. Poll with
TaskOutput block=false for timeout detection.
- TALLY: Results received vs dispatched. Missing = unresolved.
- RESOLVE all non-successes via the Recovery Ladder (see
references/patterns.md).
- GATE: Do NOT advance until every agent has SUCCESS or explicit SKIP.
- REPORT: Summarize all agent outcomes via TaskUpdate before proceeding.
Hooks for automated enforcement
- TeammateIdle hook: prevent teammates from idling before work is verified.
- TaskCompleted hook: prevent tasks from closing before tests pass.
- Both use exit code 2 to send feedback and keep the teammate/task active.
Plan approval workflow
- For risky changes, include "Require plan approval before making changes" in the spawn prompt.
- Teammate enters read-only plan mode, sends plan_approval_request to lead when ready.
- Lead approves or rejects with feedback. Teammate revises if rejected.
- Influence approval criteria in spawn prompt: "only approve plans that include test coverage."
5. Orchestration Patterns
| Pattern |
Name |
Use When |
Details |
| A |
Parallel subagent wave |
2+ independent subtasks in a session |
see references/patterns.md |
| B |
Agent team with file ownership |
Cross-domain features, large refactors |
see references/patterns.md |
| C |
Competing hypotheses |
Debugging, architecture decisions |
see references/patterns.md |
| D |
Plan-then-swarm |
Large tasks needing human approval |
see references/patterns.md |
| E |
Teams of subagent-using teammates (DEFAULT) |
2+ independent streams — use by default |
see references/patterns.md |
| F |
Multi-wave pipeline |
Explore → implement → verify phases |
see references/patterns.md |
6. Limitations
- No session resumption for teammates (
/resume and /rewind won't restore them).
- No nested teams (teammates can use subagents but cannot spawn teams).
- One team per session. Clean up before starting a new one.
- Lead is fixed — cannot transfer leadership.
- All teammates inherit the lead's permission mode at spawn.
- Subagent resumption may not recover from all failure modes (re-spawn instead).
- No built-in timeout detection — orchestrator must poll with
TaskOutput manually.
- Recovery re-spawns count toward the session's agent budget.
- Display modes: in-process (Shift+Down to cycle) is default; split panes require tmux or iTerm2.
- Teammate interaction: Enter to view session, Escape to interrupt, Ctrl+T for task list.
Critical Rules
- Never dispatch independent actions sequentially — all independent Task calls MUST appear in one response.
- Always run the Decomposition Gate before any tool-mediated work; skipping it is never acceptable.
- Never reduce parallelism, tier, or model quality for any reason — always use opus, no exceptions. Never downgrade.
- Never silently drop a failed subagent — N dispatched = N accounted for; apply the Accounting Rule after every wave.
- Never advance to Wave N+1 with unresolved agents — resolve all agents in Wave N first.
- Always create TaskCreate entries before dispatching subagent waves or agent teams — silent orchestration is forbidden.
- Never assign two teammates overlapping file ownership — overlapping edits cause lost work.
- Always include full context in subagent and teammate prompts — they do not inherit conversation history.
Reference File Index
| File |
Content |
Read When |
references/patterns.md |
Detailed patterns A-F with ASCII diagrams, key rules, recovery ladder |
Designing parallel execution or selecting a pattern |
7. Progress Visibility (MANDATORY for orchestrated work)
All orchestrated work must produce structured progress indicators via TaskCreate/TaskUpdate.
| Tier |
Requirement |
Granularity |
| Subagent wave |
MUST |
One task per subagent, created before dispatch |
| Agent team |
MUST |
One task per teammate assignment, created during setup |
| Single session (3+ steps) |
SHOULD |
One task per logical step |
Rules
- Create tasks before execution begins, not retroactively.
- Each task MUST have a descriptive
activeForm in present continuous tense naming the specific action and target.
- Update tasks to
in_progress before starting, completed immediately after.
- After wave completion + accounting, summarize all agent outcomes before dispatching the next wave.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: wyattowalsh-agents-orchestrator3description: Orchestration: Subagents, Agent Teams & Parallel Execution4---56# Orchestration: Subagents, Agent Teams & Parallel Execution78These rules govern ALL parallelization decisions. Apply them on every task.910Not for single-action requests, simple file edits, or sequential-only workflows.1112## Dispatch1314| $ARGUMENTS | Action |15|------------|--------|16| *(empty)* | Load full orchestration guide; apply Decomposition Gate to current request |17| `pattern <A-F>` | Show the named pattern from `references/patterns.md` |18| `tier` | Display Tier Selection table and model guidance |19| `recovery` | Show the Accounting Rule and Recovery Ladder |2021## Canonical Vocabulary2223| Canonical Term | Meaning |24|----------------|---------|25| **subagent** | A Task-tool-spawned agent running in parallel within a session |26| **wave** | A batch of parallel subagents dispatched in a single message |27| **team** | A TeamCreate-spawned group of teammates coordinated by a lead |28| **teammate** | A member of an agent team with assigned file ownership |29| **lead** | The orchestrating agent in a team; never implements directly |30| **dispatch** | Send one or more subagents/teammates to execute in parallel |31| **gate** | A mandatory checkpoint that must pass before proceeding |32| **accounting rule** | N dispatched = N resolved; no agent silently dropped |3334## 0. Decomposition Gate (MANDATORY before any work)3536Before executing any request that involves tool-mediated work:37381. **DECOMPOSE**: List the actions needed (file reads, edits, searches, commands, analyses).392. **CLASSIFY**: Which actions are independent (no data dependency)? Which are dependent?403. **MAXIMIZE**: Actively split actions further — find every opportunity to parallelize. Each independent action = its own subagent. Challenge: can any action be split into two?414. **CONFLICT CHECK**: Two independent actions editing the same file → make those sequential; all others remain parallel.425. **DISPATCH**: Default is Pattern E — TeamCreate with nested subagent waves per teammate. Pre-approve permissions before spawning. Use bare subagent waves only when single domain, no coordination, no context pressure. Single session only when there is literally 1 action.436. **TRACK**: For orchestrated work, create TaskCreate entries before dispatch (see Section 7).4445**Fast path**: Single-action requests skip directly to single session.4647**Explore-first path**: Cannot decompose without exploration → spawn parallel exploration team first (Pattern F Wave 1), then re-enter this gate.4849**Transition heuristic**: Subagent waves hitting context limits or agents need to share findings → upgrade to Pattern E (teams + nested waves).5051**User override**: Explicit user requests for a specific execution approach take precedence.5253### Common rationalizations (all invalid)54- "It's faster to do it myself" — Parallel subagents complete N tasks in time of the slowest 1.55- "The task is too simple" — If it has 2+ independent actions, parallelize them.56- "I'll just do this one thing first" — Decompose BEFORE doing anything.5758### Mode constraints59- **Plan mode**: Read-only subagents only. No teams, no write-capable agents.60- **Implementation mode**: All tiers available. Default to highest applicable tier.61- **Delegate mode**: Lead orchestrates only. All implementation via teammates/subagents.6263### Skill integration64When a superpowers skill is active, the gate operates WITHIN the skill's execution structure:65- **Phase-gated skills**: Parallelize within each phase. Do not parallelize across phase boundaries.66- **Per-task review loop skills**: The skill's sequential structure takes precedence. Parallelize exploration within each task, not across tasks.67- **Dispatch-precondition skills**: The skill's "Don't use when" conditions remain valid. The gate does not override skill-level safety guards.6869---7071## 1. Tier Selection (mandatory — highest applicable tier wins)7273| Tier | Mechanism | Use when | Model |74|------|-----------|----------|-------|75| **Team + nested waves (Pattern E)** | TeamCreate + subagent waves per teammate — up to ~50 agents total | 2+ independent streams — THE DEFAULT | opus (default) / Copilot: Opus 4.6 max thinking; Sonnet 4.6 max thinking only for extremely trivial `/fleet` work |76| **Subagent wave** | Task tool, parallel calls | 2+ actions, single domain, no coordination, no context pressure | opus (default) / Copilot: Opus 4.6 max thinking; Sonnet 4.6 max thinking only for extremely trivial `/fleet` work |77| **Single session** | Direct execution | Exactly 1 action | N/A |7879Select the highest tier whose criteria are met. Never select a lower tier to reduce cost.8081---8283## 2. Subagent Best Practices8485### Spawning86- **One response, multiple Task calls.** All independent subagents MUST be dispatched in the same message.87- Use `run_in_background: true` for subagents whose results are not needed immediately.88- N independent actions = N parallel subagents. Merge only when they share file/directory scope.8990### Prompt-tuning91- Give every subagent a detailed, self-contained prompt with exact file paths, expected output format, and domain context.92- Do NOT rely on the subagent inheriting conversation history — it does not.9394### Model selection95- Default policy: `opus` for every subagent, teammate, and wave.96- GitHub Copilot CLI override: all plans should be `/fleet`-optimized per `/orchestrator`. For `/fleet`, use **Claude Opus 4.6 with max thinking** for every non-trivial subagent, teammate, wave, and `/fleet` member.97- Use **Claude Sonnet 4.6 with max thinking** only for incredibly/extremely trivial `/fleet` subagents. If there is any ambiguity, escalate to Opus.98- When both policies are present, apply the environment-specific override for the active runtime.99100### Context management101- Delegate verbose operations (test suites, log parsing, doc fetching) to subagents.102- Use subagent resumption (agent ID) for multi-phase work rather than spawning fresh.103- After a wave completes, apply the Accounting Rule (Section 4) before synthesizing.104105---106107## 3. Agent Team Best Practices108109- Scale teammates to match the work — no artificial cap. Use as many as needed for maximum parallelism (up to ~50 agents total including nested subagents). Token budget is not a constraint.110- Pre-approve common permissions before spawning teammates to reduce friction.111- Assign each teammate a distinct domain and non-overlapping file ownership.112- Assign as many tasks per teammate as the domain requires — no artificial limit.113- Include all task-specific context in spawn prompts: file paths, architecture decisions, acceptance criteria. Teammates do not inherit conversation history.114- Use delegate mode to prevent the lead from implementing work itself.115- Task claiming uses file locking — no race conditions when multiple teammates claim simultaneously.116- Never assign two teammates overlapping file ownership.117- The lead must not proceed to synthesis until all teammate tasks are accounted for (Section 4).118119---120121## 4. Quality Gates & Failure Recovery122123### The Accounting Rule (MANDATORY after every parallel dispatch)124125When N agents are dispatched, all N must be accounted for before proceeding:1261271. **COLLECT**: Wait for all N agents to return. Poll with `TaskOutput` block=false for timeout detection.1282. **TALLY**: Results received vs dispatched. Missing = unresolved.1293. **RESOLVE** all non-successes via the Recovery Ladder (see `references/patterns.md`).1304. **GATE**: Do NOT advance until every agent has SUCCESS or explicit SKIP.1315. **REPORT**: Summarize all agent outcomes via TaskUpdate before proceeding.132133### Hooks for automated enforcement134- **TeammateIdle** hook: prevent teammates from idling before work is verified.135- **TaskCompleted** hook: prevent tasks from closing before tests pass.136- Both use exit code 2 to send feedback and keep the teammate/task active.137138### Plan approval workflow139- For risky changes, include "Require plan approval before making changes" in the spawn prompt.140- Teammate enters read-only plan mode, sends plan_approval_request to lead when ready.141- Lead approves or rejects with feedback. Teammate revises if rejected.142- Influence approval criteria in spawn prompt: "only approve plans that include test coverage."143144---145146## 5. Orchestration Patterns147148| Pattern | Name | Use When | Details |149|---------|------|----------|---------|150| A | Parallel subagent wave | 2+ independent subtasks in a session | see `references/patterns.md` |151| B | Agent team with file ownership | Cross-domain features, large refactors | see `references/patterns.md` |152| C | Competing hypotheses | Debugging, architecture decisions | see `references/patterns.md` |153| D | Plan-then-swarm | Large tasks needing human approval | see `references/patterns.md` |154| **E** | **Teams of subagent-using teammates (DEFAULT)** | **2+ independent streams — use by default** | see `references/patterns.md` |155| F | Multi-wave pipeline | Explore → implement → verify phases | see `references/patterns.md` |156157---158159## 6. Limitations160161- No session resumption for teammates (`/resume` and `/rewind` won't restore them).162- No nested teams (teammates can use subagents but cannot spawn teams).163- One team per session. Clean up before starting a new one.164- Lead is fixed — cannot transfer leadership.165- All teammates inherit the lead's permission mode at spawn.166- Subagent resumption may not recover from all failure modes (re-spawn instead).167- No built-in timeout detection — orchestrator must poll with `TaskOutput` manually.168- Recovery re-spawns count toward the session's agent budget.169- Display modes: in-process (Shift+Down to cycle) is default; split panes require tmux or iTerm2.170- Teammate interaction: Enter to view session, Escape to interrupt, Ctrl+T for task list.171172---173174## Critical Rules1751761. Never dispatch independent actions sequentially — all independent Task calls MUST appear in one response.1772. Always run the Decomposition Gate before any tool-mediated work; skipping it is never acceptable.1783. Never reduce parallelism, tier, or model quality for any reason — always use opus, no exceptions. Never downgrade.1794. Never silently drop a failed subagent — N dispatched = N accounted for; apply the Accounting Rule after every wave.1805. Never advance to Wave N+1 with unresolved agents — resolve all agents in Wave N first.1816. Always create TaskCreate entries before dispatching subagent waves or agent teams — silent orchestration is forbidden.1827. Never assign two teammates overlapping file ownership — overlapping edits cause lost work.1838. Always include full context in subagent and teammate prompts — they do not inherit conversation history.184185---186187## Reference File Index188189| File | Content | Read When |190|------|---------|-----------|191| `references/patterns.md` | Detailed patterns A-F with ASCII diagrams, key rules, recovery ladder | Designing parallel execution or selecting a pattern |192193---194195## 7. Progress Visibility (MANDATORY for orchestrated work)196197All orchestrated work must produce structured progress indicators via TaskCreate/TaskUpdate.198199| Tier | Requirement | Granularity |200|------|------------|-------------|201| **Subagent wave** | MUST | One task per subagent, created before dispatch |202| **Agent team** | MUST | One task per teammate assignment, created during setup |203| **Single session** (3+ steps) | SHOULD | One task per logical step |204205### Rules206- Create tasks before execution begins, not retroactively.207- Each task MUST have a descriptive `activeForm` in present continuous tense naming the specific action and target.208- Update tasks to `in_progress` before starting, `completed` immediately after.209- After wave completion + accounting, summarize all agent outcomes before dispatching the next wave.210211---212> Converted and distributed by [TomeVault](https://tomevault.io/claim/wyattowalsh) — claim your Tome and manage your conversions.213<!-- tomevault:4.0:skill_md:2026-04-15 -->