Run Claude Code and Codex side by side
Open two terminal panes in your project. Run claude in one and codex in the other. A few habits keep them out of each other’s way.
Two terminals
Your terminal’s split view or tmux will do. Start claude in one pane and codex in the other, in the same project folder.
Each agent keeps its own login and history.
One set of instructions
Codex reads AGENTS.md. Claude Code reads CLAUDE.md. Keeping two copies in step is a chore.
Write the rules once in AGENTS.md. Then make CLAUDE.md a single line that imports it.
@AGENTS.md
Claude Code reads an imported file as part of CLAUDE.md. Now both agents follow the same rules.
Give each its own folder
If both edit code at the same time, put each one in its own git worktree. Then neither runs tests on the other’s half-made change. This post has the commands.
Let one check the other
Have one agent write a plan. Ask the other to review it before any code changes.
In two terminals that means copying text from one to the other. That step is easy to skip.
With Trek
Trek is a free desktop app that runs both in one window. It finds claude and codex on your PATH and uses the logins you already have.
Threads from either agent sit in one sidebar. One that waits on you goes to the top. To watch two at once, press ⌘\ (Ctrl+\ on Windows) and pick a thread. It opens beside the one on screen, with its own composer and model.
For a second opinion, use Consult in the composer. Ask Codex to review Claude’s plan, or the other way round. The other agent can just give advice, or build the plan too.
Trek also imports your past Claude Code and Codex sessions. Old work shows in the same sidebar as new work.