Claude Code writes, Codex reviews, a gate decides what merges. Here's the short version I check before trusting that loop on a repo. The full walkthrough, with the prompts, is in How to make Codex review Claude Code's commits.
1. Codex runs read-only.
codex exec -s read-only --color never --output-last-message <file> -, with the prompt on stdin. The reviewer can read files and run git diff, but it can't write or hand back a patch.
2. One verdict line, saved under the commit hash.
Verdict: ACCEPT or Verdict: CHANGES REQUIRED, read only from the --output-last-message file. A crash, an empty answer or two Verdict lines leave no saved verdict, so the commit can't merge.
3. A brief exists before the code.
Every line under "Done means" is something a reviewer can confirm from the diff or a test. Write "a customer email with a comma is escaped", never "export works well".
4. Each new test failed on the base commit.
The engine that writes the code often writes the tests too. A test that already passes on the old code proves nothing about the change.
5. House rules live where both engines read them.
CLAUDE.md for Claude Code, AGENTS.md for Codex. Keep the AGENTS.md part short: Codex stops adding instruction files once their combined size reaches project_doc_max_bytes, 32 KiB by default.
6. The reviewer answers every line.
Met with a file:line, not met with what's missing, or not checkable with the evidence it would need. Findings outside the brief need a concrete failure. Style preferences aren't findings.
7. Rounds have a hard cap.
Later rounds raise only what blocks the merge. If the last allowed round says CHANGES REQUIRED, the merge stays blocked and a person decides.
The merge is refused unless that exact commit has a test pass and a saved ACCEPT. A test pass alone won't catch a test Claude Code weakened in the same commit, so that falls to the reviewer: what my review gate does with weakened and deleted tests.
If you want the whole setup prebuilt, the Two Engines Kit for Claude Code and Codex is a paid kit I made, built on information gathered since the first Codex and Claude CLIs.
Top comments (0)