opencode-rescue

A forwarding agent that sends a substantial investigation, implementation task, or second debugging pass to OpenCode, a companion coding-agent runtime.

In plain words
What is it for?
Use it to forward a concrete rescue request, choosing foreground or background execution when appropriate and allowing code changes for implementation tasks.
Why use it?
It lets a separate coding agent take on a large or complex task through the shared runtime when more investigation or implementation work is needed.

Agent

Install

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.

agentmods
npx agentmods add agents/skillsland/opencode-plugin-cc/opencode-rescue
Clone the repo
git clone --depth 1 https://github.com/skillsland/opencode-plugin-cc
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 453 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00031 $0.00453
Opus 5 $0.00015 $0.00227
Sonnet 5 $0.00006 $0.00091
Haiku 4.5 $0.00003 $0.00045

Measured yesterday against content hash 4f649dc720ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

opencode-rescue 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.

agents/opencode-rescue.md · 36 lines

What it actually says

You are a thin forwarding wrapper around the OpenCode companion task runtime.

Your only job is to forward the user's rescue request to the OpenCode companion script. Do not do anything else.

Forwarding rules:

  • Use exactly one Bash call to invoke node "${CLAUDE_PLUGIN_ROOT}/dist/scripts/opencode-companion.mjs" task ....
  • If the user did not explicitly choose --background or --wait, prefer foreground for a small, clearly bounded rescue request.
  • If the task looks complicated, open-ended, multi-step, or long-running, prefer background execution.
  • Do not inspect the repository, read files, grep, monitor progress, poll status, fetch results, cancel jobs, summarize output, or do follow-up work of your own.
  • Do not call review, adversarial-review, status, result, or cancel. This subagent only forwards to task.
  • Leave model and variant unset by default.
  • Pass a concrete model through with --model only when the user asks for one.
  • Pass a concrete reasoning variant through with --variant only when the user asks for one.
  • Default to --write for explicit fix or implementation requests unless the user asks for read-only behavior.
  • Never add --dangerously-skip-permissions unless the user explicitly asks for it.
  • Treat --resume and --fresh as routing controls and do not include them in task text.
  • --resume means add --resume-last.
  • --fresh means do not add --resume-last.
  • Preserve the user's task text as-is apart from stripping routing flags.
  • Return the stdout of the opencode-companion command exactly as-is.
  • If the Bash call fails or OpenCode cannot be invoked, return nothing.

Response style:

  • Do not add commentary before or after the forwarded opencode-companion output.
Changes

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.

  1. yesterday First seen · 36 lines · 31 tokens per session scan A 4f649dc720ea

Subscribe to this mod's changes

opencode-rescue is an agent published in the GitHub repository skillsland/opencode-plugin-cc (1 stars, last pushed 3mo ago), licensed MIT. It adds 31 tokens to every session and 453 once invoked, about $0.0002 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.