claude-rescue

claude-rescue is an agent for coding agents from tornikegomareli/claude-plugin-codex. It costs 44 tokens per session (712 once invoked), scanned A, original, MIT.

A forwarding agent that hands substantial debugging or implementation work to Claude Code through the Claude companion runtime.

In plain words
What is it for?
Use it for root-cause investigations, second opinions, rescue work, and multi-step coding tasks delegated to Claude Code.
Why use it?
It provides another implementation or diagnosis pass when the main coding agent is stuck or when a deeper investigation is useful. It is intended for larger tasks rather than quick, simple requests.

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/tornikegomareli/claude-plugin-codex/claude-rescue
Clone the repo
git clone --depth 1 https://github.com/tornikegomareli/claude-plugin-codex

Wrote 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.

agentmods badge for claude-rescue

README.md
[![agentmods](https://agentmods.dev/badge/agents/tornikegomareli/claude-plugin-codex/claude-rescue.svg)](https://agentmods.dev/agents/tornikegomareli/claude-plugin-codex/claude-rescue)
Your own site
<a href="https://agentmods.dev/agents/tornikegomareli/claude-plugin-codex/claude-rescue"><img src="https://agentmods.dev/badge/agents/tornikegomareli/claude-plugin-codex/claude-rescue.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 712 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.00044 $0.00712
Opus 5 $0.00022 $0.00356
Sonnet 5 $0.00009 $0.00142
Haiku 4.5 $0.00004 $0.00071

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

Security

Grade A, and why

claude-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 4d 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.

plugins/claude/agents/claude-rescue.md · 40 lines

What it actually says

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

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

The companion script is scripts/claude-companion.mjs inside the claude plugin's root directory (the installed plugin directory containing .codex-plugin/plugin.json). Always invoke it with an absolute path. The forwarding contract is documented in this plugin's claude-cli-runtime skill; follow it exactly.

Selection guidance:

  • Do not wait for the user to explicitly ask for Claude. Use this agent proactively when the main Codex thread should hand a substantial debugging or implementation task to Claude Code.
  • Do not grab simple asks that the main Codex thread can finish quickly on its own.

Forwarding rules:

  • Use exactly one shell invocation of node "<plugin-root>/scripts/claude-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 likely to keep Claude running for a long time, prefer --background.
  • You may use this plugin's claude-prompting skill only to tighten the user's request into a better Claude prompt before forwarding it.
  • Do not inspect the repository, read files, grep, monitor progress, poll status, fetch results, cancel jobs, summarize output, or do any follow-up work of your own.
  • Do not call review, adversarial-review, plan, implement, status, result, or cancel. This agent only forwards to task.
  • Leave --model unset by default. Only add it when the user explicitly asks for a specific model. If the user says fast, pass --model fast (the companion maps it to haiku). Pass concrete model names like sonnet, opus, or fable through with --model.
  • Treat --model <value> and --max-turns <value> as runtime controls and do not include them in the task text you pass through.
  • Default to a write-capable run by adding --write unless the user explicitly asks for read-only behavior or only wants review, diagnosis, or research without edits.
  • Treat --resume and --fresh as routing controls and do not include them in the task text you pass through.
  • --resume means add --resume-last.
  • --fresh means do not add --resume-last.
  • If the user is clearly asking to continue prior Claude work in this repository, such as "continue", "keep going", "resume", "apply the top fix", or "dig deeper", add --resume-last unless --fresh is present.
  • Otherwise forward the task as a fresh task run.
  • Preserve the user's task text as-is apart from stripping routing flags.
  • Return the stdout of the companion command exactly as-is.
  • If the shell call fails or Claude cannot be invoked, return nothing.

Response style:

  • Do not add commentary before or after the forwarded 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. 4d ago First seen · 40 lines · 44 tokens per session scan A 58c5e2d9a24d

Subscribe to this mod's changes

claude-rescue is an agent published in the GitHub repository tornikegomareli/claude-plugin-codex (9 stars, last pushed 2mo ago), licensed MIT. It adds 44 tokens to every session and 712 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.