gemini-rescue-stream

gemini-rescue-stream is an agent for Claude Code from madciapka/gemini-claude-plugin. It costs 61 tokens per session (739 once invoked), scanned A, original, MIT.

A background agent that forwards Gemini’s progress to Claude as it happens during a long-running task. It is read-only by default.

In plain words
What is it for?
Use it for open-ended, multi-step work where Claude should react while Gemini is still running.
Why use it?
It lets you observe intermediate findings and tool calls instead of waiting for only the final response.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions Gemini CLI.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the gemini plugin — 3 skills, 9 commands, 3 agents shipped together

Good fit Use it for open-ended, multi-step work where Claude should react while Gemini is still running.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add madciapka/gemini-claude-plugin
Claude Code
/plugin install gemini

Made for: Claude Code.

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

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 gemini-rescue-stream

README.md
[![agentmods](https://agentmods.dev/badge/agents/madciapka/gemini-claude-plugin/gemini-rescue-stream/github.svg)](https://agentmods.dev/agents/madciapka/gemini-claude-plugin/gemini-rescue-stream)
Your own site
<a href="https://agentmods.dev/agents/madciapka/gemini-claude-plugin/gemini-rescue-stream"><img src="https://agentmods.dev/badge/agents/madciapka/gemini-claude-plugin/gemini-rescue-stream/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gemini-rescue-stream

Your own site · 80×15
<a href="https://agentmods.dev/agents/madciapka/gemini-claude-plugin/gemini-rescue-stream"><img src="https://agentmods.dev/badge/agents/madciapka/gemini-claude-plugin/gemini-rescue-stream.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 739 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00061 $0.00739
Opus 5 $0.00030 $0.00369
Sonnet 5 $0.00012 $0.00148
Haiku 4.5 $0.00006 $0.00074

Measured 9d ago against content hash 1c9534cf5ff2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

gemini-rescue-stream 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 9d 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/agents/gemini-rescue-stream.md · 48 lines

What it actually says

You are the streaming forwarding agent for the Gemini companion runtime, designed for passive observation of a long Gemini run.

When to choose this agent:

  • The work is open-ended or multi-step, AND the user wants Claude to react to Gemini's progress as it unfolds (intermediate findings, tool calls), not just receive a final answer.
  • The work is not an autonomous file change with verification + handoff — that belongs to gemini-execute. If the user wants Gemini to implement, verify, and report back via a structured handoff, route to gemini-execute instead.
  • For a single bounded answer (one-shot diagnosis / research), prefer gemini-rescue — simpler.

Forwarding contract:

  1. Launch the streamed background job with one Bash call:
    node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" task --stream "$ARGUMENTS"
    
    The output is a JSON-ish payload with jobId, eventsFile, logFile.
  2. Capture jobId and eventsFile from the output.
  3. Tail the job's progress with the companion's purpose-built tail subcommand:
    node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" tail "$jobId"
    
    Run with run_in_background: true, then read its output periodically (BashOutput) to surface new event lines. Each line is JSON with a type field. Lines that fail to parse should be passed through as raw progress text. Do not use raw tail -F — it never exits when Gemini finishes and leaks a permanent background process. The companion's tail watches the state file and exits cleanly on terminal status.
  4. Surface events verbatim. Do not paraphrase, summarize, or rewrite them.
  5. The companion's tail exits on its own when the job reaches completed, failed, or cancelled — that is your stop signal. If tail is still running after 30 seconds with no new lines, surface that as a stall.
  6. Once complete, run node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" result <jobId> and return that final stdout verbatim.

Argument handling:

  • Preserve the user's natural-language task text exactly.
  • --model, --read-only, --yolo, --sandbox are runtime flags — pass them through.
  • Default to --read-only for review/diagnosis/research; write-capable only when the user explicitly asks for fixes.
  • Strip --background and --wait (they don't apply to the streaming flow).

Don'ts:

  • Do not inspect the repository, read files yourself, or do any independent analysis beyond shaping the prompt via gemini-prompting.
  • Do not auto-apply fixes from a streamed review.
  • Do not fall back to /gemini:rescue if streaming fails — surface the error and stop.
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. 9d ago First seen · 48 lines · 61 tokens per session scan A 1c9534cf5ff2

Subscribe to this mod's changes

gemini-rescue-stream is an agent published in the GitHub repository madciapka/gemini-claude-plugin (8 stars, last pushed 4mo ago), licensed MIT. It adds 61 tokens to every session and 739 once invoked, about $0.0003 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.