Question

Codex or Claude Code for a first project, do they read the same instruction file?

Solved · 78 viewsasked by sam_builds

I've used Claude Code for months with a CLAUDE.md in my repo. A friend switched to Codex and I want to try it on a side project. Do I have to write all my rules again in a different file, or does Codex read CLAUDE.md too?

What I’ve tried

Tried Codex once on the same repo and it did not seem to follow the CLAUDE.md rules, but I only tried one small task.

Comment
Following, I have the same question for Cursor rules. katie_on_cursor

1 answer

Marked as helpful by the asker
leo_prompts

Codex reads AGENTS.md, not CLAUDE.md. So on that small task it never saw your rules at all.

You don't have to write them twice. Move the rules into AGENTS.md and turn CLAUDE.md into a one-liner that points at it:

Read AGENTS.md for the project rules.

Claude Code follows the pointer, Codex reads AGENTS.md directly, and there's one file to keep up to date. A symlink (ln -s AGENTS.md CLAUDE.md) works too, but a pointer is easier to understand for the next person who opens the repo.

A few other tools read AGENTS.md these days as well, so check the docs of whatever you use before writing a third file.

Comment
Did the pointer file. Codex picked up the rules on the first task and asked before touching the bookings table, which is rule number one in there. sam_builds
Cursor picked up the AGENTS.md in my repo too. One file for everything, finally. katie_on_cursor