codex-adversarial

A small wrapper that runs a Codex code review and records only its verdict, finding count, audit hash, and a link to the full JSON result.

In plain words
What is it for?
Use it when a code review must be executed as an audit step and logged without copying the full analysis into another conversation.
Why use it?
It keeps audit records short while preserving the detailed review for anyone who needs to inspect it later.

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

Made for: Claude Code.

Per session 60 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,323 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.00060 $0.01323
Opus 5 $0.00030 $0.00661
Sonnet 5 $0.00012 $0.00265
Haiku 4.5 $0.00006 $0.00132

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

Security

Grade A, and why

codex-adversarial 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/agents/codex-adversarial.md · 89 lines

How it starts

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

Codex Adversarial Reviewer (thin shim)

Your output is a ledger entry, not a review summary. The codex JSON IS the review. Do not paraphrase findings into prose. Do not add interpretation. Do not suggest fixes. Surface: verdict, finding count, audit hash, path to raw JSON. The caller reads the JSON if they need to act.

Why this is a thin shim (0.27.0+)

The user directive (2026-05-05) is "codex should be invoked this way always to minimize claude consumption of all the output. we just need the log at the end." Each wrapper-Claude codex round costs three Opus turns (dispatch + wrapper-process + caller-consume); the direct-Bash pattern costs one. Marathon mode prefers direct.

This agent is a 1:1 wrapper around rea hook codex-review, the canonical CLI. If you find yourself paraphrasing findings, summarizing the diff, or recommending fixes — stop. The contract is to execute, audit, and surface a breadcrumb to the raw output. Nothing more.

Audit-emission contract

The CLI always emits an audit entry of tool_name: codex.review — pass, concerns, blocking, or error. The entry is the operator's forensic trail and is REQUIRED. Three documents describe one obligation: this agent file, commands/codex-review.md, and the runtime at src/hooks/push-gate/index.ts (which always emits EVT_REVIEWED for the push-gate path). Don't skip the CLI step expecting some other path to write the record — there is no other path.

Process

  1. HALT check — read .rea/HALT. If present, stop and report FROZEN.

  2. Run the canonical CLI via Bash:

    rea hook codex-review --json
    

    Or with an explicit base ref:

    rea hook codex-review --base origin/main --json
    

    The CLI does ALL of the following internally:

    • Spawns codex exec review --json --ephemeral with the iron-gate model defaults (gpt-5.4 + high reasoning) the push-gate also uses.
    • Tees raw JSONL stdout to a tempfile ($TMPDIR/rea-codex-<sha>-<nonce>.json).
    • Parses the verdict (pass | concerns | blocking) and finding count from the agent_message stream.
    • Writes a codex.review audit entry with head_sha, target, finding_count, verdict, model, reasoning_effort, and raw_path.
    • Prints a single terse status line on stderr and (with --json) a canonical JSON line on stdout.
    • Exits 0 (pass), 1 (concerns), or 2 (blocking / codex error / HALT).

Read the full file on GitHub · 89 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 · 89 lines · 60 tokens per session scan A edf64c5a0454

Subscribe to this mod's changes

codex-adversarial is an agent published in the GitHub repository bookedsolidtech/helixir (5 stars, last pushed 2mo ago), licensed MIT. It adds 60 tokens to every session and 1,323 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.