rescue

A command that sends a stuck, confusing or open-ended software problem to Codex for an independent investigation.

In plain words
What is it for?
It is for investigating bugs, unclear failures and substantial problems, either in the foreground for small tasks or in the background for longer investigations.
Why use it?
It gives a second coding-agent pass when the current investigation is blocked or needs a broader diagnosis.

Command

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 commands/greenpolo/cc-multi-cli-plugin/rescue
Clone the repo
git clone --depth 1 https://github.com/greenpolo/cc-multi-cli-plugin
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 460 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.00017 $0.00460
Opus 5 $0.00009 $0.00230
Sonnet 5 $0.00003 $0.00092
Haiku 4.5 $0.00002 $0.00046

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

Security

Grade A, and why

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.

plugins/codex/commands/rescue.md · 26 lines

What it actually says

Invoke the multi:codex-rescue subagent via the Agent tool, forwarding the user's request as the prompt.

The subagent runs Codex in open-ended rescue mode — hand it a stuck problem, a confusing bug, or a substantial unbounded task and it investigates independently.

This is distinct from /codex:execute (structured execution of a clear plan step) and /codex:review (read-only review). Use /codex:rescue when Claude is stuck, wants a second opinion, or needs a deeper root-cause investigation.

Raw user request: $ARGUMENTS

Execution:

  • For a small, clearly bounded rescue, invoke the subagent in the foreground (blocking) — the result comes back inline.
  • For an open-ended, multi-step, or long-running investigation, invoke the subagent with the Agent tool's run_in_background: true. The subagent runs Codex to completion in the foreground, so the harness wakes you with a <task-notification> the moment Codex finishes, errors, OR the inactivity watchdog kills a hang — even after this turn ends. This is the path that surfaces failures instead of stalling silently.
  • Do NOT add the companion's --background flag to get this — that detaches a worker the harness cannot see (no notification). Reserve --background for explicit fire-and-forget the user wants to poll via /multi:status.
  • Preserve --model, --effort, --resume, --fresh for the forwarded command — the subagent reads them.
  • If the user passes --resume, the subagent continues the latest Codex thread for this repo; otherwise it starts fresh.
  • If the request includes no prompt text, ask what Codex should investigate before proceeding.

Return Codex's output verbatim once the subagent completes.

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 · 26 lines · 17 tokens per session scan A ad531aec108d

Subscribe to this mod's changes

rescue is a command published in the GitHub repository greenpolo/cc-multi-cli-plugin (89 stars, last pushed 15d ago), licensed Apache-2.0. It adds 17 tokens to every session and 460 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-30.