Free guide
Claude Code and Codex in one project: who gets what and one rules file
How to work with Claude Code and Codex in one project: who gets what, one rules file for both AIs, and how to name saved versions. In our video, Codex read AGENTS.md while Claude read CLAUDE.md, the files contradicted each other, and in the end the two AIs started a shared chat where they mostly discussed the author.
CLAUDE.md
@AGENTS.md
AGENTS.md
Project: online flower store. Check: npm test. Codex may work in server/ and db/, Claude in web/. Saved versions: fix(payment): description [codex]. Never: keys, .env, the live database.
In short
Split the work by folder and have each AI’s code reviewed by the other. Write the rules in one file, AGENTS.md. Delete CLAUDE.md, or leave a single line in it: @AGENTS.md. Name saved versions “type(area): what changed” and add which AI made them.
Who gets what
- Split the work by folder, not by who’s smarter. One AI gets the server and the database, the other the screens and the text. Two AIs in the same files overwrite each other’s work.
- Give a task with an exact brief and tests to the one that works quietly. A task that needs choosing and explaining goes to the one that asks first. In our video, Codex took the server and Claude the screens. It works when tests guard the server and you don’t have to read its code yourself.
- Not both at once in the same folder. Either one after the other, or each in its own copy of the project (
git worktree). In Claude Code, the commandclaude --worktree platbacreates such a copy. - Cross-review. Claude reads what Codex wrote, and the other way around. The reviewer reads only the changes, not the whole project, writes a list of problems and doesn’t rewrite anything itself.
One rules file for both AIs
- Codex reads its rules from the AGENTS.md file. Claude Code reads it too, but only when there’s no CLAUDE.md in the project. As soon as both files are there, it reads only CLAUDE.md (Claude Code docs, 2026). Within a week, the two files drift apart, and each AI is right in its own way.
- Write the rules in one file, AGENTS.md. Delete CLAUDE.md, or leave a single line in it:
@AGENTS.md. The line with the @ sign pulls the whole of AGENTS.md into CLAUDE.md, so both AIs read the same thing. This also helps with older versions of Claude Code that don’t read AGENTS.md on their own. - What goes in it: what the project is, how to run and check it (the test command), who may work in which folders, how to name saved versions and what’s off-limits: secret keys, the
.envfile, the live database.
How to name saved versions
In Git (the program that saves versions), a saved version of the project is called a commit, and each one has a description. You search the history by these descriptions, so they should all have the same format.
- The format “type(area): what changed”.
featis a new feature,fixa bug fix,refactora rework that doesn’t change behavior. Example:fix(platba): dvojklik už nevytvoří dvě objednávky(Czech for “fix(payment): a double click no longer creates two orders”). The format comes from the Conventional Commits rules. - At the end, add which AI did it:
[codex]or[claude]. The commandgit log --grep=codexthen finds every version by Codex, and Claude can answer “when did we change payments?” from the history. - One saved version, one change. In the story from our video, the history had 87 versions described as “fix” and 87 described as “You’re absolutely right!” In a history like that, even Claude can’t find anything.
Bonus
One rules file: an instruction to copy
Give it to Claude or Codex in a project that has both files. Replace the folders with your own:
Read CLAUDE.md and AGENTS.md and show me where they contradict each other. Then merge everything into one AGENTS.md: what the project is, how to run and check it, who may work in which folders (Codex: server/ and db/, Claude: web/), the format for saved versions “type(area): what changed” with [codex] or [claude] at the end, and what’s not allowed. In CLAUDE.md, leave a single line: @AGENTS.md. Don’t decide disputed points yourself; ask me.
Two AIs in one project and no idea who changed what?
In 30 minutes, free of charge, we’ll go through how the AIs work on your project and suggest how to split folders and rules between them.
Everything we offer