A gated build loop between Claude Code and Codex CLI. Codex writes a plan, Claude approves it, Codex implements that same plan from the same thread, Claude reviews the diff against it. Release refuses an unreviewed tree. MIT, no extra deps.
No reviews yetBe the first to leave a review for codex-claude-loop
Maker
📌
The title is the whole problem. One agent writes the code and the same agent tells you it
looks good, which is not review, it is a receipt.
I have tried a lot of Claude + Codex setups. The handoff was always the weak point: Claude
writes a plan, you paste it into Codex, and Codex builds a summary of reasoning it never
did. Then you paste the diff back for review. Half a day of tab-switching per feature.
This closes it into one loop. Codex opens a persistent thread and writes the plan as the
implementer. Claude approves it or sends it back. Codex resumes that same thread and
implements its own approved plan. Claude reviews the diff against that plan file.
The part I did not expect to matter as much as it did: keeping the thread. When Codex
implements a plan it authored, the reasoning is still in context, so it stops re-deciding
what the plan already settled.
The gates refuse things on purpose. Implementation will not start unless the plan is
approved, and the approval is bound to the plan text that was read, so editing the plan
afterwards voids it. Release refuses unless the review approved the tree as it is right
now. An "approve" that carries blocking items is rewritten to "revise" on disk.
I found several of those the honest way: I handed the whole thing to Codex as an
adversarial reviewer, and it opened with "not release-ready, both hard gates can report
approval for state they did not validate." It was right. v0.2.0 is what came out of that.
It ran 45 gated waves across 20 lanes of a production codebase before I extracted it. MIT,
free, no signup, nothing to buy. Tests are 53 assertions that run against a stub codex, so
you can verify the gates without spending quota.
Happy to answer anything, and I would genuinely like to hear where it breaks for you.
Report
The gated Codex-writes / Claude-reviews loop is a clever way to break the self-approval problem. Since both agents run in the same thread, have you thought about letting people point each side at a different backend endpoint (e.g. an Anthropic-compatible /v1/messages gateway https://inferencehub.tech/) so the reviewer and implementer can be different models/providers?
The gated Codex-writes / Claude-reviews loop is a clever way to break the self-approval problem. Since both agents run in the same thread, have you thought about letting people point each side at a different backend endpoint (e.g. an Anthropic-compatible /v1/messages gateway https://inferencehub.tech/) so the reviewer and implementer can be different models/providers?