Codex
Cross-model code review: have Codex ask Claude to check its diff (and the reverse), then run the tests yourself
DHH's one-line adversarial review setup, checked against the Codex and Claude Code CLI docs, with steps for keeping the reviewer honest.
DHH (@dhh) says his adversarial code review setup is one sentence. When he is driving from Codex, he asks it to "review this with claude." When he is in Claude Code, he asks it to review with codex. Both agents already know how to call the other tool's CLI, take turns, and settle a disagreement.
What changed
Nothing new shipped. This is a workflow DHH shared on Oct 7, 2026, and it works because both tools have non-interactive modes another agent can call from a shell. Codex has codex review, which reviews one target at a time (--uncommitted, --base <branch>, --commit <sha>, or custom instructions as a prompt), plus codex exec for scripted runs. Claude Code runs headless with claude -p "<prompt>". So the agent you are working with can hand the diff to the other model and read its verdict back.
Who is affected
Developers who have both the Codex CLI and Claude Code installed and signed in on the same machine, on macOS, Linux, or Windows. Each cross-review spends usage on both subscriptions. It does not help if you only have one of the two tools.
What to do now
- Install and sign in to both CLIs where your agent runs, and check that
codex review --helpandclaude -p "hello"both work from that shell. - When Codex finishes a change, ask it: "Review this with claude. Send only the git diff, not our conversation." Giving the reviewer the raw diff without the chat history keeps it from simply agreeing with the author's reasoning (a tip from @buswe_com).
- When you are in Claude Code, ask it to run
codex review --uncommitted, orcodex review --base mainfor a whole branch. - Have the driving agent mark each finding as accepted or rejected with a reason. If the two models deadlock, ask for a failing test that proves the bug; if neither can write one, you decide (@datachad).
- Run the tests yourself before merging. Two models agreeing is not the same as working code (@datachad, @karanjagtiani04).
What is not confirmed
That cross-model review catches more bugs than a same-model review is a field report from DHH and people replying to him, not a measured result, and it has not been independently verified. Reviewers can also raise false positives, so treat findings as leads to check. The commands above were checked against OpenAI's Codex CLI reference and Anthropic's Claude Code headless docs on Oct 7, 2026; if your installed version behaves differently, check its --help.
Sources: DHH's post on X, Codex CLI reference, Claude Code headless mode docs, replies from @buswe_com, @datachad on running tests, @datachad on deadlocks, and @karanjagtiani04.
Sources
- OfficialCodex CLI reference · Oct 6, 2026
- ReportDHH on X · Oct 7, 2026
- OfficialClaude Code headless docs · Oct 7, 2026
Get updates like this every morning
- ① Email
- ② Card on Stripe
- ③ 7 days free
Then $2/month · cancel anytime in one click