AGENTS.md is a Markdown file in a repository that tells coding agents how to work there. It is an open convention rather than a strict format, and Codex CLI reads it. Claude Code reads CLAUDE.md instead.
What it is for
- Commands to install, build, test and lint.
- A short description of the layout.
- Conventions the code follows.
- Boundaries: what not to edit.
- How to submit work.
Format
There is no required schema. Plain headings and lists work, and the agent reads it as text. Keep it short, because everything in it is read each session.
One file for two tools
If your team uses both Claude Code and Codex, keep the rules in one file and have the other point to it, so the two never drift. The comparison page shows which file each tool reads, checked against the tools’ documentation.
What it cannot do
It holds rules that stay true. It is a poor place for findings, failed attempts and who is working on what. Those change daily and need a status and a source. See what belongs in CLAUDE.md and AGENTS.md.