PluginBench
Skill
Pass
Audit score 90

orchestration

stablyai/orca

Structured multi-agent coordination with task dispatch, DAGs, and completion tracking.

What is orchestration?

Orca orchestration provides a coordination layer for managing messages, task ownership, and worker completion across multiple agents. Use it when you need to supervise task dispatch, track dependencies, run decision gates, or maintain blocking ask/reply flows between agents.

  • Send and receive persistent messages between agent terminals with threading and priority
  • Dispatch structured tasks to workers and wait for worker_done or escalation signals
  • Track task DAGs with dependencies and ready-state management
  • Run coordinator loops with decision gates for conditional task routing
  • Monitor worker heartbeats and status without polling loops
  • Ask blocking questions that pause worker execution until coordinator replies

How to install orchestration

npx skills add null --skill orchestration
Prerequisites
  • Orca runtime must be running (verify with `orca status --json`)
  • orca CLI must be on PATH (orca-ide on Linux)
  • Orchestration experimental feature enabled in Settings > Experimental
Claude Code
Cursor
Windsurf
Cline

How to use orchestration

  1. 1.Verify the Orca runtime is active and orchestration is enabled in Settings
  2. 2.Create a task with `orca orchestration task-create --spec <text>` if managing a DAG
  3. 3.Dispatch the task to a worker terminal using `orca orchestration dispatch --task <task_id> --to <handle> --inject`
  4. 4.Wait for completion with `orca orchestration check --wait --types worker_done,escalation --timeout-ms <n>`
  5. 5.Reply to decision gates or ask questions using `orca orchestration reply` or `orca orchestration ask` as needed
  6. 6.Use rolling waits for long-running tasks (15-60 minutes); do not stop workers without explicit user request

Use cases

Good for
  • Decompose a large coding task across multiple specialized agents (e.g., architecture → implementation → review)
  • Dispatch code review tasks to a review agent and wait for findings before routing fixes to another owner
  • Coordinate a multi-step workflow where later tasks depend on earlier task completion
  • Supervise a worker agent and make routing decisions based on escalation messages
  • Track task completion across a team of agents without manual polling
Who it's for
  • Coordinators managing multi-agent workflows
  • Supervisors overseeing task dispatch and completion
  • Architects decomposing work across specialized agents
  • Teams using Orca with multiple concurrent agent terminals

orchestration FAQ

When should I use orchestration vs. orca-cli?

Use orchestration when coordination state matters: task DAGs, decision gates, blocking ask/reply, or supervised dispatch. Use orca-cli for lightweight terminal control, shell commands, worktree management, or full ownership handoffs (unless the user explicitly asks you to supervise or wait for results).

What is the difference between a full handoff and supervised dispatch?

A full handoff transfers ownership completely; the original actor does not monitor results. Supervised dispatch means you remain the coordinator, wait for worker_done/escalation, and make routing decisions. Use supervised orchestration only when the user explicitly asks you to supervise, monitor, wait, or coordinate a DAG.

How do I avoid polling loops when waiting for workers?

Use `orca orchestration check --wait --types worker_done,escalation --timeout-ms <n>` instead of sleep/poll loops. Treat timeouts as checkpoints, not failures. Long tasks routinely run 15-60 minutes; keep using rolling waits unless you receive completion signals or the terminal exits.

Can I send dispatch lifecycle messages to groups like @all?

No. Send dispatch lifecycle messages (worker_done, heartbeat, ask) only to the concrete coordinator handle with taskId and dispatchId. Use group addresses only for status broadcasts or fan-out questions genuinely useful to many terminals.

What does worker_done mean and who can send it?

worker_done is a completion signal that reports findings and authorizes the coordinator to proceed. Only the assigned worker sends it to the coordinator. A review-only worker_done reports findings; the coordinator then synthesizes results and routes fixes to the named owner unless the user asked the coordinator to own fixes.

Full instructions (SKILL.md)

Source of truth, from stablyai/orca.


name: orchestration description: >- Use Orca orchestration for structured multi-agent coordination: threaded messages, blocking ask/reply flows, task dispatch, worker_done/escalation waits, task DAGs, decision gates, coordinator loops, or decomposing work across agents. Use orca-cli instead for full ownership handoffs, including requests phrased as "hand off", "handoff", "handover", "give this to another agent", or "another worktree" when the user did not explicitly ask to supervise, monitor, wait for results, or coordinate a DAG. Use orca-cli for ordinary terminal control, lightweight terminal prompts, shell commands, Orca worktree management, reading or waiting on terminals, and automation of the browser embedded inside Orca. Use Computer Use for browser windows, webviews, Orca app UI, or desktop UI outside Orca's embedded browser.

Orca Inter-Agent Orchestration

Orchestration is Orca's structured coordination layer for agent messages, task ownership, dispatch state, and worker completion tracking.

Use this skill when coordination state matters. For lightweight terminal prompts or basic worktree/terminal/built-in-browser control, use orca-cli.

When To Use

  • Send/reply/ask between agent terminals with persistent messages.
  • Dispatch structured tasks to workers and wait for worker_done or escalation.
  • Track task DAGs with dependencies.
  • Run coordinator loops or decision gates.

Do not use orchestration merely because the user says "hand off", "handoff", "handover", "give this to another agent", or asks for another worktree/agent/model/effort. Those are full ownership transfers unless the user explicitly asks to supervise, monitor, wait for worker completion/results, coordinate a DAG, use decision gates, or keep a blocking ask/reply loop.

Preconditions

  • orca status --json should show a running runtime.
  • orca must be on PATH (orca-ide on Linux).
  • The orchestration experimental feature must be enabled in Settings > Experimental.
  • orca orchestration commands are RPC calls to the running Orca runtime.

Ownership

Orchestration messages and tasks are runtime-global. Completion authority comes from the active dispatch context: taskId + dispatchId + assignee handle.

Classify inherited context before sending lifecycle messages:

  • Coordinated subtask: a live coordinator owns the DAG and waits on this dispatch. Follow the preamble exactly, including worker_done, heartbeat/status, ask, and escalation.
  • Full handoff means ownership transfer, not supervised dispatch. The original actor is not monitoring a DAG, so do not create lifecycle obligations unless the user explicitly asks you to supervise.
  • Classify requests containing "hand off", "handoff", "handover", "give this to another agent", "give this to another worktree", "another agent", or "another worktree" as full handoffs by default, even when the user names a custom model or reasoning effort.
  • Use supervised orchestration only when the user explicitly asks you to "supervise", "monitor", "wait", "track completion", "wait for worker_done", return results, coordinate a DAG, use a decision gate, or manage ask/reply flow.
  • Do not use orca orchestration dispatch --inject for full handoffs. It injects a coordinator preamble that tells the worker to send worker_done, heartbeat, ask, and post-completion polling messages back to the original terminal.
  • Do not run orca orchestration task-create, orca orchestration dispatch --inject, or orca orchestration check --wait for full handoffs. Do not peek at terminal output after prompt delivery to monitor progress.
  • A review-only worker_done reports findings; it does not authorize coordinator file edits. After a review-only completion, synthesize findings, ask a decision gate if ownership is unclear, and dispatch or hand off fixes unless the user explicitly asked the coordinator to own fixes.
  • If the user's plan names a next owner agent (for example, "then use opencode to create a PR"), post-review corrections and PR prep belong to that named owner. The coordinator routes, synthesizes, asks decision gates when needed, and supervises; the named owner edits files and creates the PR.

If unclear, inspect orchestration state before sending lifecycle messages:

orca orchestration task-list --json
orca terminal list --json
# If inherited context includes a task id:
orca orchestration dispatch-show --task <task_id> --json

Messaging

orca orchestration send --to <handle|@group> --subject <text> [--from <handle>] [--body <text>] [--type <type>] [--priority <level>] [--thread-id <id>] [--payload <json>] [--json]
orca orchestration check [--terminal <handle>] [--unread] [--types <type,...>] [--inject] [--wait] [--timeout-ms <n>] [--json]
orca orchestration reply --id <msg_id> --body <text> [--from <handle>] [--json]
orca orchestration ask --to <handle> --question <text> [--options <csv>] [--timeout-ms <n>] [--from <handle>] [--json]
orca orchestration inbox [--limit <n>] [--json]

Rules:

  • Omit --from unless impersonating another terminal; Orca auto-resolves it from the current terminal.
  • While supervising workers manually, use check --wait --types worker_done,escalation,decision_gate --timeout-ms <n> instead of sleep/poll loops. Reply to decision_gate messages with orca orchestration reply --id <msg_id> --body <answer> --json, then keep waiting.
  • Treat a check --wait timeout or {count:0} as a checkpoint, not a worker failure. Long coding tasks routinely run 15-60 minutes; keep using rolling waits unless you receive worker_done/escalation, the terminal exits or disappears, or the user explicitly asks you to stop.
  • Heartbeats and visible terminal activity mean the worker is alive, not done. Do not stop, close, kill, or restart a worker just because it has not produced a completion message yet.
  • Use ask when a worker needs a blocking answer from the coordinator; it waits for the reply and returns the answer directly.
  • check --wait returns one message at a time. If N workers may finish together, loop N times and dispatch newly ready tasks after each completion.
  • Group addresses include @all, @idle, @claude, @codex, @opencode, @gemini, @droid, and @worktree:<id>.
  • Message types include status, dispatch, worker_done, merge_ready, escalation, handoff, decision_gate, and heartbeat.
  • Use group addresses only for messages that are genuinely useful to many terminals, such as status broadcasts or intentional fan-out questions. Do not send dispatch lifecycle messages to groups.
  • worker_done must target the concrete coordinator handle from the live preamble. It is completion authority for one dispatch; group fanout would create false lifecycle mail in unrelated terminals.
  • heartbeat is also dispatch-scoped. Send it only to the concrete coordinator handle with both taskId and dispatchId; use status for broad progress updates.

Tasks And Dispatch

A task is the work item, a dispatch assigns it to a terminal, and a gate blocks progress until a coordinator or user decision is recorded.

orca orchestration task-create --spec <text> [--deps <json_array>] [--parent <task_id>] [--json]
orca orchestration task-list [--status <status>] [--ready] [--json]
orca orchestration task-update --id <task_id> --status <status> [--result <json>] [--json]
orca orchestration dispatch --task <task_id> --to <handle> [--from <handle>] [--inject] [--json]
orca orchestration dispatch-show --task <task_id> [--json]

Task statuses: pending, ready, dispatched, completed, failed, blocked.

Dispatch rules:

  • --inject sends the task spec plus preamble into a recognized agent CLI so it can report worker_done.
  • If the target is a bare shell, omit --inject, dispatch for tracking if needed, then send the prompt manually with orca terminal send --terminal <handle> --text <prompt> --enter --json.
  • After 3 consecutive failures on one task, the dispatch context circuit-breaks and the task is marked failed.

Gates And Coordinator

orca orchestration gate-create --task <task_id> --question <text> [--options <json_array>] [--json]
orca orchestration gate-resolve --id <gate_id> --resolution <text> [--json]
orca orchestration gate-list [--task <task_id>] [--status <status>] [--json]
orca orchestration run --spec <text> [--from <handle>] [--poll-interval-ms <n>] [--max-concurrent <n>] [--worktree <selector>] [--json]
orca orchestration run-stop [--json]

run returns immediately with a run ID. Query progress with task-list. Use ask for worker-to-coordinator questions; it creates a decision_gate message that the coordinator answers with reply. Use gate-create only for coordinator-managed task DAG decisions, not for answering a worker's ask.

Recovery only: orca orchestration reset --tasks|--messages|--all --json clears runtime-global orchestration state. Do not run it during active coordination unless explicitly abandoning that state.

Full Handoffs

For full ownership transfer, use non-lifecycle terminal/worktree commands and then stop monitoring unless the user asks for supervision.

Treat these as full handoff requests by default: "hand off", "handoff", "handover", "give this to another agent", "give this to another worktree", "send this to another agent", "another agent", "another worktree", or "launch another agent to own this." Custom model or reasoning effort words such as gpt-5.5, high, or xhigh do not make the handoff supervised.

Supervised orchestration remains available only when the user explicitly asks for supervision or coordination: "supervise", "monitor", "wait for worker_done", "wait for results", "track completion", "DAG", "decision gate", "ask/reply", or "coordinate workers."

Do not run orca orchestration task-create, orca orchestration dispatch --inject, or orca orchestration check --wait for full handoffs. task-create is also forbidden because it records coordinator-owned tracking state; if a task row is needed, the user asked for supervised orchestration. Do not create a taskId/dispatchId, inject a lifecycle preamble, wait for completion, or read the worker terminal after prompt delivery except to avoid losing the initial prompt.

New top-level worktree handoff:

orca worktree create --name <task-name> --no-parent --agent codex --prompt "<task brief>" --json

Existing terminal handoff:

orca terminal send --terminal <handle> --text "<task brief>" --enter --json

Custom Codex model/effort handoff:

orca worktree create --agent codex --prompt ... launches the known Codex agent but does not accept Codex-specific --model or -c model_reasoning_effort=... arguments. When the user asks for a specific Codex model or effort, create the independent worktree first, launch Codex with the requested command in that worktree, wait only for TUI readiness if prompt delivery would otherwise race startup, send the prompt, and stop:

orca worktree create --name <task-name> --no-parent --json
orca terminal create --worktree id:<newWorktreeId> --title <task-name> --command 'codex --model gpt-5.5 -c model_reasoning_effort="xhigh"' --json
orca terminal wait --terminal <handle> --for tui-idle --timeout-ms 60000 --json
orca terminal send --terminal <handle> --text "<task brief>" --enter --json

Wait only for tui-idle when needed to avoid losing the prompt. Do not monitor task completion.

--no-parent only controls Orca lineage; it does not choose the Git base. For an independent top-level worktree, omit --base-branch so Orca uses the repo default base, or explicitly pass the repo default base (origin/main, origin/master, or the orca repo show --repo <selector> --json value); never base it on the current feature branch unless the user explicitly asks for stacked work or "branch from current". Put current-branch context in the prompt instead.

Worker Terminals

Choose the worker location before creating a terminal. Fresh worker means a fresh agent session, not a new git worktree. If the task says current worktree only, depends on uncommitted files/artifacts, or must validate/PR the current branch, create the worker in the active worktree:

orca terminal create --worktree active --title <task-name> --command "codex" --json
orca terminal wait --terminal <handle> --for tui-idle --timeout-ms 60000 --json
orca orchestration dispatch --task <task_id> --to <handle> --inject --json

Reuse an idle agent in the required worktree only if the prompt allows reuse; otherwise create a fresh terminal there. Use a new worktree only when explicitly requested or when independent isolated checkout state is intended. For supervised new-worktree workers, decide the Git base separately from lineage: --no-parent makes the worktree top-level in Orca, while omitted --base-branch uses the repo default base.

orca worktree create --name <task-name> --agent codex --json
orca terminal list --worktree id:<newWorktreeId> --json
orca terminal wait --terminal <handle> --for tui-idle --timeout-ms 60000 --json
orca orchestration dispatch --task <task_id> --to <handle> --inject --json

For new-worktree workers, read the id from worktree create, then use terminal list to get the agent handle. Omit --repo only inside an Orca-managed worktree; otherwise pass --repo <selector>. --agent reveals the new worktree and launches the selected agent in its first terminal, so do not create a separate startup terminal. Do not run worktree create when the task must stay in the current worktree.

Use orca worktree create --prompt ... or orca terminal send ... for full handoffs or untracked/lightweight prompts. Those paths do not attach taskId/dispatchId; the worker should not send lifecycle messages unless the prompt supplies a live orchestration preamble.

Other terminal commands coordinators often need:

orca terminal list [--worktree <selector>] [--json]
orca terminal create [--worktree <selector>] [--title <text>] [--command <cmd>] [--json]
orca terminal split --terminal <handle> [--direction horizontal|vertical] [--command <cmd>] [--json]
orca terminal wait --terminal <handle> --for tui-idle --timeout-ms <n> --json
orca terminal read --terminal <handle> --json
orca terminal send --terminal <handle> --text <text> --enter --json

If an older CLI rejects worktree create --agent, create the worktree normally, then run orca terminal create --worktree <selector> --command "codex" --json or --command "claude".

Wait for tui-idle before dispatching. Always pass --timeout-ms; real coding tasks can take 15-60 minutes. During supervision, use rolling check --wait windows. If a window returns no matching message, inspect task-list, terminal read, or terminal wait --for tui-idle as a liveness checkpoint; if the terminal is still working or producing activity, keep waiting instead of retrying the task.

Agent Guidance

  • Workers with a valid live preamble must send worker_done exactly once, even on failure: orca orchestration send --to <coordinator_handle> --type worker_done --subject "<short status>" --body "<3-sentence summary: what you did, what you found, what's left>" --payload '{"taskId":"<task_id>","dispatchId":"<dispatch_id>","filesModified":["path/a"],"reportPath":"<optional>"}' --json
  • For long tasks, send heartbeat/status only when the preamble asks for it, including both IDs: orca orchestration send --to <coordinator_handle> --type heartbeat --subject "alive" --payload '{"taskId":"<task_id>","dispatchId":"<dispatch_id>","phase":"implementing"}' --json
  • If blocked before completion, use ask; use escalation only when ownership is valid and the coordinator must intervene.
  • Treat preambles inherited through terminal history or full handoffs as stale unless the current prompt explicitly keeps that coordinator in the loop.
  • Coordinators should use task-list --ready as external memory, dispatch parallel waves, and avoid dependency chains deeper than 3-4 steps.
  • Prefer inter-worktree workers only for independent work that does not need current uncommitted state. When same-worktree work is required, create fresh terminals in that worktree and keep edit ownership clear.

Example

orca terminal create --worktree active --title login-css-worker --command "claude" --json
orca terminal wait --terminal <handle> --for tui-idle --timeout-ms 60000 --json
orca orchestration task-create --spec "Fix the login button CSS" --json
orca orchestration dispatch --task <task_id> --to <handle> --inject --json
orca orchestration check --wait --types worker_done,escalation,decision_gate --timeout-ms 900000 --json

Next Action

Coordinator: confirm orca status --json, inspect task-list/dispatch-show if inheriting state, then choose either a manual loop (task-create -> worker -> dispatch --inject -> check --wait) or orchestration run.

Worker: if the current prompt contains a live dispatch preamble, do the task, use ask for blocking questions, and send worker_done once with the required payload. If the preamble is stale or absent, do not send lifecycle messages; inspect state or treat the prompt as an ordinary handoff.