codex-review

A command that runs an adversarial review of the current code branch using Codex. It can compare against a base branch or inspect a selected number of recent commits, returning structured review results.

In plain words
What is it for?
Use it for regular branch reviews, reviews against a chosen base such as origin/main, or targeted reviews of recent commits; use verbose mode when a fuller explanation is needed.
Why use it?
It provides a focused second review intended to uncover defects or risks that routine checks may miss.

Command for Claude Code

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/bookedsolidtech/helixir/codex-review
Clone the repo
git clone --depth 1 https://github.com/bookedsolidtech/helixir

Made for: Claude Code.

Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,543 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.00043 $0.01543
Opus 5 $0.00022 $0.00772
Sonnet 5 $0.00009 $0.00309
Haiku 4.5 $0.00004 $0.00154

Measured 2d ago against content hash 79ec827bcb55, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-review 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 2d 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.

.claude/commands/codex-review.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/codex-review — Adversarial Review via Codex

Default: direct Bash invocation via rea hook codex-review — the cheap, thin, marathon-mode path. The codex JSON is the review; this command's output is a ledger entry. Use --verbose only when you specifically need a Claude-paraphrased summary.

Two modes

Mode Cost Output When
default (thin) 1 Opus turn Terse verdict+count+raw-path on stderr, canonical JSON on stdout Every routine review round, especially in marathon-mode iteration
--verbose (wrapper) 3 Opus turns Claude-paraphrased findings with categories + severities Teaching context, or when the caller is unfamiliar with the codex JSON shape

Direct = cheap. Wrapper = expensive. Pick the right one for the situation.

Default path (thin)

# With auto-detected upstream/main base
rea hook codex-review --json | tee /tmp/rea-codex-last.json

# Or with an explicit base ref
rea hook codex-review --base origin/main --json | tee /tmp/rea-codex-last.json

# Or narrow to last N commits
rea hook codex-review --last-n-commits 5 --json

The CLI runs codex exec review --json --ephemeral directly with the iron-gate model defaults (gpt-5.4 + high reasoning), tees raw JSONL to $TMPDIR/rea-codex-<sha>-<nonce>.json, and writes a codex.review audit entry. Exit codes: 0 (pass), 1 (concerns), 2 (blocking / codex error / HALT).

The stdout JSON shape:

{
  "verdict": "pass" | "concerns" | "blocking",
  "finding_count": 0,
  "head_sha": "<SHA>",
  "target": "<base ref>",
  "audit_hash": "<hash>",
  "raw_path": "/tmp/rea-codex-...json",
  "exit_code": 0
}

To act on findings, read raw_path directly with the Read tool. Each line is a JSONL event; the item.completed events with item.type === "agent_message" carry the review prose. Don't paraphrase to chat — show the user the exit code and let them decide what to do next.

Verbose path (wrapper)

When the user explicitly asks for a paraphrased summary — typically because they're not yet fluent in codex JSON — invoke the codex-adversarial agent. The agent itself runs rea hook codex-review --json and then produces a Claude-paraphrased summary by reading the raw JSON. This is the 3-Opus-turn path and should NOT be the default.

Read the full file on GitHub · 109 lines

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. 2d ago First seen · 109 lines · 43 tokens per session scan A 79ec827bcb55

Subscribe to this mod's changes

codex-review is a command published in the GitHub repository bookedsolidtech/helixir (5 stars, last pushed 2mo ago), licensed MIT. It adds 43 tokens to every session and 1,543 once invoked, about $0.0002 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.