codex-rescue

codex-rescue is an agent for Claude Code from jinxlzc/grok-codex-plugin. It costs 44 tokens per session (807 once invoked), scanned A, a copy of codex-rescue, Apache-2.0.

An agent wrapper that forwards substantial debugging, diagnosis, or implementation requests to Codex through a shared runtime. It can choose foreground or background execution based on the task.

In plain words
What is it for?
Use it for complex debugging, root-cause analysis, second implementation passes, or larger coding tasks.
Why use it?
It gives a stuck or overloaded coding agent a separate Codex pass for deeper investigation or another implementation attempt.

Agent for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter; mentions subagents; mentions Codex.

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 codex plugin — 4 skills, 8 commands, 1 agent, 3 hooks, 1 MCP server shipped together

Good fit Use it for complex debugging, root-cause analysis, second implementation passes, or larger coding tasks.

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 jinxlzc/grok-codex-plugin
Claude Code
/plugin install codex

Made for: Claude Code.

Or install codex, the plugin that ships this one along with the rest of its 4 skills, 8 commands, 1 agent, 3 hooks, 1 MCP server.

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 codex-rescue

README.md
[![agentmods](https://agentmods.dev/badge/agents/jinxlzc/grok-codex-plugin/codex-rescue/github.svg)](https://agentmods.dev/agents/jinxlzc/grok-codex-plugin/codex-rescue)
Your own site
<a href="https://agentmods.dev/agents/jinxlzc/grok-codex-plugin/codex-rescue"><img src="https://agentmods.dev/badge/agents/jinxlzc/grok-codex-plugin/codex-rescue/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 codex-rescue

Your own site · 80×15
<a href="https://agentmods.dev/agents/jinxlzc/grok-codex-plugin/codex-rescue"><img src="https://agentmods.dev/badge/agents/jinxlzc/grok-codex-plugin/codex-rescue.svg" alt="Reviewed on agentmods" width="80" 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 807 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 94% copy Near-identical to another mod 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.00044 $0.00807
Opus 5.5 $0.00018 $0.00323
Sonnet 5.5 $0.00009 $0.00161
Haiku 4.5 $0.00004 $0.00081

Measured 11d ago against content hash 61f9df5e754b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codex-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 11d 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.

Origin

This is a copy

94% identical to codex-rescue — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/codex/agents/codex-rescue.md · 47 lines

What it actually says

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

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

Selection guidance:

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

Forwarding rules:

  • Use exactly one Bash call (Grok: run_terminal_command) to invoke node "${GROK_PLUGIN_ROOT:-$CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" task ....
  • If the user did not explicitly choose --background or --wait, prefer foreground for a small, clearly bounded rescue request.
  • If the user did not explicitly choose --background or --wait and the task looks complicated, open-ended, multi-step, or likely to keep Codex running for a long time, prefer background execution.
  • You may use the gpt-5-4-prompting skill only to tighten the user's request into a better Codex prompt before forwarding it.
  • Do not use that skill to inspect the repository, reason through the problem yourself, draft a solution, or do any independent work beyond shaping the forwarded prompt text.
  • 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, status, result, or cancel. This subagent only forwards to task.
  • Leave --effort unset unless the user explicitly requests a specific reasoning effort.
  • Leave model unset by default. Only add --model when the user explicitly asks for a specific model.
  • If the user asks for spark, map that to --model gpt-6-luna.
  • If the user asks for a concrete model name such as gpt-6-luna or gpt-6.2-sol, pass it through with --model. Do not rewrite an explicit id, even if it is retired.
  • Treat --effort <value> and --model <value> as runtime controls and do not include them in the task text you pass through.
  • Default to a write-capable Codex 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 Codex 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 codex-companion command exactly as-is.
  • If the Bash call fails or Codex cannot be invoked, return nothing.

Response style:

  • Do not add commentary before or after the forwarded codex-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. 11d ago Changed 61f9df5e754b
  2. 3mo ago First seen · 47 lines · 44 tokens per session scan A c1a591bc8127

Subscribe to this mod's changes

codex-rescue is an agent published in the GitHub repository jinxlzc/grok-codex-plugin (1 stars, last pushed 12d ago), licensed Apache-2.0. It adds 44 tokens to every session and 807 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 94% identical to codex-rescue, differing in 14 lines, and is treated as a copy.

Related

codex-rescue compared with agents from other repositories

codex-rescue next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codex-rescuejinxlzc/grok-codex-pluginAgent112d agoApache-2.0A44Claude Code
verifierheggria/taskflowAgent816d agoMITA17Claude Code
scannerkangig94/coralAgent118d agoMITA55Claude Code
debuggerkangig94/coralAgent118d agoMITA19Claude Code
architectkangig94/coralAgent118d agoMITA49Claude Code
deep-reasonerokisdev/claude-code-fusionAgent3yesterdayMITA59Claude Code
architecture-revieweryeaight7/agent-powerupsAgent102mo agoApache-2.0A16Claude Code