Install both and sign in with your own Claude and ChatGPT accounts. Put your rules in AGENTS.md, which Codex reads, and add the line @AGENTS.md to CLAUDE.md so Claude Code reads the same file. Give each agent its own git worktree and one job, and keep decisions in one file both read first.
Why use Claude Code and Codex together?
Each agent tends to miss different things, so one can review what the other wrote. If you already pay for a Claude plan and a ChatGPT plan, using both adds no new bill, and when one plan reaches its limit the other can carry on.
The trouble starts when they share a project without sharing the rules. Claude Code reads CLAUDE.md; Codex reads AGENTS.md. Write your rules in one and the other agent never sees them, so the two make different choices and undo each other’s work: that’s agent drift, between tools.
1. Install both and sign in
Install Claude Code and Codex the way each maker says, then sign in inside each one with your own account: Claude Code with your Claude plan, Codex with your ChatGPT plan. Each runs on its own subscription, and its limits stay its own.
2. Keep one set of rules both agents read
Put the rules in AGENTS.md, which Codex reads, and make CLAUDE.md point at it. CLAUDE.md can pull in another file by naming it after an @, so one line is enough, and you never keep two copies in step.
If you add Gemini CLI too, it reads GEMINI.md, which can import a file the same way: one line, @AGENTS.md.
3. Give each agent its own job and folder
Never run both agents in the same folder at once (the parallel agents guide shows why). Give each one a git worktree of its own, on its own branch, and one clear job. Two ways of splitting the work that hold up well:
- By task. Claude Code builds the booking form; Codex writes the confirmation emails. Different files, different branches, merged one at a time.
- Writer and reviewer. One agent makes the change on its branch. When it’s done, start the other in that worktree and ask it to review the diff against
AGENTS.mdbefore you merge.
4. Write decisions down where both can see them
Rules say how to work; decisions say what was chosen. Keep the decisions in a short file the repository tracks, with an id each, and tell both agents to read it first and ask before going against it. Then a choice Claude Code made on Monday still holds when Codex picks the work up on Tuesday. The decision log guide has the format.