Skip to content

Can you automate a second AI model reviewing the first one's work?

Last updated 2026-08-18 · Confidence: documented — both vendors’ current CLI docs; the sandboxed-subprocess caveat is inferred.

Yes: both agents are shell commands, so either can invoke the other — tell Codex to run Claude Code on every draft, and write that rule into AGENTS.md so it holds without re-prompting.

Both agents run as one-shot shell commands

Section titled “Both agents run as one-shot shell commands”

Claude Code has a non-interactive mode: claude -p "<prompt>" reads stdin, prints the answer, and exits — its own docs show a review pattern, piping git diff into claude -p "you are a typo linter…". Codex has the equivalent in codex exec "<task>", which streams the final message to stdout. Since each is just a command, an agent that can run shell commands can call the other and read its verdict — the loop works in either direction.

Codex reads AGENTS.md automatically at session start, global (~/.codex) and per-repo files merged. A standing rule there — “before returning any document, run claude -p 'review this draft' on it and incorporate the comments” — applies to every session in that scope. Alejo recommends this Codex→Claude Code loop as feasible, and more generally suggests naming a couple of candidate solution paths when asking an AI to solve a tooling problem like this one.