Codex CLI is a terminal-based coding agent. Before it edits files or runs commands, it builds a working prompt from the user request, the local environment, configured tools, and project instructions such as AGENTS.md.
The useful mental model is parallel to Claude Code and CLAUDE.md. The model still reads code, tests, package files, and command output, but the instruction file is the cheap session-boot briefing. It tells Codex what the repo already decided before the first shell command is run.
A strong AGENTS.md names the project, the relevant commands, safety boundaries, style constraints, review expectations, and any decisions that are not obvious from source code. It should be concise enough for Codex to use and concrete enough for a human reviewer to verify.
Repos with multiple agent tools should decide how AGENTS.md relates to adjacent files. It may be the source of truth, or it may point to a shared policy file. What matters is that Codex does not receive a different set of rules than Claude Code, Cursor, CI, or pre-commit hooks.