Two coding agents on one project go wrong in two ways: they edit the same files at once, or you become the clipboard between them, pasting diffs from one chat into the other.
The setup below avoids both. It’s what we run on Amia’s own codebase, where Claude Code and Codex have committed to one branch for weeks: Claude Code does most of the writing, Codex checks it. Over 17 days Codex turned a red build green 2.9 times per 100 commits, against Claude Code’s 0.8, so checking is the job we give it (the full numbers).
Every command below was run on 21 November 2026 with Claude Code 2.1.330 and Codex CLI 0.171.0.

1. One rules file for both
Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and since v2.1.277 it reads AGENTS.md instead when the repository has no CLAUDE.md. Keep the rules in one file so the two agents never follow different versions of them. If you need instructions for Claude Code alone, keep a CLAUDE.md that imports the shared file on its first line:
@AGENTS.md
## For Claude Code only
...
Our repository does the reverse, with one file and a symbolic link: ln -s CLAUDE.md AGENTS.md.
2. One worktree per agent that edits
Two agents editing one checkout overwrite each other’s half-finished files. When both are going to write, give each its own worktree and branch:
git worktree add ../app-codex -b codex/csv-export
cd ../app-codex && codex
A reviewer that only reads can share the writer’s checkout, which is the next step.
3. Have Codex review Claude Code’s diff
Codex has a review command that reads the diff itself, so nobody pastes anything:
codex review --uncommitted # staged, unstaged and untracked changes
codex review --base main # this branch against main
codex review --commit <sha> # one commit
We tried it on a small change that added a discount to a total() function and hid two bugs in it. In 37 seconds Codex ran the function on five baskets and reported both, ranked:
[P1] Apply the discount rate to the subtotal …
subtotal * 1 - discountsubtracts the rate itself rather than a percentage of the subtotal. A 20% discount on 1,000 cents therefore returns 999 cents instead of 800.—
codex review --uncommitted, 21 November 2026
The second, a P2: the new 0.1 default quietly discounts every existing caller of total(items).
Let Claude Code run the review itself
You don’t have to be the one who runs it. In the CLAUDE.md from step 1, so that the instruction reaches Claude Code and not Codex:
## Before you say a change is done
Run `codex review --uncommitted`.
Fix every P0 and P1 finding, or say why it doesn't apply.
And let Claude Code run that one command without asking, in .claude/settings.json:
{
"permissions": {
"allow": ["Bash(codex review *)"]
}
}
4. Ask the question that would change your decision
The review you get by default is close to “does it work?”, and the change that hurts users usually works. On 14 November, a Claude Code session added a Mark Up a Screenshot action to Amia’s iPhone app with a parameter introduced in iOS 18, while the app still supported iOS 17. Every iPhone build failed. At 3:00 a.m. a second session got the build passing by limiting the action to iOS 18: the compiler was satisfied, and iOS 17 users had lost the feature. Three minutes later the first session switched to the older supportedTypeIdentifiers parameter and gave it back to them. A reviewer asked “does it compile?” would have passed both versions.
codex review takes your own instructions in place of --uncommitted (the two can’t be combined), so name the promise a user would notice and ask for evidence:
codex review "Review the uncommitted changes. Can someone on iOS 17
still use the changed feature? Run the smallest check that answers it,
and give the command and the result."
On our discount example, the same shape of question came back with a straight answer: “No. Running python3 -B -c 'from price import total; print(total([{"price_cents": 100}]))' printed 99; the full subtotal is 100 cents.”
5. The other way round: Claude Code reviews Codex’s work
Claude Code runs without its interface using -p. In dontAsk mode, anything you haven’t pre-approved is denied instead of prompting, so this review can read the code and the diff and change nothing:
claude -p "Review the changes on this branch against main.
List bugs a caller would hit, with file and line. Change nothing." \
--permission-mode dontAsk \
--allowedTools "Read" "Grep" "Bash(git diff *)"
On the same discount change it found both bugs, plus a third that Codex hadn’t raised: int() truncates instead of rounding, so 1,335 × 0.9 becomes 1,201. Its attempt to run the code was denied, as the flags intend, so it worked the numbers out from the diff and said so.
6. Keep both in view
Two agents means two places to watch for “done” and “needs you”. Amia puts Claude Code and Codex, with Cursor, Grok Build, Antigravity, Muse Code and its own agents, in one list on your Mac: what needs you, what’s working, what’s done. Put the two chats in one crew and either can message the other by name, so Claude Code can hand Codex the review without you in the middle. A question from either one reaches your iPhone’s Lock Screen. It also works over every app on your Mac, with ⌥Space anywhere and a bar of actions on any text you select, and it pays or signs in without ever seeing your card or password.

Amia is free on a Mac with Apple silicon, with the Claude and Codex accounts you already have. Download Amia for Mac