Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/rbinar/cli-dispatch/oc-rungit clone --depth 1 https://github.com/rbinar/cli-dispatchWhat 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 | $0.00012 | $0.00984 |
| Opus 5 | $0.00006 | $0.00492 |
| Sonnet 5 | $0.00002 | $0.00197 |
| Haiku 4.5 | $0.00001 | $0.00098 |
Grade A, and why
oc-run 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 yesterday.
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.
What it actually says
Delegate a task to the OpenCode worker
Task to delegate: $ARGUMENTS
The task runs via oc-stream — it pipes opencode run --format json --auto stdout through
oc-stream-parse.mjs for live progress + a rolling status.json, writing the same session
directory layout the other backends use → live, observable, resumable. Monitor progress in a
cost-conscious way: read only the small status.json, never the raw transcript. The session
id is the opencode session id (relocated into place once known, printed on stderr).
Prerequisite: oc-agent / oc-stream installed (/cli-dispatch:setup, OpenCode backend) and
OPENROUTER_API_KEY set in the config — OpenRouter has no OAuth/login flow, the key is the only
auth path.
If it's a real repo task (file changes needed) — isolate in a git worktree:
- Use the bundled helper, which creates the worktree off
origin/main, symlinks everynode_modulesdir of the source checkout (root + workspace packages, resolved from the repo top even when<repo-path>is a subdirectory), runsoc-streamin it, and prints the cleanup command:
Or run it by hand:"${CLAUDE_PLUGIN_ROOT}/scripts/oc-worktree-run.sh" <repo-path> oc-run-<branch-name> <brief-file>WORKTREE=$(mktemp -d) git worktree add "$WORKTREE" -b oc-run-<branch-name> origin/main oc-agent --cwd "$WORKTREE" --max-runtime 600 "$ARGUMENTS" - Monitor (cost-conscious): capture the session id from stderr, then check progress via
/cli-dispatch:watch <session-id>(state: running→done). Do NOT tight-loop tail. - When done, review the diff (
git -C "$WORKTREE" diff), verify independently (build/test). - If all good, you handle git/commit/push/PR/merge; then clean up the worktree.
If it's pure generation (code/text, no files) — as a background task:
oc-agent -q "$ARGUMENTS" # stdout = final answer only; progress in status.json/progress.log
No sandbox — read this before trusting the output unattended:
--auto(always passed by oc-stream) auto-approves every permission prompt — a functional requirement for headless use, not a safety opt-in. OpenCode has no OS-level or tool-level write-deny at all, unlike Codex's real kernel-enforced--read-only. There is no--sandboxflag here to reach for. Isolation via a git worktree + your own diff review is the ONLY safety boundary.
Model selection:
oc-agent --model google/gemma-4-31b-it:free -q "$ARGUMENTS"
Pass the bare OpenRouter slug — no openrouter/ prefix — oc-stream prepends it. A few
example free-tier slugs (:free suffix): google/gemma-4-31b-it:free,
meta-llama/llama-3.3-70b-instruct:free, qwen/qwen3-coder:free. The free catalog rotates
often, so re-verify before relying on any of these. List live models OpenCode recognizes with:
OPENROUTER_API_KEY=<key> opencode models openrouter
Omit --model to use OpenCode's own default (or the OC_MODEL config value).
Follow-up / fix (continue the same OpenCode session):
oc-agent --resume <session-id> "<follow-up>"
This passes --session <id> --continue to opencode run. Resume semantics verified
live (with a real OPENROUTER_API_KEY): --session <id> --continue resumes the
named session, not just "the last one".
To see all sessions (all backends), use /cli-dispatch:sessions.
The worker = OpenCode (OpenRouter); you = reviewer/merge owner. Don't trust the output until verified.
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.
- yesterday First seen · 74 lines · 12 tokens per session scan A ecb2f7336b97
oc-run is a command published in the GitHub repository rbinar/cli-dispatch (5 stars, last pushed 14d ago), licensed MIT. It adds 12 tokens to every session and 984 once invoked, about $0.0001 per session on Opus 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-08-31.
Other commands, from other repositories
strict
Enable strict RIPER protocol enforcement.
research
Enter RESEARCH mode for information gathering.
status
Show the current status of the Claude Code Router server.
brainstorm
多模型并行对同一问题各给独立意见(发散式 brainstorming),主 Claude 综合分歧、共识、独到见解。各模型彼此看不到对方答案,避免回声室效应。.
language
Toggle the HUD label language between English and 中文 (edits /.claude/plugins/balance-hud/config.json).
benchmark
Run the Permafrost cache benchmark (offline emulator, no API key).