Instruction files are guidance you write once and every session reads, such as AGENTS.md, CLAUDE.md or Cursor rules. Notes a harness saves on its own are on the Memories page.
What gets loaded
| Question | Codex CLIchecked at 0.162.1 |
|---|---|
| Which files it reads | Codex reads Fallback names apply only to project directories, not to Fallback entries must be plain file names; entries containing |
| Where it looks, and when nested files load | Global: In an untrusted project Codex skips project AGENTS.md files entirely and keeps only the global file.
Codex reads |
| When several apply, which wins | All applicable files are concatenated: the global file first, then project files from the root down to the working directory, separated by blank lines (with a Instructions you type in the prompt, and |
| Size limits | Project files share a combined budget of Raise it with Because the root file is read first, an oversized root file can push out deeper, more specific files. Some config docs describe the limit as per file; in 0.162.1 the budget is shared by all project files. |
Writing them
| Question | Codex CLIchecked at 0.162.1 |
|---|---|
| One file for several harnesses | Partly Codex natively reads only
|
| Rules for some paths, or only on request | Partly The only scoping is by directory: put an Files deeper than the working directory are not injected; the model is only told to look for them itself. |
| Include other files | |
| Add instructions from config or flags | Set The older |
| Generate a starter file | Yes:
|
Control
| Question | Codex CLIchecked at 0.162.1 |
|---|---|
| See what loaded, and apply edits | Run When instructions change mid-session, Codex sends the model a note that the new AGENTS.md text replaces the old one. The docs say to restart Codex to pick up changes; there's no reload command. |
| Turn them off or skip some | Partly There's no dedicated flag.
|
| Enforce instructions for an organisation | Yes. Admins set Admins can't lock or block a repository's own AGENTS.md files; the managed text is added alongside them. |
Notes and sources
Codex CLI, 17 sources
- At each level, an override file wins over AGENTS.md and configured fallback names.
- Codex skips empty files and applies a configurable combined-byte limit.
- Instructions are persistent context, not skills and not permission grants.