Auto-generated mirror. Canonical sources:
skills/canopy-runtime/references/runtime-claude.mdandskills/canopy-runtime/references/runtime-copilot.md. Edits go to the canonical files; this page is regenerated byscripts/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
- Skills:
<skills-root>/<name>/SKILL.md - Primitive slices:
<skills-root>/canopy-runtime/references/ops.md(index) →<skills-root>/canopy-runtime/references/ops/<slice>.md
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:
- Resolve
OP_NAMEvia the standard op lookup chain (skill-local<skill>/references/ops.mdor<skill>/references/ops/<name>.md, falling back to<skill>/ops.mdfor legacy skills → consumer-defined cross-skill ops if any → canopy-runtime’s primitive slices). - Verify the resolved op definition carries the marker
> **Subagent.** Output contract: <schema-path>as the first content under its heading; if missing, halt with a contract-mismatch diagnostic. - Launch the subagent via the
Tasktool, passing the bound<<values as the subagent’s inputs; the subagent body uses only those inputs + static skill assets. - Bind the subagent’s schema-shaped result to the call-site
>>name; surface in the parent context.
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:
- Launch an Explore subagent with the task described in the
## Agentbody. - Do NOT inline-read files yourself — the subagent handles all file access.
- Output contract is
assets/schemas/explore-schema.json(or legacyschemas/explore-schema.json). - First tree node must be
EXPLORE >> context.
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.
- Bind by name — assign each result to the
>>name the prose specifies; outputs return in completion order. - One assistant turn, N Task calls — preferred over N serial messages: keeps the prompt-cache prefix stable and avoids
(N − 1) × Rinter-turn reasoning overhead. Promise.allSettledsemantics — a single failure does not abort siblings; surface all outcomes and let downstream nodes branch viaIF.- Heterogeneous fan-out only — different tasks, independent inputs. Data-parallel iteration over a list is not yet specified.
PARALLELblock — when aPARALLELnode is the current tree position, emit oneTaskcall per child in this assistant turn. Deterministic fan-out shape — no prose detection needed. Each child’s>>becomes its binding handle.- Marker-based subagent calls inside
PARALLEL— when children are**OP_NAME** << ... >> ...(bold around op name), each Task call uses the resolved op’s body as the subagent task and binds the schema-shaped result. See## Subagent dispatchabove for the contract.
Invocation
- Wrapper skill:
/canopy <request>— invokes<skills-root>/canopy/SKILL.md - Direct skill:
Follow <skills-root>/canopy/SKILL.md and <request>— bypasses the wrapper - Other skills:
/skill-name— resolved from<skills-root>/<name>/SKILL.md
Op lookup
<skill>/references/ops.mdor<skill>/references/ops/<name>.md— skill-local. Backward-compatible fallback:<skill>/ops.mdat root.- Consumer-defined cross-skill ops (optional; consumers may package these as their own skill).
- canopy-runtime’s primitive slices —
<skills-root>/canopy-runtime/references/ops.mdindexes 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
- Skills:
<skills-root>/<name>/SKILL.md - Primitive slices:
<skills-root>/canopy-runtime/references/ops.md(index) →<skills-root>/canopy-runtime/references/ops/<slice>.md
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):
/fleetorchestration — when fleet mode or autopilot is active, the orchestrator handles fan-out; each op or child runs in its own context window.@CUSTOM-AGENT-NAMEreference — invoke a pre-defined custom agent inline by name; the result populates the call-site>>binding.- 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. -
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.
- Bind by name — assign each result to the
>>name the prose specifies. - Heterogeneous fan-out only — data-parallel iteration over a list is not yet specified.
PARALLELblock — when aPARALLELnode is the current tree position, dispatch each child simultaneously via the resolved path. Each child’s>>becomes its binding handle.- Marker-based subagent calls inside
PARALLEL— when children are**OP_NAME** << ... >> ...(bold around op name), each child dispatches the resolved op’s body as a subagent and binds the schema-shaped result. See## Subagent dispatchabove for the contract.
Invocation
- Wrapper skill:
/canopy <request>— invokes<skills-root>/canopy/SKILL.md - Direct skill:
Follow <skills-root>/canopy/SKILL.md and <request>— bypasses the wrapper - Other skills:
/skill-name— resolved from<skills-root>/<name>/SKILL.md
Op lookup
<skill>/references/ops.mdor<skill>/references/ops/<name>.md— skill-local. Backward-compatible fallback:<skill>/ops.mdat root.- Consumer-defined cross-skill ops (optional; consumers may package these as their own skill).
- canopy-runtime’s primitive slices —
<skills-root>/canopy-runtime/references/ops.mdindexes the per-feature slice files.