helixir: Agent for Claude Code

.claude/agents/codex-adversarial.md

codex-adversarial is an agent for Claude Code from bookedsolidtech/helixir. It costs 60 tokens per session (1,323 once invoked), scanned A, original, MIT.

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

Written for Claude Code: installed under .claude/. Also seen: runs codex exec; mentions Codex.

This is bookedsolidtech/helixir's own configuration. It tells Claude Code how to work on helixir itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything helixir configures →

Reuse

Borrowing it

Nothing to install: this file belongs to bookedsolidtech/helixir. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bookedsolidtech/helixir/main/.claude/agents/codex-adversarial.md
Clone the repo
git clone --depth 1 https://github.com/bookedsolidtech/helixir

Made for: Claude Code.

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-adversarial

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/bookedsolidtech/helixir/codex-adversarial"><img src="https://agentmods.dev/badge/agents/bookedsolidtech/helixir/codex-adversarial.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00060 $0.01323
Opus 5.5 $0.00024 $0.00529
Sonnet 5.5 $0.00012 $0.00265
Haiku 4.5 $0.00006 $0.00132

Measured 2mo ago against content hash edf64c5a0454, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 4mo ago), licensed MIT. It adds 60 tokens to every session and 1,323 once invoked, about $0.0002 per session on Opus 5.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.