Guide
Run Codex and Claude Code together: a practical workflow
Running Codex and Claude Code on one project works well if you keep them out of each other's files, give them different jobs, and watch both. Here is a workflow that does that. For the general version with other CLIs, see running several AI coding agents side by side.
1. One worktree each
Two agents in one checkout will eventually overwrite each other. Create a worktree per agent:
claude --worktree feature-api # Claude Code makes its own
git worktree add ../app-tests -b tests
cd ../app-tests && codex # start Codex inside the second one
Merge the branches when each is done. Details: Claude Code worktrees.
2. Shared instructions
Codex reads AGENTS.md and Claude Code reads CLAUDE.md. Put the rules both need (how to run tests, code style, folders to avoid) in one of them, and have the other file say to follow it, so they do not drift apart.
3. Give them different jobs
- Writer and reviewer. One builds the change; the other reads
git diff mainand lists problems before you review. Different models miss different things. - Implementation and tests. One agent writes the feature, the other writes its tests in a separate worktree.
- Second opinion. For a hard bug, give both the same prompt and keep the better fix.
4. Watch both
Both agents stop and wait for approval, and a waiting agent does nothing. In VS Code, Paneherd opens each as a terminal in a grid and shows which are working, waiting or finished from their own hook events, sends one prompt to both, and keeps Claude Code's and Codex's usage limits at the top of its sidebar. The free version runs up to four panes at once.
5. Spend two plans, not one
Claude Code draws on your Claude plan and Codex on your ChatGPT plan, so when one is near its limit the other keeps going. Check both before starting a long task: Claude Code, Codex.
Frequently asked questions
Is it worth the extra setup?
If you regularly hit one tool's limit or want an independent review, yes. For a single small task, one agent is enough. See Codex vs Claude Code.