# How do I make Claude Code and Codex work together?

Let one hand work to the other. In Harmux a Claude Code Session can start a Codex agent, or the other way round, and the two pass briefs, questions and results to each other directly. A common pattern is Claude Code writing a change and Codex reviewing the pushed commit with fresh eyes.

Doing this by hand is tedious. You run two terminals, copy a diff from one into the other, paste the review back, and play messenger until both are happy. It's enough friction that the second opinion gets skipped, which is a shame, because a second opinion from a different model catches real bugs.

## What it looks like

Sam asks Claude Code to add rate limiting to the public API and get a Codex review before calling it done. Claude Code writes the change, pushes a branch and hands the commit to a Codex agent on its own machine. Codex reports two problems: a missing test for the burst limit, and a header that leaks the limit to anonymous callers. Claude Code fixes both, explains why it left a third suggestion alone, and tells Sam it's ready.

Sam never copied a diff between two terminals. He read one message at the end.

## Why two models are better than one

Two model families make different mistakes. A reviewer that didn't write the code, and was trained differently, catches things the author's own self-review misses. Some teams also like one agent for planning and the other for certain kinds of task. Harmux makes either easy, and you see both agents side by side in your Fleet.

## How the handoff works

Each agent runs on its own machine, as Anthropic or OpenAI ship it, signed in with your own Claude or ChatGPT account. The reviewer starts from the exact commit the author pushed, in a clean context, so it reads what was written and nothing else.

They talk the way two colleagues would. The author sends a brief, the reviewer can ask a question back, and its report wakes the author, which carries on from there. If the reviewer asks something the author can't answer, the question comes to your Inbox. You can open either agent's Chat or terminal at any time and step in.

The pairing works in both directions. Codex can write while Claude Code reviews, a Claude Code agent can plan a migration and hand each module to Codex, or either can ask the other to critique a plan before writing anything. It also works however the first agent started: from Slack, the App, the CLI or an Automation.

## No lock-in to one provider

Using both also keeps you free. A Session can switch from Claude Code to Codex, or back, in the middle of a conversation, and its Chat, files and git come along. If one model is having a bad week, or a new release is better at the job, you move the work instead of starting it again. (A Lead and an Automation's runs keep the agent they started with.)

That's the part a single lab's cloud product can't give you. There, your sessions, their history and their context live with that vendor, and moving to another provider means starting over. Your code is safe in Git either way; on Harmux the work around it stays yours too.

## Set it up

Connect a Claude account and a ChatGPT account (or an API key for either) in Harmux. Then ask for it in plain words:

```
hmux new --harness claude-code "Add rate limiting to the public API. When it's done, push it and get a Codex review of the commit."
```

New to Harmux? [Get started](/login); it's free to sign up.

## Related

- [Run many Claude Code and Codex agents in parallel](/guides/run-claude-code-and-codex-agents-in-parallel)
- [An agent that manages coding agents](/guides/agent-that-manages-coding-agents)
- [Harmux vs Codex cloud](/compare/codex-cloud)
- [Harmux vs Claude Code on the web](/compare/claude-code-on-the-web)
