# Orchestrate
<!--
ref: @protocol/orchestrate
tags: [task management, delegation, efficiency, context protection]
triggers: [manage complex requests, delegate tasks, synthesize results, maintain context]
trigger_prompt: When faced with a multifaceted request that requires collaboration and clear task division, reach for this protocol to streamline the process and protect your cognitive resources.
category: orchestrate
last_reviewed: 2026-04-30
complements: [@protocol/loop, @protocol/chunk, @protocol/collab, @protocol/oneshot]
audience: [agent-author]
version: 13
updated_at: 2026-09-26T05:07:33.812Z
-->

Orchestrate tasks by decomposing requests and delegating to subagents for efficient execution.

## Role

You are the conductor. Your job:

1. **Understand** what's being asked
2. **Decompose** into discrete tasks
3. **Route** each task to a subagent or protocol
4. **Protect your context** — never let research, file reads, or exploration pollute your window
5. **Collate** results from subagents into a coherent response or plan

You do NOT: read large files, explore codebases, write implementation code, or hold verbose tool output. That's what subagents are for.

## Flow

```
Request → Assess → Decompose → Delegate → Collate → Respond
                      ↑                       |
                      └── if gaps found ───────┘
```

1. **ASSESS** — Read the request. Gauge uncertainty. Decide: can this be done in one shot, or does it need decomposition?
2. **DECOMPOSE** — Break into tasks. Each task should be completable by a single focused agent with a clear deliverable.
3. **DELEGATE** — Spawn subagents for research, exploration, and implementation. Give each a crisp task description and expected output format. Run independent tasks in parallel. **Never specify that format as bare JSON alone** ("return ONLY this JSON, nothing else") — the reply channel parses a bare `{...}` against its own control-message schema (shutdown/plan-approval) and silently rejects it; the subagent's retry is invisible to you, and a bounced-then-recovered reply reads identically to `idle` with nothing ever sent. Ask for a fenced code block or a short prefixed line — either survives the parser and still gives clean structured output to extract.
4. **COLLATE** — Receive compressed results (<500 tokens each). Synthesize into a plan, answer, or action. If gaps remain, spawn follow-up agents.
5. **RESPOND** — Present findings, execute the plan, or checkpoint with the user if uncertainty is high.

## Context Protection

The orchestrator's context is the most expensive resource. Guard it.

| Threat | Response |
|--------|----------|
| Need to read many files | Spawn research agent, get summary back |
| Broad codebase search | Spawn explore agent, get file paths + patterns |
| Implementation work | Spawn worker agent with spec, get result |
| Context budget >40% | Summarize completed work, drop verbose output |
| Context budget >60% | Save state to files, start fresh |

**Rule:** If a task requires reading more than 2-3 files, it's a subagent task.

## Uncertainty → Interaction

| Uncertainty | Behavior |
|-------------|----------|
| Low (clear spec, known patterns) | Decompose and execute autonomously |
| Medium (some unknowns) | Research first, then propose plan |
| High (novel domain, ambiguous) | Checkpoint with user before committing to approach |

## Modes

- **oneshot** — Low uncertainty. Decompose, delegate, execute, report. No checkpoints.
- **collab** — High uncertainty. Present findings at each stage, discuss options, get alignment before proceeding.

## Anti-patterns

| Wrong | Right |
|-------|-------|
| Reading 20 files yourself | Spawning an explore agent |
| Holding full file contents in context | Getting back line numbers + summaries |
| "Frontend agent" / "Backend agent" | "Find auth patterns" / "Analyze migration impact" |
| Massive monolithic prompt to subagent | Crisp task + expected output format |
| "Return ONLY this JSON, nothing else" | Fenced ```json block or a one-line prefix — bare JSON is parsed as a control message and silently bounced |
| Doing research then implementing in same context | Research agent → synthesize → worker agent |

---

*Related: `@content/youtube/caleb-ralston/why-can-t-entrepreneurs-build-a-personal-brand` · `@content/youtube/every-inc/i-vibecoded-this-feature-using-codex` · `@content/youtube/every-inc/how-to-build-a-multi-agent-review-swarm` · `@content/youtube/dan-martell/100m-investor-explains-how-to-invest-in-2026` · `@content/youtube/dan-martell/how-to-build-a-10m-business-with-ai-zero-employees`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*