Guide
Have a second agent review a Claude Code branch before you merge
The line I trusted least from Claude Code was "Done, all tests pass." With several sessions running, each in its own git worktree, I stopped reading every diff myself and added a review step instead: before a branch is merged, another agent opens read-only in that worktree, reads the diff against main and ends with a verdict. By default it is the other vendor: Codex reviews Claude's branches, Claude Code reviews Codex's.
1. Tell the reviewer what to be suspicious of
The failure to catch is an agent making its own tests pass by changing the tests. A generic "review this" prompt does not look for that. So when the branch touched test files or test settings, say so in the brief and ask the reviewer to check that the tests were not loosened or skipped to make them pass. Give it the task, the diff against main, and nothing else to wander into.
2. "Read-only" means different things per agent
- Codex has a real sandbox:
codex --sandbox read-only. - Claude Code as a reviewer: disallow the Edit, Write and NotebookEdit tools and pre-approve only
git diff,git log,git showandgit status. That is not a sandbox. Bash can still write files, so the permission prompt for any other command is the actual guard. Read each prompt before you allow it.
3. Make the verdict a fixed last line
Ask the reviewer to end with exactly one of these lines and parse only that line:
VERDICT: approve
VERDICT: changes requested
Free-text reviews are easy to skim past. A fixed last line is what makes the review usable: it can become a notification, a badge next to the branch, or a gate before merge, and the findings above it go back to the session that wrote the branch.
4. A Stop hook is not a review
A Claude Code Stop hook that refuses to let the session finish while a test is red is worth having. It catches an agent that stops while tests fail. It does not catch the agent that makes the suite green by editing or skipping the tests, which is why the reviewer's brief above asks about test files explicitly.
5. Codex reports its turn through hooks, once you trust them
If you wire this up yourself, remember that Codex tells you its turn has ended through its hooks, and only after you have approved them. Until then a review can finish without a verdict, so treat a missing verdict line as "not reviewed", never as "approved".
Doing it in Paneherd
Paneherd has this step built in. Before a branch merges, a read-only Codex reviews Claude's work and the other way round, the brief flags a branch whose test files or test settings changed, and the verdict appears next to the branch in the merge queue. A toast offers to send the findings back to the session that wrote the branch in one click. The extension is free, review step and merge queue included.
Limits: the "tests changed" flag goes by file names and settings, not by understanding the tests, and a Claude Code reviewer is guarded by permission prompts, not a sandbox.
Frequently asked questions
Why not just trust "all tests pass"?
Because the agent is reporting on its own work. A second agent that reads the diff against main is cheap, and it can check the one thing the first agent has a reason to get wrong.
Which agent should review which?
The other vendor by default: a different model is less likely to share the writer's blind spots.
Can the reviewer change the code?
It should not. Run Codex in its read-only sandbox, and for Claude Code remove the edit tools and keep the permission prompt for everything else.