Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add okisdev/claude-code-fusion/plugin install opencodeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/okisdev/claude-code-fusion/opencode-cli-runtime)<a href="https://agentmods.dev/skills/okisdev/claude-code-fusion/opencode-cli-runtime"><img src="https://agentmods.dev/badge/skills/okisdev/claude-code-fusion/opencode-cli-runtime/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/okisdev/claude-code-fusion/opencode-cli-runtime"><img src="https://agentmods.dev/badge/skills/okisdev/claude-code-fusion/opencode-cli-runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00019 | $0.01928 |
| Opus 5.5 | $0.00008 | $0.00771 |
| Sonnet 5.5 | $0.00004 | $0.00386 |
| Haiku 4.5 | $0.00002 | $0.00193 |
Grade A, and why
opencode-cli-runtime scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OpenCode Go runtime
Primary helper:
node "${CLAUDE_PLUGIN_ROOT}/scripts/opencode-companion.mjs" <subcommand> [flags]
Subcommand surface:
task [--write] [--model <id>] [--effort <effort>] [--resume <session-id>|--resume-last|--fresh] [--background] [--cwd <dir>] [--json] [--] [prompt]status [job-id] [--all] [--cwd <dir>] [--json]result <job-id> [--wait] [--cwd <dir>] [--json]cancel <job-id> [--cwd <dir>] [--json]history [--all] [--limit <n>] [--cwd <dir>] [--json]models [--refresh] [--json]setup [--json]record-acceptance --job-id <id> --acceptance <accepted|rejected|unverified> [--reason <text>] [--failure-kind <kind>] [--source <collector|main-loop|stats>] [--accept-failed-transport] [--json]transport-createandtransport-discard --raw-args-token <token>task-workeris an internal background worker that the helper never invokes directly.quota [--json]
Execution rules:
- Slash commands stage their complete raw arguments through
transport-create, one Read of the allocated empty file, Write to that same file, and a fixed--raw-args-tokeninvocation. The token transport applies to task, status, history, result, cancel, and setup. Raw request bytes never enter Bash, shell arguments, environment variables, redirections, substitutions, encoded literals, or heredocs. A transport is private, bounded, validated, and consumed once. Never delete, rename, recreate, or change the permissions of the transport file; usetransport-discardwhen Read or Write fails or when the allocated file is not empty. - Place every task option before the prompt, and put
--before a prompt that begins with an option shaped token. The prompt text may also arrive on stdin. - The companion resolves
codexonPATH, overridden byOPENCODE_CODEX_BIN, and recordscodexVersion. Preserve setup compatibility warnings and rerun/opencode:setupafter repairing an incompatible CLI. - Each brief must declare exactly one
opencode-role: bulkoropencode-role: blind-checkin its header. Bulk writes in an orchestrator owned worktree through Codex'sworkspace-writesandbox and is accepted by rerunning the verification command. Blind-check usesread-onlyto answer a staged artifact with its answers removed. OpenCode Go never handles ordinary implementation, review, panels, or independence consults. - The companion runs
codex exec --jsonwith the role's sandbox, workspace, model, and reasoning effort. Bulk defaults todeepseek-v4.1-flash@high; blind-check defaults toglm-5.3-flash@high. Supported efforts come from the Go model listing; the routing defaults uselow,high, ormax. Fusion supplies explicit model and effort choices from the routing table. CODEX_HOMEis the shared private<data>/codex-home. Its generated configuration selects the OpenCode Go Responses provider athttps://opencode.ai/inference/go/v1, and its model catalog derives from the installed Codex binary's bundledgpt-5.5entry. It regenerates whencodexVersionchanges. A missing required catalog entry fails preflight assetup.- The key comes from
OPENCODE_GO_API_KEYor, when that is unset, the opencode CLI login store, and is passed to the Codex child. Never write or print it. The generated shell policy excludesOPENCODE_*from model shell commands. Missing credentials fail asauth. modelslists Go models supporting tools and caches them for one hour;--refreshfetches again.quotareports rolling, weekly, and monthly allowance pools, all namedopencodewith cost classincluded. Turn off Extra Usage in the OpenCode console to keep this lane on its included allowance. Requests carryx-opencode-sessionwith the job id, never a repository name or path.- Repository
AGENTS.mdstill loads. The workspace sandbox confines writes; reads outside the workspace remain possible. Prompts, tool content, and results pass through OpenCode and the serving model vendor. Never delegate secrets or credentials to this lane. - A forwarder agent runs the companion in one background shell: a Bash call with
run_in_background: true, which returns at once with a background id and the path of the output file. It then runsnode "${CLAUDE_PLUGIN_ROOT}/scripts/opencode-companion.mjs" await-output --file "PATH"in a foreground Bash call withtimeout: 120000and repeats that call while it prints exactlyawait-output: pending; any other output is the complete stdout of the launched operation. The harness delivers one report per agent, so a forwarder never ends its turn or writes a waiting line while the await operation prints pending. The rescue wrapper adds the fixed option--transport-background-shellto its task launch for a 900000ms default execution budget. Direct foreground tasks keep their 540000ms default, andOPENCODE_COMPANION_TIMEOUT_MSoverrides either budget. Background mode belongs to that Bash call alone and is neither the Agent's own background mode nor the companion's--background. A companion run directly by the main session through a slash command, with no forwarder agent, is a foregroundBashcall withtimeout: 600000. - Ordinary delegations use one helper call. Only an explicit incoming user
--backgrounddetaches a task into an internal worker and creates a manual receipt; the helper prints the job id plus/opencode:statusand/opencode:resulthints. Never add--backgroundbecause a task appears large or slow, and never confuse a background shell with that option.result --waitblocks while a job is running, and when its bounded wait budget elapses first it returns output ending instate: running. - A user asking to resume maps to
--resume <session-id>or--resume-last; these and--freshare alternatives. Resume stays in the same workspace and preserves the original role. Codex rollouts stay in the private home. historyexposes a safe metadata projection with resumable session ids. It defaults to the current workspace,--allincludes every recorded workspace, and--limitcaps the number of jobs shown.--cwdselects the workspace for task, status, history, result, and cancel. Status, result, and cancel search all recorded workspaces by job id when--cwdis omitted. A bad working directory, or an implicit task working directory below its Git repository root, fails before a job record is created. Worktree isolation means creating a real Git worktree before launch and supplying that path as the actual--cwd.- Typed failure kinds are
missing_cli,setup,auth,quota,rate_limited,network,permission,policy,refused,protocol,timeout,process,cancelled,died,input,resource, anderror. Provider HTTP 401 or 403 isauth; HTTP 429 israte_limited; an exhausted Go allowance isquota. Quota and rate limit failures carrybillingPool: "opencode"; authentication, missing CLI, setup, protocol, permission, and policy failures are engine wide. - Outcomes end with the shared footer block:
opencode-session: <session-id>when a resumable session exists, thenjob:,sandbox:,delivery:,semantic:, any adapterwarning:lines,state:, andfailure:for error and cancelled outcomes. - Job records live at
<data>/state/<workspace>/jobs/<id>.json, where<data>isOPENCODE_COMPANION_DATAor~/.claude/plugins/data/opencode-claude-code-fusion. They carry the role, mode, Codex version, session id, requested and resolved model and effort, billing pool, usage, and warnings. scripts/session-end-hook.mjsruns at Claude Code SessionEnd, performs verified cleanup of this session's running jobs, and removes unused raw transports.- Return the helper output exactly as received, whether the Bash tool reports it from stdout or stderr.
- If the Bash call fails or OpenCode Go cannot be invoked, surface the failure instead of hiding it; the opencode-rescue agent returns exactly one
opencode unavailable: <reason>line for the orchestrator's circuit breaker.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 49 lines · 19 tokens per session scan A 10ed1028fd0f
opencode-cli-runtime is a skill published in the GitHub repository okisdev/claude-code-fusion (3 stars, last pushed 3d ago), licensed MIT. It adds 19 tokens to every session and 1,928 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-22.
opencode-cli-runtime compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| opencode-cli-runtimeokisdev/claude-code-fusion | Skill | 3 | 3d ago | MIT | A | 19 | Claude Code |
| review-teams977043/river-review | Skill | 8 | today | MIT | A | 147 | Claude Code |
| conductor-orchestratorIbrahim-3d/orchestrator-supaconductor | Skill | 384 | 2mo ago | AGPL-3.0 | A | 101 | Claude Code |
| message-busIbrahim-3d/orchestrator-supaconductor | Skill | 384 | 2mo ago | AGPL-3.0 | A | 44 | Claude Code |
| writing-skillsIbrahim-3d/orchestrator-supaconductor | Skill | 384 | 2mo ago | AGPL-3.0 | A | 20 | Claude Code |
| parallel-dispatchIbrahim-3d/orchestrator-supaconductor | Skill | 384 | 2mo ago | AGPL-3.0 | A | 40 | Claude Code |
| agent-factoryIbrahim-3d/orchestrator-supaconductor | Skill | 384 | 2mo ago | AGPL-3.0 | A | 36 | Claude Code |