From relay-gemini
Delegate investigation or a fix to Gemini CLI. Supports foreground or background runs.
How this command is triggered — by the user, by Claude, or both
Slash command
/relay-gemini:rescue [--foreground|--background] [--model <id>] [task]This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
<!-- GENERATED by scripts/ci/sync-external-model-contracts.mjs. Edit scripts/lib/external-model-contracts.mjs instead. -->
# Gemini Rescue
EXTERNAL_MODEL_CONTRACT_VERSION=1
`$ARGUMENTS` is the raw user rescue request. Preserve raw `$ARGUMENTS` after routing `--foreground`, `--background`, and documented model flags.
For long-running work, launch a background job:
Prompt payload:
Write the routed focus text to a private temp file (mode 0600), set `RELAY_PROMPT_FILE` to that path, and delete it after the command exits.
- `node "${CLAUDE_PLUGIN_ROOT}/scripts/relay-run.mjs" gemini-compan...EXTERNAL_MODEL_CONTRACT_VERSION=1
$ARGUMENTS is the raw user rescue request. Preserve raw $ARGUMENTS after routing --foreground, --background, and documented model flags.
For long-running work, launch a background job:
Prompt payload:
Write the routed focus text to a private temp file (mode 0600), set RELAY_PROMPT_FILE to that path, and delete it after the command exits.
node "${CLAUDE_PLUGIN_ROOT}/scripts/relay-run.mjs" gemini-companion.mjs run --mode=rescue --background --lifecycle-events markdown --prompt-file "$RELAY_PROMPT_FILE"For quick attached work, run in the foreground:
node "${CLAUDE_PLUGIN_ROOT}/scripts/relay-run.mjs" gemini-companion.mjs run --mode=rescue --foreground --lifecycle-events markdown --prompt-file "$RELAY_PROMPT_FILE"This is a rescue contract, not a review contract. Rescue may investigate, edit files, and run verification when the user asks for implementation work. Forward the user's task text after routing documented flags; do not replace it with a new plan. Return the runtime output verbatim; do not hide failed or incomplete rescue work. Failed or incomplete rescue is not success. Report the failed state and the next safe action.
Request --lifecycle-events markdown for foreground and background review flows.
Render lifecycle markdown cards directly.
If a legacy JSON lifecycle envelope appears, render external_review_launched immediately.
external_review_progress is a heartbeat for long foreground runs; keep the existing launch card visible and do not render it as a terminal result.
If a background launch envelope has event: "launched" with an external_review field, render the same launch card immediately with session pending.
If a legacy JSON external_review field appears, render it before normal prose.
Lifecycle cards should include provider, job, session, run kind, mode, scope, source transmission, source bearing, selected route, fallback reason, auth path, billing path, source-send approval state, approval scope, review quality, status, error code, error message, HTTP status, and suggested action when those fields are present.
### EXTERNAL REVIEW
| Field | Value |
| --- | --- |
| Provider | <provider> |
| Job | <job_id> |
| Session | <session_id or pending> |
| Run | <foreground|background|unknown> |
| Mode | <mode> |
| Scope | <scope and scope_base/scope_paths> |
| Source | <source_content_transmission> |
| Source Bearing | <source_bearing> |
| Route | <selected_route> |
| Fallback | <fallback_reason> |
| Auth | <auth_path> |
| Billing | <billing_path> |
| Approval | <source_send_approval_state / approval_scope> |
| Review Quality | <review_quality.failed_review_slot / review_quality.semantic_failure_reasons> |
| Status | <status> |
| Error | <error_code> |
| Message | <error_message> |
| HTTP | <http_status> |
| Action | <suggested_action> |
Do not print raw OAuth tokens, API-key values, session cookies, tunnel API keys, bearer tokens, or raw secret values. Credential diagnostics may show key names only.
This command is emitted for the Claude relay plugin.
npx claudepluginhub seungpyoson/relay --plugin relay-gemini/rescueDelegates code investigation, explicit fixes, or follow-up rescue to Codex subagent. Handles --background|--wait, --resume|--fresh, --model, --effort flags plus task text.
/rescueDiagnoses production incidents: checks site health, analyzes recent commits, detects error patterns, generates rollback commands, produces post-mortem template.
/rescueDelegates a task to Codex AI via background codex exec using arguments, based on OpenAI or OpenRouter provider. Presents unfiltered response and awaits user action.
/rescueDelegate investigation, an explicit fix request, or follow-up rescue work to the Gemini rescue subagent
/rescueDelegate investigation, an explicit fix request, or follow-up rescue work to the Copilot rescue subagent
/rescueDelegates investigation, fix, or follow-up work to the Pi rescue subagent, running it in background or foreground with optional execution flags.