rescue

rescue is a command for coding agents from LovelaceLoom/gemini-plugin-cc. It costs 19 tokens per session (653 once invoked), scanned A, original, Apache-2.0.

A command that sends an investigation, explicit fix request, or follow-up rescue task to a Gemini rescue subagent. A subagent is a separate helper agent assigned a focused task.

In plain words
What is it for?
Delegating repository investigations, requested fixes, and rescue work to Gemini, either immediately or as a background task.
Why use it?
It lets another agent take over difficult debugging or follow-up work and return its answer to the user.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the gemini plugin — 3 skills, 9 commands, 1 agent, 3 hooks shipped together

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/lovelaceloom/gemini-plugin-cc/rescue
Clone the repo
git clone --depth 1 https://github.com/LovelaceLoom/gemini-plugin-cc

Or install gemini, the plugin that ships this one along with the rest of its 3 skills, 9 commands, 1 agent, 3 hooks.

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 rescue

README.md
[![agentmods](https://agentmods.dev/badge/commands/lovelaceloom/gemini-plugin-cc/rescue.svg)](https://agentmods.dev/commands/lovelaceloom/gemini-plugin-cc/rescue)
Your own site
<a href="https://agentmods.dev/commands/lovelaceloom/gemini-plugin-cc/rescue"><img src="https://agentmods.dev/badge/commands/lovelaceloom/gemini-plugin-cc/rescue.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 653 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.00019 $0.00653
Opus 5 $0.00010 $0.00327
Sonnet 5 $0.00004 $0.00131
Haiku 4.5 $0.00002 $0.00065

Measured 5d ago against content hash 7169b837465e, 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 5d 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/gemini/commands/rescue.md · 32 lines

What it actually says

Invoke the gemini:gemini-rescue subagent via the Agent tool (subagent_type: "gemini:gemini-rescue"), forwarding the raw user request as the prompt. The final user-visible response must be Gemini's output verbatim.

Raw user request: $ARGUMENTS

Execution mode:

  • Default: run the gemini:gemini-rescue subagent in the foreground. A parent agent calling rescue expects a real answer, not a "job forwarded" stub. Backgrounding the subagent causes Claude Code's Bash tool to return immediately with a job ID, which the rescue wrapper would then forward verbatim instead of Gemini's actual output — that's the failure mode tracked in issue #3.
  • If the request includes --background, the user has explicitly opted out of the synchronous contract; honor it and run the subagent in the background. They are responsible for following up with /gemini:status and /gemini:result <id> themselves.
  • --wait is accepted for backward compatibility but has no effect under the new default (foreground is already the default).
  • --background and --wait are execution flags for Claude Code. Do not forward them to the companion's task subcommand, and do not treat them as part of the natural-language task text.
  • --write and --read-only are runtime-selection flags. Preserve them for the forwarded task call, but do not treat them as part of the natural-language task text.
  • --model is a runtime-selection flag. Preserve it for the forwarded task call.

Operating rules:

  • The subagent is a thin forwarder only. It should use one Bash call to invoke node "${CLAUDE_PLUGIN_ROOT}/scripts/companion.mjs" task ... and return that command's stdout as-is.
  • Default to read-only Gemini behavior. Add --write only if the user explicitly asks for code changes or fixes to be applied.
  • Return the companion's stdout verbatim to the user.
  • Do not paraphrase, summarize, rewrite, or add commentary before or after it.
  • Do not ask the subagent to inspect files, monitor progress, poll /gemini:status, fetch /gemini:result, call /gemini:cancel, summarize output, or do follow-up work of its own.
  • Do not call review, adversarial-review, status, result, or cancel. This subagent only forwards to task.
  • If the helper reports that Gemini is missing or unauthenticated, stop and tell the user to run /gemini:setup.
  • If the user did not supply a request, ask what Gemini should investigate or fix.
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. 5d ago First seen · 32 lines · 19 tokens per session scan A 7169b837465e

Subscribe to this mod's changes

rescue is a command published in the GitHub repository LovelaceLoom/gemini-plugin-cc (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 19 tokens to every session and 653 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.