From the Claude Code and Codex docs, checked on 2026-10-04:
- Claude Code reads CLAUDE.md, at ./CLAUDE.md or ./.claude/CLAUDE.md in the project. It can also read a repository's AGENTS.md files.
- Codex reads AGENTS.md files before it does any work. It starts with ~/.codex/AGENTS.md for your own defaults, then reads AGENTS.md files from the project root down to the folder you're in. Files closer to you override earlier guidance.
- Keep it short and specific. The Claude Code memory docs say the more specific and concise your instructions, the more consistently Claude follows them.
- What goes in: the exact build and test commands, a short list of don'ts, and where things live in the repo.