Auto-generated mirror. Canonical sources: skills/canopy-runtime/references/runtime-claude.md and skills/canopy-runtime/references/runtime-copilot.md. Edits go to the canonical files; this page is regenerated by scripts/sync-runtime-docs.py.

Runtime Specs

Canopy uses an interpreter pattern: the same SKILL.md runs on Claude Code and GitHub Copilot — only the runtime-spec file loaded at execution time differs. The two specs below are loaded by canopy-runtime based on the active host.


Claude Code Runtime

Defines how Canopy skill constructs execute on the Claude Code platform.

<skills-root> resolves to whichever recognized skills directory canopy-runtime was installed into — .agents/skills/, .claude/skills/, or .github/skills/ (see SKILL.md → Skills root resolution). Claude Code natively reads from .claude/skills/; cross-agent installs at .agents/skills/ are exposed to Claude when the workspace mirrors them or the install script writes to .claude/skills/ directly.


Base paths

Subagent dispatch

Native subagent invocation is supported via per-op markers (preferred) and via the legacy ## Agent section (soft-compat).

Marker-based dispatch (preferred)

When a tree node is **OP_NAME** << input >> output (bold around the op name), launch a subagent with the body of OP_NAME as its task:

Multiple bold-marked op calls inside a single PARALLEL block emit multiple Task tool calls in one assistant message — heterogeneous parallel fan-out. Sibling failures don’t abort each other (Promise.allSettled).

See ops/subagent.md for the full marker contract.

Soft-compat: ## Agent + EXPLORE

Existing skills with ## Agent declaring **explore** + EXPLORE >> context as the first tree node keep working — runtime treats this as a single-element marked op named EXPLORE:

If the ## Agent body uses shape (C) — **explore** — execute NAMED_OP — resolve NAMED_OP via the standard op lookup chain and inject the op body as the subagent’s task.

See ops/explore.md for the soft-compat shapes.

Parallel subagent invocation

When a tree node says “spawn N subagents in parallel,” fan out by emitting N Task tool calls in a single assistant message. The harness runs them concurrently; each subagent has its own context window.

Invocation

Op lookup

  1. <skill>/references/ops.md or <skill>/references/ops/<name>.md — skill-local. Backward-compatible fallback: <skill>/ops.md at root.
  2. Consumer-defined cross-skill ops (optional; consumers may package these as their own skill).
  3. canopy-runtime’s primitive slices — <skills-root>/canopy-runtime/references/ops.md indexes the per-feature slice files.

GitHub Copilot Runtime

Defines how Canopy skill constructs execute on the GitHub Copilot platform.

<skills-root> resolves to whichever recognized skills directory canopy-runtime was installed into — .agents/skills/, .claude/skills/, or .github/skills/ (see SKILL.md → Skills root resolution). Copilot reads skills from .github/skills/ natively; gh skill install on recent gh CLI versions defaults to .agents/skills/ for cross-agent compatibility.


Base paths

Dispatch path resolution

All subagent dispatch — whether from a marked op call, a PARALLEL block child, or a soft-compat ## Agent section — uses the same four-path chain (first match wins):

  1. /fleet orchestration — when fleet mode or autopilot is active, the orchestrator handles fan-out; each op or child runs in its own context window.
  2. @CUSTOM-AGENT-NAME reference — invoke a pre-defined custom agent inline by name; the result populates the call-site >> binding.
  3. Native Copilot subagent dispatch — Copilot’s agent engine natively supports spawning subagents in parallel via its built-in subagent capability (e.g. runSubagent). This is the default path when fleet and named custom agents are not configured. Dispatch all subagents simultaneously; each runs in its own context window.
  4. Sequential inline fallback — only when native dispatch is explicitly unavailable (e.g. tool disabled by the user). Before falling back, ask the user: “Parallel subagent dispatch is unavailable. These steps are intended to run in parallel — proceeding sequentially will be slower. Continue sequentially? Yes No”. Halt if the user says No. If Yes, evaluate each op body sequentially inline. Correctness is preserved; parallelism is lost.

Failure semantics: paths 1–3 follow Promise.allSettled — a single child failure does not abort siblings. Path 4 (sequential) short-circuits on first failure.

Subagent dispatch

Native subagent invocation is supported via per-op markers (preferred) and via the legacy ## Agent section (soft-compat).

Marker-based dispatch (preferred)

When a tree node is **OP_NAME** << input >> output (bold around the op name), dispatch the resolved op’s body as a subagent using the Dispatch path resolution chain above.

Resolution: standard op lookup chain (skill-local <skill>/references/ops.md or <skill>/references/ops/<name>.md, falling back to <skill>/ops.md for legacy skills → consumer-defined cross-skill ops if any → canopy-runtime’s primitive slices). The resolved op definition must carry the marker > **Subagent.** Output contract: <schema-path> as the first content under its heading; if missing, halt with a contract-mismatch diagnostic.

See ops/subagent.md for the full marker contract.

Soft-compat: ## Agent + EXPLORE

Existing skills with ## Agent declaring **explore** + EXPLORE >> context as the first tree node keep working — runtime treats this as a single-element marked op named EXPLORE. Apply the Dispatch path resolution chain above. In all cases the result populates context shaped to assets/schemas/explore-schema.json (or legacy schemas/explore-schema.json).

Output contract is identical across all paths.

If the ## Agent body uses shape (C) — **explore** — execute NAMED_OP — resolve NAMED_OP via the standard op lookup chain and dispatch the resolved op body via the selected path.

See ops/explore.md for the soft-compat shapes.

Parallel subagent invocation

When a tree node says “spawn N subagents in parallel,” apply the Dispatch path resolution chain above to all children simultaneously.

Invocation

Op lookup

  1. <skill>/references/ops.md or <skill>/references/ops/<name>.md — skill-local. Backward-compatible fallback: <skill>/ops.md at root.
  2. Consumer-defined cross-skill ops (optional; consumers may package these as their own skill).
  3. canopy-runtime’s primitive slices — <skills-root>/canopy-runtime/references/ops.md indexes the per-feature slice files.