codex-review
Tiered, surface-scaled multi-reviewer code review for git diffs, powered by the
OpenAI Codex CLI. One bash script: you pick
an effort tier, it measures your diff, and a single codex exec call has Codex
spawn a fleet of parallel reviewer subagents sized to the change — then verify,
dedup, and rank what they find into clean JSON.
codex-review high --base main
How it works
- Resolve the diff —
--base BRANCH, else @{upstream}, else main/master,
else HEAD~1. Uncommitted and untracked work is included automatically.
- Measure the surface — units = changed files + changed lines / 80.
- Plan the fleet — the tier sets a reviewer floor/ceiling, model, reasoning
effort, verification votes, and findings cap; reviewer count scales with
surface units within that band.
- Delegate — one
codex exec --sandbox read-only call instructs Codex to
spawn that many reviewer subagents in parallel (native multi_agent /
collab), each assigned a finder angle; large diffs shard angles across
file groups.
- Verify & report — candidates are deduped and (tier permitting) passed to
verifier subagents; survivors come back as schema-enforced JSON on stdout,
ranked most-severe first. Transcript goes to stderr.
Tiers
| tier | model | effort | reviewers | verification | max findings |
|---|
| light | gpt-5.6-terra | low | 1 | self-check | 5 |
| med | gpt-5.6-terra | medium | 2–4 | self-check | 7 |
| high | gpt-5.6-sol | high | 6–10 | 1-vote, recall-biased | 10 |
| xhigh | gpt-5.6-sol | high | 8–14 | 2 independent refuters | 14 |
| max | gpt-5.6-sol | high | 10–20 | 3-vote adversarial + loop-until-dry | 20 |
Finder angles (drawn from Claude Code's /code-review skill): line-by-line diff
scan, removed-behavior audit, cross-file tracer, reuse, simplification,
efficiency, altitude, and conventions (AGENTS.md / CLAUDE.md). Correctness
angles outrank quality angles when the cap forces cuts.
Install
Requires: git, bash, and an authenticated Codex CLI
(npm i -g @openai/codex && codex login) with access to the GPT-5.6 family.
curl -fsSL https://raw.githubusercontent.com/cdubiel08/codex-review/main/codex-review \
-o ~/.local/bin/codex-review && chmod +x ~/.local/bin/codex-review
Or clone and symlink. macOS's stock bash 3.2 is supported.
Use as a Claude Code plugin
This repo is also a Claude Code plugin — the
same script, wrapped in a skill that knows how to pick a tier, run the review,
and report findings.
/plugin marketplace add cdubiel08/codex-review
/plugin install codex-review@codex-review
Then either invoke it explicitly or just ask:
/codex-review high --base main
"give me a codex second opinion on this branch before I push"
The plugin ships:
codex-review skill — tier selection, preflight checks, invocation, and
reporting rules, with references/tiers.md (sizing math, finder angles,
verification semantics, cost) and references/troubleshooting.md loaded on
demand.
/codex-review command — explicit entry point; passes arguments straight
through to the script.
Adds ~250 tokens to a session until the skill fires. The plugin runs the bundled
script, so a standalone install on PATH is not required.
Usage
codex-review # med review of upstream...HEAD + working tree
codex-review light # quick single-reviewer pass
codex-review high --base main # full 8-angle review against main
codex-review xhigh --out r.json # findings to a file instead of stdout
codex-review max --model gpt-5.6-terra # override the tier's model
codex-review high --dry-run # print the plan + prompt, don't call codex
Output shape (stdout, schema-enforced):
{
"tier": "high",
"reviewers_used": 6,
"findings": [
{
"file": "inventory.py",
"line": 17,
"severity": "major",
"summary": "The loop bound omits the final inventory item.",
"failure_scenario": "For a one-item list, range(len(items)-1) is empty ...",
"verdict": "CONFIRMED"
}
]
}
severity is critical|major|minor; verdict is CONFIRMED|PLAUSIBLE
(refuted candidates are dropped during verification).
Notes