Guides/Claude Code

How to use Claude Code and Codex together

Run Claude Code and OpenAI Codex side by side so one writes the code and the other reviews it — a practical cross-review workflow with tests in the loop.

Vulgr team··3 min read

The short answer: give each agent one job. Let Claude Code write the change, let Codex review the diff, and let your tests decide when it is done. Loop until the tests pass and the reviewer approves. Two different models catch different mistakes, so the pair is more reliable than either agent alone.

Why pair two different coding agents?

A single agent reviewing its own code tends to repeat its own blind spots. A second agent built on a different model reads the diff with fresh eyes. In practice that catches things like a missing header on an error response, an edge case the tests did not cover, or a change that drifts from what you asked for.

The pairing works best when the roles are fixed:

RoleAgentWhat it does
WriterClaude CodeReads the code, makes the change, runs the tests
ReviewerCodexReads the diff, approves it or sends notes back
JudgeYour test suiteDecides whether the change actually works

Step 1 — Install and sign in to both CLIs

Both agents run as command-line tools. Install them, sign in, and make sure each one starts in a plain terminal in your project folder. Nothing about this workflow requires new API keys: you use the subscriptions you already have.

Step 2 — Give them separate jobs

Start the writer with the goal — for example “add rate limiting to /api, 100 requests per minute per key”. When it finishes and the tests pass, hand the diff to the reviewer: “review Claude’s changes”. If the reviewer finds a problem, the notes go straight back to the writer.

Step 3 — Keep the tests in the loop

The loop only converges if something objective decides when you are done. Point both agents at the same test command (for example npm test). The writer must get it green; the reviewer must approve the diff. Cap the number of rounds so a disagreement cannot run forever.

Doing it in Vulgr

Vulgr is an open-source terminal built for exactly this. Its Duo Loop mode opens the two agents in real terminals side by side: the checker writes tests from your goal, the writer codes until they pass, and the checker reviews the diff and approves or sends feedback — up to the number of rounds you choose. See Duo Loop.

From a terminal or CI, the same idea is one command with the orchestrate CLI:

orchestrate run "Fix the race condition in the payments module" \
  --primary claude \
  --reviewer gemini \
  --verify \
  --verify-cmd "npm test" \
  --dual \
  --max-retries 2

Common questions

Do Claude Code and Codex conflict when they edit the same files?

Only if both write at once. Keep one writer and one reviewer, or give each agent its own Git worktree so their changes never collide. See running agents in parallel with Git worktrees.

Can I add a third agent?

Yes. A common setup is writer, reviewer and tester — for example Claude Code writes, Codex reviews and Antigravity runs the end-to-end tests. Vulgr’s Agent Swarm mode runs exactly these three roles.

Does this cost more?

Each agent uses its own plan or API key, so a review round costs one extra agent turn. In exchange you spend less time reviewing by hand. Vulgr itself is free and MIT-licensed.

Vulgr is a free, open-source (MIT) desktop terminal for running AI coding agents — Claude Code, Codex, Gemini CLI, Cursor, OpenCode and Antigravity — side by side. It gives each agent a role so one writes code, another reviews it and a third tests it, looping until the work passes. It runs locally on macOS, Windows and Linux and uses the agent CLIs you already have.

Try it in Vulgr