cd /news/ai-agents/what-is-in-my-two-engines-kit-for-cl… · home › topics › ai-agents › article
[ARTICLE · art-157117] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

What is in my Two Engines Kit for Claude Code and Codex, and the numbers behind each part

A developer released the Two Engines Kit, an installable set of files for running Claude Code and Codex together on the same projects, with Claude Code orchestrating and writing while Codex reviews pull request diffs in a read-only sandbox. In a Tetris benchmark against 44 hidden tests run three times each, Claude Code with Opus 5.5 at xhigh and Codex with GPT-6.1-Sol at xhigh both scored 44/44, but Opus cost $4.47 median versus $0.50 for Codex, an 8.9x difference. The kit routes tasks by cost of error, syncs a single rules file to both engines, and blocks merges of commits lacking an ACCEPT verdict file.

by read6 min views2 publishedOct 25, 2026

If you use Claude Code and Codex on the same projects, you probably keep two rule files, review by hand and push more often than you want to. The Two Engines Kit is the set of files I run both engines with, packed so one script installs them. I've been building it since the first Codex and Claude CLIs, and every number below comes from my own logs on my own projects. This post walks through each part, what it does and the measurement that made me add it. In my setup Claude Code writes and Codex reviews. An orchestrator session in Claude Code plans the work, writes the briefs, starts workers in their own git worktrees, reads their diffs, runs the local gate and merges. Workers never push. For every pull request that is ready, a Codex session reads the diff in a read-only sandbox and has to end with a verdict.

I picked a reviewer from a different company because it has different blind spots. On one pull request this month the first Codex review came back with 2 blockers and 8 should-fix findings. That is one data point, and it is the reason the loop exists. Nothing in the kit stops you from swapping the roles.

I ran the same task on both engines: a Tetris implementation against 44 hidden tests, three runs each, on 12 October.

Engine and model Score Median time Median cost, API-equivalent
Claude Code, Opus 5.5 at xhigh 44/44 in all three runs 21:17 $4.47
Codex, GPT-6.1-Sol at xhigh 44/44 in all three runs 18:13 $0.50

Same score, and Opus cost 8.9 times as much. Inside Claude Code at effort high, Opus 5.5 and Sonnet 5.5 both passed 44/44 in every run, and Haiku 5.5 passed in two of three. The median cost was $1.61 for Opus, $0.72 for Sonnet and $0.19 for Haiku.

So the kit routes work by what a mistake costs. Bounded implementation with a clear brief goes to Sonnet. Haiku gets search, extraction and listing, where a wrong answer is cheap to spot. xhigh and max effort go to design-heavy slices, the first review of a pull request and hard debugging. The routing lives in config/efforts.md as tables you can edit, and every model name is plain text, so you can change it when the names change.

Two engines with two rule files means every rule change gets made twice, or more often once. In the kit you edit one file, rules/RULES.md. Claude Code reads it through @ imports in ~/.claude/CLAUDE.md, and sync.sh builds ~/.codex/AGENTS.md for Codex from the same source. The first rule sets the order when two rules disagree: your current message, then the project's rule file, then the global rules, then memory notes.

The installer also turns off Claude Code's commit and PR attribution, because the rules say no AI attribution in commits. It raises Codex's project_doc_max_bytes to 64 KiB too, because an AGENTS.md past the default limit gets cut off and Codex never sees the rules at the end.

cross-review.sh refuses a checkout with uncommitted or untracked files, runs the Codex review and reads the verdict from the reviewer's final message only. It accepts the result only when Codex exited 0, the checkout is unchanged and the final message has exactly one Verdict: line. Then it writes a verdict file named after the reviewed commit. A crash, a cut-off answer or a moved checkout gives exit 1 and no verdict file.

I added the verdict file after one night in October when I found four test-only commits that had never been reviewed. One was already merged and the other three were in the merge queue. With REQUIRE_REVIEW=1, merge-pr.sh now refuses any commit without an ACCEPT file for that exact commit.

One private repository spent about 2,100 GitHub Actions minutes in its first five days of hosted CI, on a free tier of 2,000 minutes a month. After that, every check runs on my machine first and the work is pushed only after it passes there.

workflow/bin/local-ci.example.sh is the skeleton you fill with your own test commands. It takes one machine-wide lock so two gates never share the CPU and ports, it runs with a clean environment so a stray .env can't change the result, and after a full pass on a clean tree it writes a pass record named after the commit. merge-pr.sh refuses to push without that record for the exact commit and tree. After it pushes, it merges with GitHub's sha parameter, so GitHub refuses the merge if the branch head moved in between. DRY_RUN=1 runs every local check and prints the push and API calls instead of making them.

My own gate runs 40 to 43 checks. Run one group after another, a full pass took 35 to 40 minutes, and split into five parallel lanes it takes about 11 minutes on that machine. The skeleton in the kit has no parallel lanes, and the guide says so.

At most three agents run at once, and that count includes the review session and any helper a worker starts. A week after I set the cap, I saw four agents running while my list showed three, because a worker had started a helper. Since then the first line of worker-rules.md forbids workers from starting helpers.

Cleanup is a hard rule in RULES.md because of two days on one machine. On 7 October one cleanup removed 29 merged worktrees (24 GB) and 31.2 GB of Docker build cache. On 17 October another removed 69 worktrees and 88 merged branches, and disk use went from 184 GB to 76 GB.

If you run your own MCP memory server, the memory module lets both engines save decisions and facts as short notes. A Stop hook asks once per turn for a note when the turn did real work and saved nothing. Once a week one Claude Code session proposes corrections and a second session checks each one against the original notes before anything is written. The first run, on 22 September, made 9 proposals, applied 8, and the verifier rejected 1. The recall test was 18 of 18 before and after. No server is included, and without one the installer skips the module. You need bash 4 or newer, python3 3.9 or newer, git, and Claude Code and Codex CLIs, both signed in. gh is needed only for the merge and chain scripts. It runs on WSL2, Linux and macOS. I tested it on WSL2 with Ubuntu 24.04, and Linux and macOS are supported by design but untested. Native Windows is not supported.

bash install.sh previews every change and asks y/N per step. Your existing CLAUDE.md and AGENTS.md rules are kept active in both engines. Every file it replaces or creates goes into a private backup, and uninstall.sh restores them byte for byte.

The free, MIT licensed two-engines-gate has the core check: a read-only review saved under the commit hash, a test pass record and a merge check that wants both. Run bash demo.sh to watch one loop with a stand-in reviewer.

The paid Two Engines Kit (currently v1.0.2) adds the shared rulebook, hooks, the installer with backups, the full review loop with merge-pr.sh and chain.sh, the memory module and the guide with every number above. The Two Engines Kit is built on information gathered since the first Codex and Claude CLIs.

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/what-is-in-my-two-en…] indexed:0 read:6min 2026-10-25 · —