OpenCode Plugin Development

Patterns and conventions for building plugins for the OpenCode agent framework.

2026-11-24: one package, two host entries, a host-contract matrix

marcusrbrown—opencode-copilot-delegate at b5f11867 (v0.14.1) now has the evidence fields that the 2026-11-10 entry below found missing. Each one is a separate piece of evidence:

  • Peer declaration: @opencode-ai/plugin >=1.14.41 and @opencode/plugin >=2.3.2 are both declared, and both are marked optional in peerDependenciesMeta. The TUI stack (@opentui/*, solid-js) also moved from dependencies to optional peers. The host provides it, and the package does not bundle a copy that could conflict.
  • Export shape: the default export is one object { id, server, setup }. v1 calls server(input) and v2 calls setup(context). CI requires exactly that key set under Node 26. The previous check only confirmed a function-valued default.
  • Registration without a host: a CI smoke step calls server() with a v1-shaped stub and setup() with a fake v2 context (tool.transform/reload/list, session.synthetic). It requires each to register the four tools, renders each tool’s ~standard JSON schema, and calls the returned v2 cleanup.
  • Real-host execution: a host-contract matrix (v1-floor, v1-current, v2, pinned in scripts/opencode-host-pins.json) installs the packed tarball next to each host. It then drives the tools end to end against a replay shim, with no model and no credentials. A path filter skips the matrix on PRs that cannot affect it. An always-run aggregator reports success when the matrix passes or is skipped, so the required check stays honest.

The README’s per-host notification account is v1 client.session.prompt with noReply, and v2 session.synthetic with resume/delivery: queue|steer. On v2 the TUI half auto-loads from the server plugin list. Neither claim was checked against source here. The pattern worth copying is the separation, not the specific matrix: a floor pin, a current pin and each new host line get their own leg, and package-only smoke tests stay in a different job from host-executed contracts. Compare marcusrbrown—systematic’s Host Contract job, which the 2026-09-21 survey found binding only through Release’s needs:.

Sources: package.json, README, ci.yaml. These are source declarations; I did not observe any CI run results.

2026-11-10: an unbounded v1 peer is not a v2 contract

marcusrbrown—opencode-copilot-delegate still declares 0.12.1, with development pin @opencode-ai/plugin 1.19.5 and sole peer @opencode-ai/plugin >=1.14.41. Its README uses singular plugin for server and opt-in TUI installation. There is no declared @opencode/plugin peer in this manifest. Contrast marcusrbrown—systematic and marcusrbrown—metacogs, whose recent snapshots explicitly distinguish both package names and installation keys. A range without an upper bound on the v1 package does not establish support for a separately named v2 API; lack of such a declaration also does not prove runtime incompatibility.

The delegate plugin’s configured verification boundary remains narrower: CI imports the built default entry under Node 24 and asserts a sole function-valued default export, without invoking it, then runs unit tests. The separately declared TUI-preload and integration scripts remain uninvoked across all six inspected workflows. Keep peer declaration, config key, export shape, and real-host execution as separate evidence fields rather than projecting the dual-line support of sibling plugins onto this package.

Sources: the November 10 commit-pinned manifest, README, and CI workflow in frontmatter; workflow listing. These are bounded source observations, not executed compatibility tests.

2026-11-09: installation parity does not transfer method evidence

marcusrbrown—metacogs 0.4.1 declares optional peers for OpenCode v1 @opencode-ai/plugin >=1.19.4 <2 and v2 @opencode/plugin >=2.2.0 <3. Its README distinguishes v1 plugin and v2 plugins, documents four packaged skills and two tools, and warns that copied skills with the same names have undefined discovery precedence. Its manifest pins v2 testing to 2.2.5, while the matrix preserves a dated 2.2.2 scripted-provider pass and still says unverified. A contract pass is not evidence that reasoning methods improve answers on v2.

Claude Code and Codex plugin packages use host-adapted method text and an MCP record tool rather than the standalone shell helper. Their reported manual installation/tool/record checks are not the original OpenCode method evals; copied-skill discovery-only rows remain separately qualified. Codex’s reported record writes under a read-only shell sandbox also show why shell permissions must not be assumed to constrain external MCP writes. Claude Code has optional session-start guidance; Codex discards hooks. One package does not imply identical guidance, approval, or persistence boundaries across hosts.

Sources: the commit-pinned README and manifest in frontmatter. These are documented contracts and reported observations; host code and runtime behavior were not audited.

2026-11-12: trusted configuration is not process isolation

fro-bot—agent now documents V2-only Action and workspace execution, superseding November 8’s workspace V1-default description on its repo page. The plugin retains @opencode/plugin ^2.2.0 / effect ^4.0.0 peers, with development pins 2.2.6 / 4.1.0. Workspace readiness explicitly includes active Systematic and Fro Bot plugin checks, permissions, and credentials when a model is configured. Standalone plugin release still tests before build without setting FRO_BOT_OPENCODE_V2_BIN; it is not an unconditional real-host test.

Root README distinguishes two extension trust paths. Opt-in repo-skills loads default-branch skills on trusted events, not checkout/PR-head content; project config remains disabled. On pull_request, issue_comment and issues, MCP admits only static local servers with no file/env references, dropping remote, referenced and malformed entries. {env: anywhere in the Action config fails setup on those triggers. Local-server commands and literal environment values still reach runner processes: they are trusted operator code, not containment. Other triggers use the broader validated MCP config. MCP tools normally reach the model through Code Mode, unless codemode: false.

The README also says withholding github-token from agent environment and gh config is not an OS boundary: the same Linux user can read the Action process environment through /proc. Use a token acceptable for the agent to hold and separate publication jobs where needed. These are documented limits, not independently tested security properties. Deploy’s task/task_id guard terminology still conflicts with the plugin README’s subagent/sessionID.

Sources: root, deploy and plugin READMEs, plugin manifest and release workflow at a302de1e.

2026-11-08: load status and host identity are separate gates

fro-bot—agent now includes the publishable @fro.bot/opencode-plugin. Its manifest peers on @opencode/plugin ^2.2.0 and effect ^4.0.0, rather than bundling a second host copy. Its README documents session-history tools over the active post-compaction window and rejects subagent calls carrying sessionID. Deploy documentation still calls the V2 guard a task reuse check: that terminology drift is unresolved by this bounded source survey.

The README warns that V2 keeps serving when a plugin fails to load; dependent consumers must check /api/plugin for id fro-bot.opencode-plugin with status active. Server liveness alone does not establish tool or guard availability. Its real-host integration test is documented as conditional on a built bundle and FRO_BOT_OPENCODE_V2_BIN; the standalone release workflow runs tests before building and does not set that variable. Do not mistake its unit/build/import allowlist checks for an unconditional real-host integration gate. Image-level plugin checks are configured separately in github-actions-ci.

Sources: plugin README, manifest, release workflow, and deploy README at the same SHA. These are declared contracts, not executed tests.

2026-11-04: dual-line support needs separate host evidence

marcusrbrown—systematic now declares optional peers for both OpenCode API lines: v1 @opencode-ai/plugin >=1.18.29 and v2 @opencode/plugin >=2.2.0. Its README distinguishes v1 plugin from v2 plugins, while explicitly limiting setup/OCX output to the v1 key. A single package supporting both APIs does not establish installer parity.

The workflow makes the evidence split explicit: four v2 full-contract shards plus two v1 smoke profiles (floor/current), each with checked CLI versions, and separate report guards under one always-reporting aggregator. Host pins are loaded from a data file not read in this survey; the manifest’s v1 1.19.5 and v2 2.2.5 development pins must not be substituted for them. Relevant PRs run the suite; main pushes do not. Neither the advertised peer range nor a green main-push aggregator proves full cross-version coverage.

This also supersedes the October observation that the plugin smoke test expects a function default: the current step requires an object with id, setup, and server, invokes server, then verifies populated agent/command maps. Pi is still only import/shape-checked in that step. Export shape, installer configuration, host profile coverage, and successful execution are four different contracts. Keep them separate when assessing a migration; collapsing them into “supports v2” hides the unfinished edges.

Sources: README, manifest, Main workflow. These are static declarations, not observed test results.

2026-10-26: development pins, peer promises, and host coverage differ

marcusrbrown—opencode-copilot-delegate declares OpenCode plugin dev pin 1.19.3 with peer floor >=1.14.41 in its 0.12.1 manifest. The minor pin crossing since October 10 does not establish host compatibility across the advertised range. Its three package exports still separate server/default, server alias, and opt-in TUI; the manifest likewise separates unit, TUI-preload, and integration test scripts.

All six inspected workflows leave the latter two scripts uninvoked. CI runs test:unit and imports only the built default entry under Node 24, asserting one function-valued default export without calling it. Export-shape validity, factory behavior, TUI loading, and host-version compatibility are separate claims. This corroborates the earlier packaging-gate boundary below; it does not demonstrate passing tests or current runtime behavior. Release’s successful CI prerequisite inherits this configured scope.

README still lists three tools while the directory listing includes the resume tool and its test, and its notification description still differs from the earlier implementation account. Preserve those as dated conflicting evidence rather than using dependency updates or filenames to resolve them. No source, test implementation, or run telemetry was read in this bounded observation.

Sources: manifest, CI workflow, release workflow, README, and workflow listing.

2026-10-20: integration status is conditional evidence

marcusrbrown—systematic now declares a PR path gate, four real-host integration shards, and an always() Host Contract aggregator. Main pushes explicitly mark the suite not required. When required, the aggregator applies the skipped-test/pass-floor guard to all four JUnit/log pairs and independently requires successful shard results. Building each shard before test discovery retains the earlier protection against a missing dist/ skipping assertions.

Qualification to the September/October release-gating observations: the Release job no longer depends on Host Contract; it is a credential-free renderer, while a separate release-gate workflow explicitly names Host Contract among twelve checks. Protection settings and verifier implementation were not read. The durable distinction is between a green conditional status, actual host execution on a specific PR, and approval of that exact head. Those are three separate claims, even when the status name stays unchanged.

The same bounded snapshot distinguishes installation surfaces: the README’s portable npx skills path promises content without tool registration, whereas the optional-peer manifest still declares native OpenCode/Pi entries and a Claude marketplace branch. Content availability is not runtime capability parity. The README’s 31-skill claim still conflicts with 32 immediate skill directories; the 37-agent count agrees after excluding the review README.

Sources: Main workflow, release gate, and README.

Plugin API Surface

OpenCode plugins implement the Plugin interface from @opencode-ai/plugin, receiving a PluginInput object:

  • client — Full SDK client (@opencode-ai/sdk), including client.session.promptAsync() for injecting messages into the parent session.
  • directory — Working directory for the current session.
  • worktree — Git worktree path.
  • project — Project metadata.
  • serverUrl — Plugin server URL.
  • $ — BunShell for shell execution.

Tool Registration

import { tool } from '@opencode-ai/plugin/tool'
 
export const MyPlugin: Plugin = async ({ client, directory }) => ({
  tool: {
    my_tool: tool({
      description: '...',
      args: { input: tool.schema.string().describe('...') },
      async execute(args, ctx) {
        // ctx.sessionID, ctx.ask({...}), ctx.metadata({...})
        return { result: '...' }
      },
    }),
  },
})

Async Notification Pattern

The key mechanism for background task completion is client.session.promptAsync(), which injects a <system-reminder> message into the parent session. The noReply flag controls turn-taking:

  • noReply: true — Message injected silently; parent does not get a turn. Useful when other background tasks are still in flight.
  • noReply: false — Forces the parent agent to take a turn immediately. Use when all tasks complete or on failure.

This mirrors OMO’s background_task/background_output pattern. Reference implementations:

  • oh-my-openagent (OMO) — uses promptAsync with noReply: !allComplete
  • shekohex/opencode-pty — uses client.session.prompt() for PTY notifications

Build and Distribution

  • Runtime: Bun (OpenCode’s native runtime)
  • Build: bun build src/index.ts --outdir dist --target bun --external @opencode-ai/plugin --external @opencode-ai/sdk
  • Type declarations: tsc --emitDeclarationOnly --noEmit false
  • Peer dependencies: @opencode-ai/plugin >=1.14.0, @opencode-ai/sdk >=1.14.0
  • Package type: ESM ("type": "module")

Installation

// opencode.json
{
  "plugin": ["opencode-copilot-delegate"]
}

Plugin-Aware Skills

Skills (e.g., .agents/skills/*.md) should branch on plugin presence:

If your tool catalog includes `copilot_delegate`, `copilot_output`, and `copilot_cancel`
(provided by the opencode-copilot-delegate plugin), prefer those tools for delegation.
Otherwise, use the direct subprocess pattern below.

This ensures skills degrade gracefully when the plugin is not installed.

Plugin Architecture Patterns

Config Hook — Asset Merging

marcusrbrown—systematic demonstrates a comprehensive config hook pattern: discover bundled skills and agents from the plugin’s npm package, merge them into OpenCode’s runtime config, and allow user/project-level overrides to take precedence. The config hook handles three asset types (agents, commands/skills) and respects existing configuration to avoid overwriting user choices.

System Prompt Injection

The system.transform hook allows plugins to inject content into every conversation’s system prompt. Systematic uses this to bootstrap the “Using Systematic” guide, teaching the AI how to discover and invoke skills. This is a powerful pattern but carries security implications — injected content has system-level authority.

Skill Tool Pattern

Rather than registering one tool per skill, systematic registers a single systematic_skill tool whose description lists all available skills. The AI invokes this tool with a skill name to load content on demand. This avoids polluting the tool namespace while maintaining discoverability.

Known Patterns

PatternDescriptionReference
DelegationSpawn CLI subprocess, return task_id, inject notification on completionmarcusrbrown—opencode-copilot-delegate
PTY notificationInject messages via client.session.prompt() for process I/Oshekohex/opencode-pty
Agent discoveryScan ~/.copilot/agents/*.md and <cwd>/.github/agents/*.md for available agentsmarcusrbrown—opencode-copilot-delegate
Config mergingDiscover bundled assets (skills/agents) and merge into OpenCode config via config hookmarcusrbrown—systematic
System prompt injectionInject bootstrap content into system prompts via system.transform hookmarcusrbrown—systematic
Skill toolSingle tool with dynamic skill loading (avoids tool namespace pollution)marcusrbrown—systematic
OCX registryComponent-level distribution via ocx CLI with named profiles (V2 schema since v2.6.0)marcusrbrown—systematic
Factory deduplicationSingleton guard preventing duplicate plugin registration across multiple opencode.json sourcesmarcusrbrown—systematic
Content integrity gateCI-enforced validation that all skill/agent sub-files are properly imported and shippedmarcusrbrown—systematic
Removed-name disable-list toleranceDisable lists (disabled_skills/disabled_agents) accept names that were once bundled but later removed; load-time silently drops them with a warning instead of failing validation. A content-integrity gate enforces removed ∩ bundled = ∅. Prevents a later upstream cleanup from bricking configs that had disabled the removed item (systematic v2.32.0, #534)marcusrbrown—systematic
Discovered skills as slash commandsBeyond bundled assets, discover the user’s/project’s own skills from the six roots OpenCode itself scans (global ~/.claude/~/.agents, project .claude/.agents walked to worktree root, .opencode dirs) and register each as a /slash command, applying upstream last-write-wins precedence so the command that wins matches what OpenCode’s skill tool would resolve. Model-invocable skills get a shim loading via the native skill tool with $ARGUMENTS passthrough; command-only skills inline the SKILL.md body. Gated by skills_as_commands toggle (default true), suppressible per-command via disabled_commands. Idempotency comes from rebuilding command config from disk each launch (OpenCode config-hook mutations are in-memory per load, never persisted) rather than from ownership markers (systematic v2.33.0–v2.33.2, #592–#594)marcusrbrown—systematic

Process Tree Management

marcusrbrown—opencode-copilot-delegate uses fkill 10.0.3 for cross-platform process tree cleanup. Key pattern: fkill(pid, { force: false, forceAfterTimeout: 2000, waitForExit: 5000 }) with .catch() guards on all kill calls in abort handlers. On macOS, tree: true is Windows-only, so the plugin targets the entire process group via fkill(-pid) with subprocesses spawned detached: true.

Standalone .opencode/tools/ Custom Tools (no Plugin factory)

Not every OpenCode tool surface starts as a published Plugin. fro-bot—space-bus at its 2026-07-03 MVP demonstrated the lighter project-local custom-tool path: files in .opencode/tools/ where the filename is the tool name, each exporting tool({ description, args, async execute(args, ctx) }) from @opencode-ai/plugin. tool.schema is Zod; ctx provides { agent, sessionID, messageID, directory, worktree }; tools run in OpenCode’s Bun runtime with unrestricted fetch to localhost.

  • No .opencode/package.json needed — .opencode/tools/ resolves @opencode-ai/plugin from repo-root node_modules directly.
  • Adapters stay dumb. space-bus keeps all logic in src/core.ts and makes each tool file a thin adapter (parse args → call core → format). This made the later conversion to a distributable Plugin a packaging move, not a rewrite.

Update (2026-07-18): the packaging-move bet paid off — space-bus has shipped as a published Plugin (@fro.bot/space-bus on npm, default-exported factory via src/index.ts returning the six-tool map). The .opencode/tools/ layout was the dogfood scaffold; the published shape is src/index.ts + src/tools/*.ts (makeBus* factories). The “logic in core, thin edge adapters” discipline survived the conversion intact.

Browser-safe subpath exports + reserved-subpath loader trap (space-bus, 2026-07-18)

Two durable published-plugin patterns from space-bus’s library-surface work:

  • CI-enforced browser-safe subpaths. A plugin can publish subpath exports for renderers that want structured state, split into a browser-safe lane (/core, /contract, /format, /attach — no node:*, injected seams for fs/env/crypto) and a Node-only lane (/config, /managed-server, /registry). A browser-safety.test.ts bundles the browser lane for a browser target and asserts no node: imports and no path into the Node lane. Test the published dist, not just src — space-bus 0.10.1 fixed a createRequire/node:module prelude that broke Vite bundling (Mothership) even though the src-level test passed; the fix added a dist-level browser-safety assertion.
  • Reserved-subpath loader resolution. OpenCode’s plugin loader resolves exports["./server"] before main. space-bus published its managed-server lifecycle at /server and broke plugin loading with Plugin export is not a function for 0.6.0–0.9.0 on npm — /server was resolving to the lifecycle module instead of the plugin factory. Fix (0.10.0): remap ./server to the plugin entry and move the lifecycle API to /managed-server. Lesson: don’t publish a non-factory export at a subpath the loader may probe.
  • Consolidate the session API into the browser-safe lane (2026-08-04, space-bus 0.14.0/0.15.0). When multiple consumers (a plugin’s own tools, an MCP facade, a renderer like marcusrbrown—mothership) all need to read/answer OpenCode sessions, put the primitives in the browser-safe /core lane so nobody maintains a parallel OpenCode HTTP client. space-bus added messages() (bounded full-message read, hard-capped, ownership resolved from the roster not a caller directory), questions()/answerQuestion() (complete nested pending-question read + ownership-and-cardinality-checked answer, refusing cross-session requestId and mismatched answer counts with no mutation), an opt-in fail-closed dispatch({ onPendingQuestion: "blocked" }) (returns typed {mode:"blocked",requestId} or a stable error instead of guessing under ambiguous /question state), and message correlation: createDispatchMessageId() mints an OpenCode-compatible ascending id with no Node builtins (Web Crypto only), and a typed DispatchFailure distinguishes phase:"not_sent" (verified pre-mutation) from phase:"indeterminate" (a mutation may already have landed) so callers can reconcile safely after an error. Two durable design rules here: validation errors return one stable generic message that never echoes the rejected input (no reflected-injection surface), and unknown fields are omitted, never sent as undefined/null — both keeping the discriminated-union Result<T> contract clean across the boundary.

OpenCode Server API as a multi-project control plane

space-bus also documents using one opencode serve instance to multiplex many project directories via per-request routing rather than a plugin at all — a distinct pattern worth recording for anyone building agent-coordination surfaces:

  • Directory resolution order: session’s stored directory → ?directory= query param → x-opencode-directory header → server cwd. An InstanceStore lazily loads an isolated instance (config, plugins, AGENTS.md) per directory, so each project’s own agent config applies.
  • Session store is global across directory headers: GET /session/{id} resolves regardless of the directory header sent — attribute a session to its project via the session’s own directory field, not the probe header. GET /session (list) and /session/status are directory-scoped.
  • Diff retrieval is version-sensitive: upstream opencode #30127 (v1.16.0) zeroes session-level diff summaries (GET /session/{id}/diff → []); aggregate per-turn diffs from GET /session/{id}/message (last turn wins per file, à la upstream PR #33444) as a fallback. @fro.bot/harness builds ≥ 1.17.13+harness.ee55e157 carry #33444 so GET /session/{id}’s summary.diffs is populated directly.
  • A stdio MCP facade (@modelcontextprotocol/sdk) can re-expose the same tools to Claude Desktop from the same core — the config path must be absolute (Claude Desktop launches with no cwd).

Marcus’s Plugin Repos

Reponpm PackagePurposeStackStatus
marcusrbrown—systematic@fro.bot/systematicStructured engineering workflows (~48 bundled skill dirs, 51 agents)Bun, Biome, Zod-typed config, semantic-releaseActive, v2.33.3
marcusrbrown—opencode-copilot-delegateopencode-copilot-delegateDelegate tasks to Copilot CLI as background subprocesses; opt-in /copilot-status TUI halfBun, Biome, ChangesetsActive, v0.12.1 (4 tool files: delegate/output/cancel/resume; README still lists 3)
marcusrbrown—cortexkit-anthropic-auth@marcusrbrown/opencode-anthropic-auth + @marcusrbrown/anthropic-auth-coreClaude Pro/Max OAuth, fallback accounts, quota routing, prompt-cache controls, optional Cloudflare Worker relay; OpenCode + Pi share the same coreBun, Biome, Lefthook, monorepo workspacesActive fork, 1.2.2-mb.2 (fork of cortexkit/anthropic-auth); Pi package private in fork
fro-bot—space-bus@fro.bot/space-busWorkspace agent bus — a control agent tasks per-project agents over one directory-routed opencode serve; MCP facade + browser-safe library subpaths (now with session-interaction + message-correlation /core primitives)Bun, Biome, zod v4, Changesets + npm OIDCActive, v0.15.0 (6 tools: bus_roster/task/status/result/wait/registry)

These plugins use Bun + Biome (not the @bfra.me/* ESLint/Prettier stack), establishing this as the standard for Marcus’s/Fro Bot’s OpenCode plugin repos. space-bus and copilot-delegate both publish via Changesets (space-bus via npm OIDC trusted publishing, no NPM_TOKEN); systematic uses semantic-release.

Cross-Process OAuth Refresh Locking

marcusrbrown—cortexkit-anthropic-auth documents a well-tuned pattern for OAuth refresh across multiple OpenCode processes sharing a single auth sidecar:

  1. Jittered background refresh timers so concurrent processes do not all hit the OAuth endpoint at the same due timestamp (1.2.2).
  2. Cross-process atomic filesystem lock so a process cannot steal a lock while another is still initializing it (1.1.3, hardened in 1.2.2). Without this, two processes can each successfully refresh, but the second consumes a rotated refresh token and the first loser ends up with invalid_grant.
  3. Wait-and-rejoin on contention: when a main OAuth refresh is already in progress, followers wait briefly and re-read OpenCode auth so they join the successful token rotation instead of failing immediately.
  4. Refresh endpoint failover: as of 1.2.1, refresh moved from platform.claude.com to https://api.anthropic.com/v1/oauth/token after the former returned OAuth 429 repeatedly during proactive refresh.

This is a useful reference pattern for any OpenCode plugin that shares per-user credentials across multiple agent processes.

Two-Half Plugin Pattern (server + TUI)

marcusrbrown—opencode-copilot-delegate v0.10.0+ ships two plugin entries in one npm package:

// package.json
{
  "exports": {
    ".":     { "import": "./dist/index.js" },         // server half
    "./tui": { "import": "./dist/tui/index.js" }      // TUI half
  },
  "oc-plugin": ["server", "tui"]
}

Users opt into each half independently:

// opencode.json  — server half registers the tools
{ "plugin": ["opencode-copilot-delegate"] }
 
// tui.jsonc     — TUI half adds /copilot-status
{ "plugin": ["opencode-copilot-delegate/tui"] }

Build target split. The server entry builds with target: 'node' (plain Node ESM loadable, gated by a CI export-shape assertion). The TUI entry stays on target: 'bun' because @opentui/solid is Bun-specific.

Server ↔ TUI RPC. The server half exposes a localhost-only RPC listener and writes a per-session authenticated port file under <XDG_CACHE_HOME or ~/.cache>/opencode/copilot-delegate/. The TUI half reads the port file to find the right server instance. Cleanup is best-effort — OpenCode’s server plugin API has no dispose hook today, so cleanup is tied to process exit signals and the orphan-reaper covers missed shutdowns.

OpenCode Plugin Loader Gotchas

These bit upstream plugins before; institutionalizing the fixes saves hours of incident response.

Loader treats every named export as a plugin factory

The loader iterates every named export from a plugin entry point and invokes each with undefined input. Stray named exports (helpers, types, internal utilities) get called as plugin factories and crash on the missing input.

  • Systematic regressed here in v2.5.0 and v2.12.1 (hours of downtime each time).
  • opencode-copilot-delegate v0.12.0 moved wireRpcServerCleanup out of src/index.ts into src/lib/rpc-cleanup.ts and added a CI gate that runs node --input-type=module -e "import('./dist/index.js').then(m => …)" between Build and Unit tests, exiting non-zero if anything other than default is exported or default is not a function. tests/package-exports.test.ts mirrors the assertion locally.

Rule: Plugin entry points export only default. Period.

api.command.register is unstable across OpenCode versions

  • OpenCode 1.14.42 removed api.command.register in favor of the keymap engine.
  • 1.14.44+ restored it as a deprecated shim translating to api.keymap.registerLayer.

TUI plugins that unconditionally call api.command.register silently lose their slash commands on the version where it’s gone. Runtime-feature-detect both paths:

if (typeof api.keymap?.registerLayer === 'function') {
  api.keymap.registerLayer({
    commands: [{ namespace: 'palette', name: 'copilot-status', title: 'Copilot Status', category: 'Copilot', run }],
    bindings: [],
  })
} else if (typeof api.command?.register === 'function') {
  api.command.register({ /* ... */ })
} else {
  // Defensive: log warning, plugin still loads without the slash command
}

opencode-copilot-delegate’s TUI half follows the dual-path pattern Magic Context shipped in commit 5fe1c4f.

Host zod ≠ plugin zod (per-parameter description loss)

OpenCode’s tool catalog serializes plugin schemas via the host’s bundled zod, not the plugin’s. Plugin-side .describe() metadata lives in a separate module-local metadata registry and is invisible across the boundary, so per-parameter descriptions get dropped before reaching the LLM.

Two known workarounds:

  1. _zod.toJSONSchema override (v0.7.0 fix in marcusrbrown—opencode-copilot-delegate, same fix shipped by @cortexkit/opencode-magic-context and @cortexkit/aft-opencode): patch each tool arg schema with a serialization override that delegates back to the plugin-local zod. Use src/lib/normalize-tool-arg-schemas.ts-style helpers.
  2. .describe().optional() (v0.6.0 partial fix): zod’s toJSONSchema(…, { io: 'input' }) unwraps .optional() and drops descriptions attached to the wrapper. Reordering to .describe(…).optional() places the description on the leaf type so it survives the unwrap. Insufficient on its own when host/plugin zod are different module instances — pair with the override above.

Pin zod as a direct dependency with a matching overrides entry so the plugin’s own install tree stays on one version (resolves TS2883 from dual-zod trees at build time). overrides is local-install-only; downstream consumers may still see a different transitive zod from their OpenCode host.

Generalized “single-root type identity” override (2026-08-25): the same footgun recurs whenever a TUI/runtime dep bundles its own copy of a peer. marcusrbrown—opencode-copilot-delegate’s stalled @opentui/* 0.4.x upgrade (fro-bot autoheal PR #335, 0.2.7 → 0.4.5) is blocked because @opentui/solid@0.4.x bundles its own @opentui/core, producing duplicate branded type identities (TextRenderable, BoxRenderable, KeyEvent, …) that break bun run typecheck. The fix mirrors the zod pattern exactly: add an overrides.@opentui/core entry pinning both packages to the same version so TypeScript resolves the branded renderables from a single root install. Rule of thumb: any dep that re-bundles a shared core needs a root overrides pin to collapse type identities before a major will typecheck.

api.command.register removal isn’t the only churn — narrow peer ranges accordingly

opencode-copilot-delegate v0.12.0 narrowed peerDependencies['@opencode-ai/plugin'] from >=1.14.0 to >=1.14.41 to align advertised compatibility with what’s actually tested. Plugin authors should narrow peer ranges in lockstep with the OpenCode versions their feature-detection branches actually cover.

Orphan Subprocess Reaping

When a plugin spawns long-running subprocesses, OpenCode crashes or reloads can leave orphans. marcusrbrown—opencode-copilot-delegate (v0.2.0+) ships a generalizable pattern:

  1. Per-instance PID file at <XDG_STATE_HOME>/<plugin-name>/orphans/<plugin-pid>.pids, one line per spawned subprocess. Entry removed on every terminal status transition.
  2. Strict identity gate before any kill: live process’s comm (kernel-tracked executable name from ps -o comm=) AND lstart (start-time string) must match values recorded at spawn time. Rules out both PID reuse and cross-instance kills of a live foreign instance’s children.
  3. Spawner liveness probe (process.kill(<plugin-pid>, 0)) before reaping any foreign file. Live spawner → skip. Dead spawner → reap entries, delete file.
  4. Streaming worker pool (cap 5) drains a shared queue; a slow ps probe blocks only its own worker.
  5. Combined ps -p <pid> -o comm=,lstart= query: one fork/exec gets an atomic kernel snapshot of both identity legs.
  6. Configurable timeouts with cooperative AbortSignal cancellation. In-flight workers cooperate by skipping their next mutating step on abort, so dangerous side effects can’t fire after the call returns.
  7. Same-user symlink hardening: O_NOFOLLOW on PID file open/truncate; reject symlinked PID file parent directories before scanning.
  8. Race-safe cleanup: every truncate/unlink goes through a per-file serializeWrite lock.

This pattern generalizes to any plugin that spawns subprocesses it must clean up across crashes.

Per-Process Plugin Factory Singleton

When a user lists the same plugin in both ~/.config/opencode/opencode.json and a project-level opencode.json, OpenCode’s host previously invoked the factory once per source. Two divergent fixes:

PluginPatternRationale
marcusrbrown—systematic (PR #352)Per-load registrationNo exclusive resources; cleaner to register cleanly each time
marcusrbrown—opencode-copilot-delegate (v0.8.0+)globalThis Symbol singleton; duplicate invocations return empty hooks {} (v0.11.0)doInit binds a TCP port (RPC server) and writes a PID file — running it twice in the same process would race on exclusive resources

The empty-hooks-on-duplicate-invocation fix specifically targets the LLM-visible tool catalog: the host iterates each source’s returned hook surface and registers every tool entry it finds, even when two sources return the same JS reference. Returning {} on duplicates gives the host nothing to register a second time. The first invocation still runs doInit once and receives the real hooks; subsequent invocations in the same PID receive {} and emit a one-time warning so duplicate-config situations stay observable.

Both plugins document the divergence inline with cross-references to each other’s source files.

Documentation Deployment

marcusrbrown—systematic deploys its Starlight/Astro docs site to a separate repo (fro-bot—systematic) rather than using the source repo’s GitHub Pages. The docs site at fro.bot/systematic/ also serves the OCX component registry (.well-known/ocx.json → /systematic/index.json), enabling ocx CLI to install individual skills and agents by URL. See github-pages for the cross-repo deploy pattern.

As of the 2026-05-22 fro-bot—systematic survey, the same docs site is now the canonical host for the user config JSON Schema:

  • https://fro.bot/systematic/schemas/v<major>/systematic-config.schema.json — pinned $id, intended for "$schema" references in systematic.json / systematic.jsonc for IDE autocomplete (VSCode, Zed, IntelliJ). This path is major-versioned and NOT stable across majors.
  • https://fro.bot/systematic/schemas/latest/systematic-config.schema.json — moving pointer for “current”.

Schema is draft-07, describes top-level keys agents, categories, disabled_skills, disabled_agents, disabled_commands, bootstrap, skills_as_commands (since systematic v2.33.0), and — since the v3 minor train (observed 2026-08-06) — pi_subagents and workflow_guard (ten properties total). The schema’s own $schema property is documented as informational only — the systematic loader does not fetch or validate against it; it exists purely to switch on editor support. The same docs deploy drives the OCX registry, the rendered guide pages, and this schema — three different consumer contracts living on one gh-pages branch.

Breaking-path precedent confirmed (2026-07-22 fro-bot—systematic survey): when the plugin crossed the v2 → v3 major, the schema host dropped schemas/v2/ entirely (it now returns HTTP 404) and replaced it with schemas/v3/; latest/’s $id re-pointed to the v3 URL. Majors replace the versioned path wholesale — they do not co-serve old majors. Any consumer that pinned "$schema" to a vN URL silently loses autocomplete/validation at the next major (no error surfaced). Lesson: pin latest/ for a floating contract, or expect to re-pin vN at each major. The same v2 → v3 crossing contracted the OCX registry catalog from 104 → 73 components (agents 51 → 37, skills 48 → 31) — the first component contraction observed, a source-side curation event rather than growth.

Two-axis versioning confirmed (2026-08-06 fro-bot—systematic survey): the config-schema URL and the OCX catalog move on independent clocks. Across the v3 minor train (v3.2.5 → v3.6.0), the OCX catalog stayed frozen at 73 components while the config schema mutated additively in place under schemas/v3/ — the property set grew 8 → 10 (pi_subagents, workflow_guard added, both optional/backward-compatible). This is the third consecutive interval the schema grew within a major (skills_as_commands at v2.33.0, then v3 rebasing, now these two). The durable rule: vN/ paths mutate additively within a major and are replaced wholesale at the next major; the OCX catalog only changes at majors (or explicit source-side curation), not on every minor. A consumer that only cares about the catalog can ignore minor releases; a consumer that resolves $schema for editor support benefits from every minor but must accept in-place field growth.

Axis independence re-confirmed with the pairing inverted (2026-08-21 fro-bot—systematic survey): across the v3 minor train v3.6.0 → v3.12.4, the config schema held flat at 10 properties (no additions since 2026-08-06) while the OCX catalog version advanced six minors (still 73 components — the catalog count is frozen at the major boundary, but the advertised version string tracks each release). This is the first non-mutating schema interval since 2026-06-25, breaking the three-in-a-row additive streak — and it demonstrates the two axes are genuinely decoupled in both directions: prior three intervals were “catalog-count frozen, schema grows”; this one is “schema frozen, catalog version climbs.” The rule stands; neither axis is a leading indicator of the other. Also observed: an npm 2.33.4 v2 backport published to the retired major line did not re-serve the dropped schemas/v2/ path (still 404) because the deploy target only mirrors dist-tags.latest (3.12.4) — the wholesale-replace-at-major precedent is not reversible by a late v2 patch.

Refinement — “the schema is unchanged” was measuring a header (2026-09-04 fro-bot—systematic survey): the two-axis rule above stands as stated, but the axes are not orthogonal beneath the surface. Four surveys tracked the config schema by counting its top-level properties (7 → 8 → 10 → flat). The served file is 38,180 bytes with 74 definitions, and its agents property is a closed enumeration of the entire bundled agent roster — 74 explicit keys (37 bare names + 37 category/name aliases) under additionalProperties: false. Adding or removing one agent upstream rewrites the schema body while the top-level count stays at ten. So “schema frozen” readings were claims about a header, not content.

Two transferable rules for any generated, published JSON Schema:

  1. Track a content fingerprint, not a property count. Byte length, definitions count, and a hash prefix turn a nested mutation into a detectable event. (Baseline recorded on the repo page.)
  2. A generated schema that enumerates a runtime roster is a second copy of that roster. It is therefore a cross-checkable artifact: the schema’s 37 bare agent names and the OCX registry’s 37 agent components must agree, and a mismatch means the catalog and the IDE contract disagree about what exists. Two published artifacts from one build are worth diffing against each other, not just against their own history.

Asymmetric strictness inside one schema — closed agents, open categories: agents names every valid key and rejects the rest; categories is {propertyNames: {type: string}, additionalProperties: <overlay>}, so any string is a valid category name even though the bundled categories are real and finite. Net effect for a user editing systematic.json: misspell an agent and the editor underlines it; misspell a category and the editor is silent and the overlay does nothing. Generated schemas inherit strictness from whatever the generator happened to model as an enum versus a record — the looser half is invisible precisely where a typo costs the most to debug. When emitting a schema from types, audit which keyed objects ended up open.

A non-standard keyword is documentation, not enforcement: the same schema carries 16 occurrences of a "trust" keyword with values any and project-or-higher, attached to fields like model, temperature, top_p, and per-agent skills. Draft-07 validators ignore unknown keywords, so this vocabulary is inert for every consumer except the plugin’s own loader — not enforced, not surfaced in IDEs, invisible through any standard validator. The naming implies a config-source trust tier (which fields a project-level file may set versus which require user-level config); that reading is inference. Either way: if a distinction matters for safety, expressing it as a custom keyword in a published schema communicates it to nobody who is not already reading your loader. Encode it in the shape (separate schemas per trust tier, or $comment plus real constraints) or document it in prose the consumer actually sees.

Deploy fan-out is release-gated, not push-gated (2026-09-04): the docs/registry/schema deploy fires on npm publish, not on merge. Sixteen source commits (one docs:, fifteen chore(deps)/chore(dev)) landed on main after the last deploy and produced zero deploys, because semantic-release cut no release from non-releasable commit types. Consequence for anyone auditing a plugin’s published artifacts: a stale docs/registry host under a conventional-commits release gate is the correct output of a healthy pipeline, and the cheap way to tell it apart from a dead pipeline is to read the producer’s release feed rather than its pushed_at — which in this case showed same-day activity from open PR branches while the last release was ten days old.

Bundled Skill for Upstream Sync (cortexkit_anthropic-auth pattern)

marcusrbrown—cortexkit-anthropic-auth ships a .agents/skills/anthropic-auth-upstream-release/SKILL.md in the repo root. OpenCode’s .agents/ discovery path picks it up automatically for any agent working in that repo, giving the agent explicit procedural context for upstream sync operations and fork-invariant release cutting.

This is the first instance in the Marcus ecosystem of a repo-local skill scoped to a specific operational domain (upstream-sync / fork-release) rather than a general-purpose engineering skill. Pattern notes:

  • Skill is named after the operation domain, not the repo — anthropic-auth-upstream-release is meaningful outside the repo’s own slug.
  • Covers only upstream sync + fork release; ordinary feature work is explicitly out of scope, preventing skill over-reach.
  • Encodes all fork invariants (package names, version lane, npm publish rules) in one place so agents and human contributors see the same guardrails.

Contrast with marcusrbrown—systematic which ships general-purpose skills (ce:plan, ce:work, etc.) distributed for consumption by other OpenCode users — the cortexkit-auth pattern is internal/operational, not distributable.

Follow-up (2026-09-02): the skill outlived the practice it encodes. The skill still ships and still describes upstream sync, fork-conflict resolution, vX.Y.Z-mb.N release cutting, and npm metadata validation. It has been exercised exactly once. The fork is now 334 commits behind upstream with 32 missed releases, and the two-branch mechanism the skill assumes — an upstream-tracking main alongside a fork-specific default branch — was abandoned at that single use: the mirror sits at release: v1.2.2 (2026-05-21), older than the fork’s own sync point, because the v1.2.5 merge landed directly on marcusrbrown/main.

The transferable caution for repo-local operational skills: a skill is documentation with an execution surface, and it decays exactly like documentation. Nothing verifies that the branches, tags, or lanes a skill names still exist in the shape it describes, and an agent handed a stale procedural skill will follow it confidently. If the procedure has preconditions (here: “the mirror is current”), the skill should assert them before acting rather than assume them.

Decommissioning a Release Lane Takes Three Deletions (2026-09-02)

From marcusrbrown—cortexkit-anthropic-auth. The repo’s release contract forbids the mb dist-tag lane in three separate places — .github/instructions/release.instructions.md (“Do not reintroduce the mb dist-tag lane”), .github/copilot-instructions.md, and the fro-bot.yaml prompt env vars that every mode references. PR #6 removed the lane from the publish workflow on 2026-05-26.

The tag is still live on npm. Both fork packages carry dist-tags: { latest: 1.2.5-mb.3, mb: 1.2.2-mb.2 } as of 2026-09-02. npm install @marcusrbrown/opencode-anthropic-auth@mb resolves, succeeds, and installs a build three fork-releases stale — permanently, because the pipeline that would advance it no longer exists.

A dangling dist-tag is strictly worse than a deleted one: it is a live install surface with no producer, and it fails by succeeding. No CI assertion catches it, and the reason is structural — verify-artifacts.mjs and the release-lane-watch prompt section both validate what the release publishes, and the release does not publish to mb. Removing a code path removes it from the set of things your tests can observe.

The rule: retiring a distribution channel requires deleting the CI job, the registry pointer (npm dist-tag rm), and the documentation that references it. Only the first is verifiable by the pipeline; the other two need a deliberate step. Applies equally to GHCR tags, GitHub release channels, and latest-style aliases on any registry.

The same repo supplies the third-deletion instance in isolation: README.md still instructs Pin @marcusrbrown/opencode-anthropic-auth@1.2.2-mb.2 and describes both packages as published “at 1.2.2-mb.2”, never updated across three subsequent tagged releases. So the registry metadata and the install docs are two independent stale pointers that converge on the same abandoned version while the pipeline moved on without either. For plugin repos specifically this matters more than usual: OpenCode resolves plugins by package specifier from user config, so a stale documented pin propagates into consumers’ opencode.json and stays there — the namespace-pinning rationale that motivated the fork in the first place cuts both ways.

App-Embedded Design-Gate Plugin (in-repo .opencode/impeccable/)

Not every OpenCode plugin is published or general-purpose. A recurring app-embedded pattern: an application repo vendors an OpenCode plugin in-tree to run a design/quality gate against the agents that work on that same repo, rather than consuming the gate as a pinned CI action.

  • fro-bot—dashboard (2026-07-23) first vendored the Impeccable design gate as .opencode/impeccable/plugin.ts alongside .agents/skills/impeccable/, wiring .opencode/tsconfig.json into check-types and adding @opencode-ai/plugin as a devDep.
  • marcusrbrown—marcusrbrown-github-io (2026-07-25, surveyed via the marcusrbrown.github.io name binding) took the same move: root opencode.json registers "plugin": ["./.opencode/impeccable/plugin.ts"], backed by .opencode/impeccable/{plugin.ts, hook-bridge.ts} (+ plugin.test.ts, hook-bridge.integration.test.ts) and .opencode/tsconfig.json in the check-types script; @opencode-ai/plugin@1.18.2 devDep. The hook-bridge.ts naming suggests the plugin bridges OpenCode hook events into the Impeccable gate’s evaluation surface.

Distinguishing traits vs the distributable plugins above: no npm publish, relative-path plugin registration (./.opencode/... not a package name), and the plugin is a repo-local build artifact type-checked by the app’s own tsc pass. This is the Impeccable gate propagating from a pinned CI action into a repo-local plugin across the fleet — worth tracking whether it lands a shared/published shape or stays vendored per-repo.

One Content Source, Three Harnesses: Optional Peers as the Portability Primitive (2026-09-05)

From the first direct source-side survey of marcusrbrown—systematic v3 (9bceff39, v3.16.1). The largest plugin on this page stopped being an OpenCode plugin and became a workflow system with three shipped harness adapters. The mechanism is small enough to copy:

"peerDependencies": {
  "@opencode-ai/plugin": "^1.1.30",
  "@earendil-works/pi-coding-agent": "^0.83.0",
  "typebox": "^1.1.38"
},
"peerDependenciesMeta": { /* all three optional: true */ }

Every harness peer is optional. The package installs and functions with none present; the harness is a capability discovered at load, not a dependency declared at install. One published tarball serves three hosts through three different discovery channels:

HostDiscovery channelBuild target
OpenCodeexports["."] → dist/index.js, registered via "plugin": [...] in opencode.jsonbun build --target bun
pi-coding-agenta top-level "pi" manifest key in package.json declaring extensions + skillsbun build --target node
Claude Codea generated branch consumed via .claude-plugin/marketplace.jsonseparate CI build script

Three lessons for anyone shipping to more than one agent host:

  1. Optional peers are the portability primitive. They let you type against a host API without requiring it, and they let the consumer’s package manager stay quiet about the two hosts they don’t use. The alternative — separate -opencode / -pi packages — triples the release surface for content that is identical.
  2. Hosts differ in runtime, not just API. OpenCode is a Bun host; Pi is a Node host. A single --target bun build would not have worked. If you keep an engines.node floor, the Node-targeted entry point is what makes it true.
  3. The type-system dependency travels with the host. Pi’s extension API is TypeBox-typed (typebox rides along as an optional peer) where OpenCode’s is Zod-typed. Multi-harness support means carrying two schema libraries, and the tarball pays for both.

The capability matrix that marks its own unknowns

The transferable artifact is HARNESSES.md — a 6-harness × 5-capability matrix shipped inside the npm tarball ("files" lists it next to dist), on a two-tier model: Tier 1 shipped adapter (OpenCode, Pi, Claude Code) vs Tier 2 documented portability target (Codex CLI, Gemini CLI, GitHub Copilot).

Two properties make it worth imitating:

  • Every cell carries a citation key ([OC-1], [PI-7], [CC-9]) resolved by an Evidence registry section. Capability claims about somebody else’s tool decay fast; a citation makes decay checkable.
  • Unverified cells say UNVERIFIED. Codex CLI and Gemini CLI carry the literal token for subagent delegation and task tracking. A blank cell is indistinguishable from a false claim; an explicit UNVERIFIED is honest and actionable. This is the same discipline as marking a survey finding “data unavailable” rather than omitting it.

The matrix is also where the marketing claim gets corrected. The README says skill and agent content is “identical across all three.” True — and capability parity is not. Pi has no native blocking-question tool and no native task-tracking mechanism (prose fallbacks documented for both); Claude Code ships no systematic_skill tool at all, using its native Skill tool instead, and has deprecated TodoWrite in favour of TaskCreate/TaskGet/TaskList/TaskUpdate. The generalization: content portability and capability portability are different claims, and a multi-harness package should state which one it is making. Skills written to assume a tool exists are not portable; skills written to describe a fallback are.

The honest limit case is recorded in the same repo as open issue #854: the workflow guard — the single largest subsystem — is OpenCode-only because of its state model, not because other harnesses can’t host it. Parity claims should be scoped to what actually crossed.

A Workflow Plugin That Ships a WASM Shell Parser (2026-09-05)

marcusrbrown—systematic v3 added tree-sitter-bash 0.25.1 and web-tree-sitter 0.27.0 as runtime dependencies, in a package whose entire prior runtime footprint was js-yaml + jsonc-parser + zod.

The consumer is the receipt/guard subsystem — receipt-classifier.ts (36 KB) has to decide what a shell command the agent actually ran did, and you cannot classify bash by regex without being wrong in the cases that matter (quoting, substitution, redirection, chained operators). Choosing a real grammar is the correct call.

Record it anyway as a cost that plugin authors under-price: a plugin loaded into every agent session now carries a WASM grammar and a parser runtime. That is install size, cold-start time, and two more supply-chain edges in the highest-trust position in the system. The trade is defensible for command classification specifically; it would not be for anything smaller. When a plugin’s runtime dependency list grows a native/WASM component, it has changed category — from configuration to infrastructure — and deserves the scrutiny that implies.

A Bundled Skill That Is a Build Artifact of an npm Package (2026-09-05)

In marcusrbrown—systematic, skills/agent-browser/ is not authored — it is generated from the agent-browser npm package (devDependency, pinned 0.34.0) by scripts/generate-agent-browser-skill.ts, with an agent-browser:drift check running as its own step in the Build job.

This is distinct from vendoring, and better:

  • Vendoring copies content once and lets it rot silently.
  • Generation + drift gate makes the copy reproducible and makes staleness a build failure. A Renovate bump of agent-browser cannot merge without regenerating the skill.

The repo runs six such gates in one job — content integrity, Claude Code plugin build + integrity, agent-browser skill drift, registry drift, config-schema drift, and review-artifact-schema drift — plus a postupgrade script that regenerates all of them in one command so Renovate’s postUpgradeTasks can close the loop automatically.

The rule: any committed artifact derived from a pinned dependency needs a drift check, or the pin and the artifact will disagree and nothing will say so. Systematic supplies its own counter-example in the same manifest — biome.json declares $schema for 2.5.1 while @biomejs/biome is pinned at 2.5.11. That pair has drifted three times now (fixed at #533 → 2.4.16, #571 → 2.5.1, drifted again) because it is the one derived-from-a-pin relationship in the repo with no generator and no gate. The same class recurs in marcusrbrown—opencode-copilot-delegate. Hand-maintained version echoes do not stay in sync; generated ones do.

Schema Fingerprints Survive Refactors; Structural Probes Do Not (2026-09-05)

A direct follow-up to the fingerprinting rule adopted on 2026-09-04 (below), and an unusually fast confirmation of it. fro-bot—systematic measured Systematic’s deployed config schema on 2026-09-04 and, on finding that four surveys of “top-level property count” had been measuring a header, adopted a byte/definitions/hash fingerprint. Re-measured 24 hours later from the source-side survey:

Metric2026-09-042026-09-05
Bytes38,18058,954 (+54%)
definitions74100
Top-level properties1012 (+profile, +profiles)
sha256[:16]0e82797b9f8f43ed1f9b7c48a4b6455c

Two things happened at once, and separating them is the finding:

  1. A feature landed (v3.16.0, named model profiles with per-harness routing) — visible in every metric.
  2. The generator’s emission shape changed. The schema now wraps top-level objects in allOf + $ref composition. properties.agents and properties.categories are now $refs into definitions, so a shallow read of additionalProperties, propertyNames, or key-count on either returns nothing at all.

The 09-04 structural observations (agents as a closed 74-key enumeration with additionalProperties: false; categories open-keyed via propertyNames) cannot be reproduced by the same probe today. The underlying asymmetry may well be intact — it moved behind an indirection, and this survey does not claim it was removed.

The rule: a structural probe measures the generator’s current emission style, not the schema’s semantics. Generators refactor — $ref extraction, allOf composition, $defs migration — without any intent to change meaning, and every such refactor silently zeroes a probe that walked the old shape. A probe that returns 0 and a probe that returns “correctly zero” are indistinguishable at the call site.

Practical guidance for tracking a generated schema across surveys:

  • Fingerprint for change detection (bytes, definitions count, content hash). Cheap, total, refactor-proof, and it tells you that something moved.
  • Resolve $refs before asserting structure. Any claim about additionalProperties or key sets must deref through definitions/$defs and allOf first, and should record the resolution depth it used.
  • Treat an empty structural read as “instrument broken” until proven otherwise, never as “constraint removed.”

A schema that encodes a trust boundary

The new profiles property carries this description, and it is the most security-relevant line in the artifact:

Named routing-only overlay bundles, selectable by name via the profile field. Only valid in user config or OPENCODE_CONFIG_DIR config — a project config may select a profile but may not define this field.

A checked-out repository can choose a routing overlay but cannot author one. This is the correct direction for a plugin that merges configuration from multiple precedence sources: a cloned project cannot silently redirect the user’s agents to a model of its choosing. It is the config-layer expression of the same untrusted-input posture the ecosystem’s agent prompts take toward issue bodies — and notably it is enforced in the schema, where an IDE surfaces it, not only in the loader. Plugin authors merging user + project config should ask, for every property: is this safe for a repository I just cloned to set? Systematic answers it per-field.

Cross-Check Every Enumeration, Not One Representative Enumeration (2026-09-19)

Two-week follow-up to the two sections above, from the fro-bot—systematic survey at registry 3.18.10. Three results, in ascending order of usefulness.

The fingerprint earned its keep, and the probes came back. definitions held at 100 and top-level properties held at 12 — both header metrics identical to 2026-09-05 — while the file moved 58,954 → 59,589 bytes and sha256[:16] moved 1f9b7c48a4b6455c → a66df5f746c28d38. The pre-2026-09-04 method (count the top-level properties) would have logged “schema unchanged” for a third consecutive interval and been wrong for a third consecutive interval. Separately, the 09-05 caution proved exactly right: the $ref + allOf indirection is still in place, and dereferencing it recovers both 09-04 structural claims intact — agents is still a closed 74-key enumeration with additionalProperties: false, categories is still open-keyed via propertyNames: {type: string}. Treat an empty structural read as “instrument broken” until proven otherwise held. Deref and the semantics were never gone.

The real finding: a generated schema can contain several enumerations of the same catalog, produced by different mechanisms, and only some of them track reality. Systematic’s schema names its bundled components in three places. One is derived from the live roster. Two are hand-maintained literals:

SurfaceEntriesLive catalogStale
properties.agents (keys)74 (37 bare + 37 qualified)37 agents0
disabled_agents (items.enum)102 (51 bare + 51 qualified)37 agents28
disabled_skills (items.enum)5032 skills18

The surplus is the v2-era roster pruned at the 2026-07-22 major — retired skills (proof, rclone, setup, test-xcode, todo-create/todo-resolve/todo-triage, orchestrating-swarms, …), retired agents (security-sentinel, performance-oracle, schema-drift-detector, …), and a retired category prefix (docs/) that no longer exists in the live agents map. The lists are demonstrably maintained — disabled_skills went 49 → 50 in this interval, gaining exactly the one newly-shipped skill — so this is append-only maintenance with no prune step, not abandonment. One entry is spelled generate_command where the registry and docs used generate-command, which is the tell: a derived list cannot disagree with itself about a separator.

The 2026-09-04 survey ran a cross-artifact check on this exact file, compared agents against the registry, got 37 = 37, and concluded “no drift.” It was checking the one surface that cannot drift. Re-reading the 09-04 tree shows disabled_agents was already 102 then — the drift was in the file the whole time, one property over from the probe.

Why stale enums are worse than they look. The field’s own description reads “Unknown skill names are rejected at parse time.” That makes the enum the validation boundary, and a stale enum turns it into a liar in the quiet direction: disabled_skills: ["proof"] parses clean, shows green in the editor, and does nothing. This is the same defect class as the categories footgun recorded on 2026-09-04, with the polarity reversed — categories accepts any string and silently no-ops the overlay; disabled_skills accepts a specific obsolete string and silently no-ops the disable. Stated generally: a config schema fails its user whenever its verdict and the runtime’s behavior disagree, and permissiveness is only one of the two ways that happens — an allowlist that outlives what it allowlists is the other.

Operational rules for anyone tracking or authoring a generated config schema:

  • Enumerate the enumerations first. Before cross-checking a schema against a catalog, list every place the schema names catalog members. Checking one and generalizing is how this was missed for two surveys.
  • Ask which surfaces are derived and which are literals. Derived surfaces cannot drift and are not worth re-checking; literals are the entire risk. Spelling inconsistencies between surfaces are a cheap detector.
  • Prune enums at major boundaries, or document the tolerance. If retired names are kept deliberately for back-compat, the description must say so and the loader should warn. Silence makes back-compat indistinguishable from neglect.
  • A schema that validates a name should be able to say whether that name still does anything.

Postscript — a trust boundary that got documented rather than standardized. The non-standard "trust" keyword grew 16 → 30 occurrences (project-or-higher 23, any 7), and the 2026-09-04 inference about its meaning is now stated outright in description text that every draft-07 validator and IDE renders: “Trust-protected fields (model, variant, skills, permission, opencode, pi) are only valid in user config or OPENCODE_CONFIG_DIR config — a project config setting them has that field ignored with a warning; other fields in the same overlay still apply.” The keyword is still inert to standard tooling. The fix was not to standardize the annotation but to mirror its meaning into a field standard tooling already reads — cheaper than a validator extension, portable to every consumer, and the right move for any plugin publishing a semantically load-bearing custom keyword. The cost is that two representations of one rule can now drift apart; the keyword remains the machine-readable one.

The Stale-Enum Finding, Resolved in the Benign Direction (2026-09-21)

Source-side follow-up from the marcusrbrown—systematic survey at HEAD f903dc6d. Two of the section above’s claims survive; one needs its severity corrected.

Survives, unchanged. Across 97 commits and four releases the literals did not move: disabled_skills still enumerates 50 names against 32 shipped skill directories, disabled_agents still 102 against 37 shipped agents. Append-only with no prune step, now measured across a second interval. The fingerprint moved again (58,954 → 60,253 B, definitions 100 → 101, top-level properties 12 → 13, sha256[:16] 1f9b7c48a4b6455c → f7cd9984739a7fab) — a third consecutive interval where the byte/definitions/hash triple detects a change, and this time the property order changed too (profiles/profile now precede the disabled_* block), so positional probes remain as brittle as the 2026-09-05 caution said.

Corrected: the loader is not silent. The open question — does a retired-but-enumerated name warn, or is it silently dropped? — resolves from the repo’s own v2 history. v2.32.0 (#534) made removed bundled names in disabled_skills/disabled_agents warn-and-ignore rather than reject, specifically so that cleaning up a skill upstream would not brick configs that had disabled it. So disabled_skills: ["proof"] parses clean and emits a warning. The severity drops from silently no-ops to a documentation defect, and the rule needs one clause added:

The field description reads “Unknown skill names are rejected at parse time.” That conflates two populations the implementation treats differently — a never-bundled name is rejected, a retired-but-enumerated name is accepted and warned. When a loader deliberately tolerates retired names, the schema description must distinguish the two, or readers will infer that the enum answers a question it does not answer.

The general rule stands with its polarity fixed: a schema that validates a name should be able to say whether that name still does anything. Here the runtime can say it and the schema cannot, which is a strictly better failure than the reverse — but it also means the enum validates spelling, not effect, and no reader can tell that from the artifact alone. The 2026-09-19 operational rules are otherwise unchanged; add: before escalating a stale allowlist, check whether the loader already tolerates it deliberately — back-compat and neglect look identical in the schema and differ entirely in the log.

A Trust Boundary Relaxed With an Un-Self-Grantable Permission (2026-09-21)

Supersedes the “a project config may select a profile but may not define this field” claim recorded on 2026-09-05 (see A schema that encodes a trust boundary). The absolute ban was a real constraint on legitimate use — marcusrbrown—systematic issue #993 argued repository-specific routing was impossible under it — and #1011 relaxed it. The direction is unchanged and the mechanism is stronger than the ban was. Three interlocking layers, all expressed in the schema:

  1. A new allow_project_profiles boolean, default false, described as “User-owned only — only valid in user config or OPENCODE_CONFIG_DIR config; a project config setting this field has it ignored (a project cannot grant itself a permission it does not already have). Defaults to false.”
  2. profiles now reads “A project config may always select a profile, but may only define this field when the user sets allow_project_profiles.”
  3. Even when granted, the project’s bundle is advisory — it “fills only routing the user has not set,” so it loses every conflict rather than winning by precedence.

This is the shape to copy for any plugin that merges configuration across trust tiers and needs to loosen a restriction: make the permission a separate field, make that field un-self-grantable, and make the granted capability lose ties. Each layer fails safe independently — a cloned repository with a hostile profiles map does nothing without the flag, cannot set the flag, and cannot override a routing decision the user has actually made. Compare the all-or-nothing alternatives: dropping the ban outright hands a cloned repo full routing control, and keeping it forces users to fork or hand-copy a repo’s routing.

The custom "trust" keyword continues (31 occurrences, allow_project_profiles carrying "trust": "project-or-higher"), and so does the 2026-09-19 practice of mirroring its meaning into description text that standard draft-07 tooling renders. The two representations have not drifted yet; they remain two representations of one rule.

An MCP Client Keyed by Server Name Cannot Carry a Session Principal (2026-09-08)

From marcusrbrown—mothership’s docs/architecture/planning-host-contract.md — the first artifact in this wiki to trace the OpenCode MCP invocation path end-to-end and write down where agent identity is lost. The reading is against @fro.bot/harness@1.18.29-harness.88b6b5fb (runtime integration commit 88b6b5fb… in fro-bot/agent, base OpenCode 1.18.29).

The call path, as documented:

  1. The MCP service stores clients by MCP server name within the service instance — packages/opencode/src/mcp/index.ts. A client is not allocated per agent session.
  2. SessionTools.resolve (packages/opencode/src/session/tools.ts) does hold the full per-call context: runtime sessionID, messageID, callID, and agent.
  3. McpCatalog.convertTool (packages/opencode/src/mcp/catalog.ts) constructs the outbound client.callTool request from tool name and arguments only. It supplies abort/timeout/progress options and constructs no agent-principal assertion.
  4. A consuming stdio bridge (Mothership’s scripts/ide-mcp-bridge.ts) forwards tool name and arguments with a shared bearer. Its request envelope contains no verified agent principal.

Net: a shared MCP connection cannot distinguish simultaneous calls from differently-authorized sessions. The context exists one layer up and is dropped at the wire boundary. For any MCP server that wants to make an authorization decision per calling agent — rather than per connection — this is the blocking gap.

The contract scopes its own claim carefully, which is worth imitating: “SDK-generated transport metadata, such as progress bookkeeping, is not agent identity. The finding is the absence of a principal handoff in the inspected construction, not a claim that the SDK can never add any metadata.”

Constraints any fix must satisfy, per the same document:

  • Identity must come from runtime context — never from model arguments, agent display names, mutable client-global variables, or an earlier request on the same connection. Every one of those is either model-controlled or connection-scoped, and the whole problem is that the connection is shared.
  • The assertion must bind to the actual outbound request. Changes introduced by tool hooks must not let an assertion minted for one request authorize a different one.
  • A shared connection must support simultaneous calls from differently authorized sessions without context crossing between them — i.e. the binding has to be per-invocation, not per-client.
  • A new metadata object alone is not the proof. Transport authentication and host registration are separate design work.

npm gitHead Names the Wrapper Tree, Not the Runtime Tree

A second, immediately reusable provenance rule from the same document. For the patched-OpenCode harness, npm gitHead is cb4a1425… (the packages/harness wrapper source) while the runtime integration commit is 88b6b5fb… (the tree containing packages/opencode). They are different trees in the same repository, and the contract states the consequence plainly: “inspecting only packages/harness at npm gitHead does not establish the runtime MCP behavior.”

When a published package wraps a patched runtime, gitHead answers “what did we package?”, not “what will execute?”. Auditing plugin or harness behavior from gitHead alone reads the wrong tree. Related: marcusrbrown—systematic’s HARNESSES.md, which solves the adjacent honesty problem by making unverified matrix cells say the literal string UNVERIFIED rather than defaulting to an optimistic assumption.

Explicit Prompt-Cache Anchoring Reaches Only Anthropic-Family Models (2026-09-10)

Measured from the consumer side at marcusrbrown—dotfiles and filed upstream as anomalyco/opencode#48246. This is the first observation on this page that gives a non-preference, economic reason to prefer one model family in an OpenCode routing config.

The mechanism. OpenCode’s applyCaching() in packages/opencode/src/provider/transform.ts places explicit cache breakpoints on the first two system messages and the last two non-system messages — an anchor that advances every turn as the conversation grows. Its call site gates on model family:

if (
  (model.providerID === "anthropic" ||
    model.api.id.includes("anthropic") ||
    model.api.id.includes("claude") ||
    model.api.npm === "@ai-sdk/anthropic" || …) &&
  model.api.npm !== "@ai-sdk/gateway" &&
  !usesAnthropicAutomaticCaching
) {
  msgs = applyCaching(msgs, model)
}

A model on @ai-sdk/openai matches none of the disjuncts, so the function never runs and reuse falls back to OpenAI’s implicit prefix cache — which truncates at the first differing byte and has nothing to re-anchor. The openrouter / bedrock / copilot / openaiCompatible keys inside applyCaching()’s own provider map exist for Claude routed through those gateways; the absence of an openai key is a consequence of the gate, not a gap in the map.

Measured over 10 days of real sessions:

provider/modelfamilyturnsreusecollapsed
anthropic/claude-sonnet-5claude17,615100.0%0.0%
anthropic/claude-opus-5claude11,499100.0%0.1%
openai/gpt-6-astraother1,69192.1%8.5%
openai/gpt-5.6-solother34364.9%27.4%
github-copilot/gpt-5.4-miniother2,76880.1%18.3%
github-copilot/gemini-3.5-flashother69391.3%4.6%

The row that settles it: github-copilot serves Claude at 100% and its own GPT and Gemini models at 80.1% and 91.3% — same provider, opposite behavior. A provider-shaped reading of this data reaches the wrong conclusion; the split is by model family.

Three measurement rules that generalize past this bug, all from the same investigation:

  1. Normalize for the provider’s reporting convention before comparing. Anthropic reports input exclusive of cache reads; OpenAI reports it inclusive. Use reuse = cached / (input + cached). The naive cached / input produced an Anthropic row at 12,509,400% — nonsense loud enough to catch, which is luckier than it sounds.
  2. Collapse run-lengths into episodes before drawing a conclusion. A collapsed turn is a symptom; an episode is the event. Here 144 collapsed turns decomposed into 84 onsets with a median episode length of 1 turn, and 64 single-turn episodes carried 48.2% of all waste — ordinary rewarming that recovers by itself. The headline “8.5% of turns cause 89% of the waste” reads as a systemic condition worth tuning against; the episode view shows the actionable remainder is two long episodes carrying 30.5%, a targeted-recovery problem rather than a threshold problem.
  3. Read the formula in the installed bundle, not the config key name. Magic Context computes its history-summary budget as Math.floor(displayContextLimit * (Math.min(executeThresholdPercentage, 80) / 100) * historyBudgetPercentage). The Math.min(…, 80) makes 80 a ceiling: lowering execute_threshold_percentage to 65 cuts the history budget by exactly 18.75% and buys nothing, while raising it above 80 does nothing at all. A knob can be capped, and the config key will not say so.

Three hypotheses were reasoned to confidently and then killed by measurement — worth not re-walking: that encrypted reasoning items were not being requested (they were, via an npm-keyed switch rather than the suspected gate); that compaction causes the collapse (one affected session never compacted; only 13 of 84 onsets follow one); and that lowering the context threshold would cut the blast radius (see rule 3). Diagnostic detail: every observed cached value is an exact multiple of 128, matching OpenAI’s documented prefix-match increment, and one collapse recurred 12 seconds after the prefix was written — so not TTL expiry.

There is no local workaround. Placing a breakpoint requires providerOptions.<ns>.promptCacheBreakpoint on a content block; chat.params exposes only request-level options, and the published TextPart type carries metadata but no providerOptions, with no mapping between them anywhere in the build. A plugin cannot reach the seam.

Consequence for routing configs. marcusrbrown—dotfiles flips its active OMO-slim preset and per-seat models several times a quarter. Under this finding, each flip between an Anthropic seat and an OpenAI/Copilot seat is also a cache-economics decision, and the two are not comparable on price-per-token alone.

.config/cortexkit/ — Per-Harness Model Blocks in a Third-Party Plugin Config (2026-09-10)

The multi-harness architecture recorded at marcusrbrown—systematic (one content source, three shipped adapters, all peers optional) has reached the config layer of a different vendor’s package. @cortexkit/opencode-magic-context and @cortexkit/aft-opencode moved their config out of .config/opencode/ into a plugin-owned .config/cortexkit/, and their agent definitions replaced a flat model key with sibling harness blocks:

"historian": {
  "temperature": 0.1,
  "permission": { "bash": "deny", "webfetch": "deny", "edit": "deny" },
  "opencode": { "model": "anthropic/claude-sonnet-5", "variant": "medium" },
  "pi":       { "model": "anthropic/claude-sonnet-5" }
}

Two observations. First, the config-path move is what made the tuning survivable: this same file was deleted at 2026-07-10 and the wiki recorded that as a deliberate simplification (“deferring behavior to upstream plugin defaults”). It was not — the tuning returned intact the moment upstream provided a stable, vendor-owned home for it. A config file’s disappearance is weak evidence about intent when the plugin is still moving its own conventions.

Second, the asymmetry between the two blocks mirrors the upstream capability matrix: the opencode block carries a variant, the pi block does not. This is the same shape as HARNESSES.md’s honest two-tier matrix — content portability and capability portability are different claims — showing up as a schema fact in an unrelated package rather than as documentation. See pi-coding-agent.

2026-09-15 — the same vendor’s state directory appears at repository scope. bfra-me—ha-addon-repository, an infrastructure template with no OpenCode plugin, no package.json, and no JS runtime, added .cortexkit/.gitignore containing a fenced managed block:

# >>> cortexkit:magic-context
magic-context/
# <<< cortexkit:magic-context

Two small but real extensions to the observation above. First, @cortexkit/* adoption is not confined to a user’s ~/.config — magic-context materializes per-project state inside the repository it operates on, and the plugin manages its own ignore rules there with fenced begin/end markers (the same idempotent-edit convention mise, sheldon, and shell framework installers use, and the right one: it makes the block re-writable without clobbering a hand-edited file).

Second, it means an agent-tooling artifact is now committed to a template repository, so every fork inherits an ignore rule for a plugin the forker may not run. Harmless — it ignores a directory that will not exist — but it is the first observed case of agent-plugin state crossing into a fork-propagated tree, and the general caution from bfra-me—ha-addon-repository’s interval applies: a template artifact should state which repository it is about, and this one does not.

A third, smaller item from the 2026-09-10 config: dreamer replaced a single schedule: "00:00-08:00" window with a nine-task cron scheduler (verify, verify-broad, curate, classify-memories, retrospective, maintain-docs, map-memories, evaluate-smart-notes, review-user-memories), with an empty schedule string used as the disable mechanism for one task.

Preset References Are Not Validated Against Registered Servers (2026-09-10)

oh-my-opencode-slim presets name MCP servers and skills as bare strings. Nothing checks them against opencode.json’s mcp block or against any installed skill tree. At marcusrbrown—dotfiles the librarian.mcps array in all six presets reads ["aha", "atlassian", "box", "context7", "gh_grep", "slack"] while exactly two servers are registered — four dangling names — and two skill names in every designer array (brand-voice, impeccable) live in neither local skills tree.

The instructive part is the history. The same drift was recorded on 2026-07-10 (tavily, one name), reported as repaired on 2026-08-26 (“updated in lockstep, so no stale reference this time”), and returned four-deep on 2026-09-10. The lockstep was a property of one edit, not an enforced invariant — so “it was fixed last time” is not evidence about this time when the mechanism that fixed it was a person noticing. A dangling MCP name fails silently at agent-construction time, which is why the drift can widen for weeks without a signal. Any config that names capabilities in one file and registers them in another needs a check, not a habit.

Production and Watch Export Contracts (2026-10-03)

2026-11-01 recheck: fro-bot—space-bus remains at 20ab67c5. README, manifest, directory listing, and CI reconfirm the export/watch/docs discrepancies below. A further configured boundary is explicit: README’s smoke command is a live-server directory-routing canary, whereas CI invokes the production build, default-export import assertion, and Bun tests without invoking that script. Do not conflate the Node export-shape smoke step with the documented server canary. This is evidence about configured checks, not their results or the internal coverage of the unread tests. Sources: the same pinned README and CI workflow.

2026-10-18 recheck: fro-bot—space-bus still resolves to the same 20ab67c5 tree. Its manifest, README, and CI retain the separate production, watch, and documentation contracts described below. A second compatibility boundary is visible without reading implementation: the development dependency pins @opencode-ai/plugin to 1.18.26, the peer range admits >=1.17.13 <2, and README asks operators to upgrade the CLI and plugin dependency together. Keep these distinct: a development pin identifies one dependency selection; a peer range declares acceptable installations; neither demonstrates tested host coverage across that range. CI’s Node smoke step checks only that the default export is a function, without invoking the factory or launching an OpenCode host. No runtime compatibility failure is established by these files.

fro-bot—space-bus provides a manifest-level example of why plugin packaging has more than one entry graph. At 20ab67c5, ./server still resolves to the default plugin entry (dist/index.js), while lifecycle consumers use ./managed-server (dist/server.js). Its manifest additionally exports ./registry (dist/registry-entry.js), but the explicit entry lists in scripts.dev omit src/registry-entry.ts; the directory listing confirms that source file exists. The README’s Library surface list also omits /registry and still calls the six-tool bus “four tools.”

The production build script invokes build.ts plus declaration generation; the development script instead starts two explicit Bun watch builds. CI runs the production build and a Node default-export smoke test, not scripts.dev. Those workflow declarations do not prove a broken watch runtime, but neither do they establish that a clean watch-only checkout produces every advertised export or that changes to each entry refresh its artifact. Check production exports, development-watch coverage, and README coverage as distinct contracts. The earlier source-versus-published-artifact observations remain applicable.

Sources: manifest, README, CI.

Entry Smoke Tests Have Different Proof Depths (2026-10-05)

At marcusrbrown—systematic snapshot ce3c817f, the Main workflow imports three built entries under Node 24, but exercises them differently:

EntryVerified by the workflow’s smoke stepNot established by that step
OpenCode pluginOnly a default function export; factory invocation with a stub; nonempty configured agents and commandsReal-host operation of every registered tool
Pi extensionOnly a default function export; successful module importExtension initialization or delegated sessions
CLISuccessful import and at least one exportBinary invocation, argument parsing, or command behavior

That is useful layered verification, provided its claims retain those bounds. A module-load check catches resolution and export-shape regressions; it does not prove the entry’s public operation works. Systematic separately runs a real-OpenCode integration suite with a result guard, which adds evidence for that harness rather than filling in Pi or CLI behavior by association.

The manifest still exposes three install paths with optional harness peers. Its source version is 0.0.0-semantic-release, so neither the manifest nor a passing source-build check identifies the current npm release. Likewise, the README’s 31-skill claim still disagrees with 32 immediate skill directories; the 37-agent claim agrees once agents/review/README.md is excluded. Keep catalog counts, package exports, built-entry checks, and real-host behavior as separate claims with separate evidence.

The local-eval README adds another explicit boundary: fixture-scoped OpenCode isolation is not OS isolation, and these evals do not support Pi, Claude Code, networked/credentialed tasks, hosted execution, or CI orchestration. The documented completion marker is a final manifest.json, with infrastructure, task, and privacy-cleanup failures distinguished. This is the local-eval contract, not a claim about all integration tests or shipped harness support.

Sources: manifest, CI, README, and eval README.

Server Entry Checks Do Not Cover an Opt-In TUI (2026-10-10)

marcusrbrown—opencode-copilot-delegate at 647200a3 exports a server entry, its ./plugin alias, and a distinct ./tui entry, declaring oc-plugin: [server, tui]. CI imports only dist/index.js under Node 24 and checks that its sole export is a default function; it does not invoke that function. After this smoke check it runs test:unit, whose glob is tests/*.test.ts.

The manifest separately declares test:tui with the Solid preload and src/tui/__tests__ globs, plus test:integration for tests/integration/. Neither appears in any of the six inspected workflows. A successful run of the declared CI gate would therefore establish neither TUI test execution nor real Copilot delegation. No run result was read during this survey. This extends the proof-depth distinction above: cataloged test scripts, workflow-invoked tests, module import, factory invocation, and real-host behavior are separate evidence layers. An opt-in install path still needs its own verification claim.

README continues to advertise three tools while the listing includes a resume tool file and earlier surveys document four. Its shipped files[] entry makes that prose part of the package surface. An export-shape check cannot detect an omitted README tool, and a filename alone cannot prove the tool is registered; preserve that uncertainty rather than collapsing the artifacts into one capability count.

Sources: manifest, CI, workflow listing, and README.

  • marcusrbrown—systematic — Was the largest OpenCode plugin; as of v3 a three-harness workflow system (OpenCode + pi-coding-agent + Claude Code, all peers optional). v3 boundary is 3.0.0, 2026-07-17 (the earlier v3.2.5/07-22 reading was a downstream artifact); catalog contracted 104 → 73 components (37 agents / 31 skills); discovered-skills-as-slash-commands added v2.33.0
  • pi-coding-agent — Second Tier 1 harness; bounded delegate (20 turns, depth-1, noExtensions), no native blocking-question or task-tracking primitive
  • fro-bot—systematic — Documentation deployment target for @fro.bot/systematic
  • marcusrbrown—opencode-copilot-delegate — Copilot CLI delegation plugin
  • fro-bot—space-bus — Workspace agent bus, now a published plugin (@fro.bot/space-bus v0.15.0): six bus_* tools + one directory-routed opencode serve + MCP facade + managed-server lifecycle + CI-enforced browser-safe library subpaths (now exposing messages/questions/answerQuestion + dispatch message correlation)
  • marcusrbrown—cortexkit-anthropic-auth — Claude Pro/Max OAuth, fallback accounts, quota routing, Cloudflare Worker relay for OpenCode and Pi. Fro Bot was active at v0.45.0 (2026-06-09) and is disabled_inactivity as of 2026-09-02; the fork is frozen at 1.2.5-mb.3 and 334 commits / 32 releases behind upstream cortexkit/anthropic-auth (v1.21.0, actively maintained). Contributes the cross-process OAuth refresh-lock and plugin-singleton prior art above, plus the dangling-dist-tag decommissioning rule
  • marcusrbrown—dotfiles — The ecosystem’s reference consumer config: .agents/skills/ skill bus, seven pinned OpenCode plugins, six OMO-slim routing presets, and .config/cortexkit/ per-harness plugin config. Source of the 2026-09-10 findings above on prompt-cache anchoring, per-harness model blocks, and unvalidated preset references
  • marcusrbrown—mothership — MCP consumer rather than plugin: exposes 17 ide_* tools (8 layout + 9 session control) over a loopback bearer-token sidecar, and contributes the MCP principal-handoff gap and the gitHead-vs-runtime-tree provenance rule above
  • github-actions-ci — CI patterns for plugin repositories (Biome, bun test, semantic-release)
  • github-pages — GitHub Pages deployment patterns including cross-repo Starlight deploy