Discovery, layering, and the override file
AGENTS.md is to Codex what CLAUDE.md is to Claude Code: a markdown file the agent reads automatically. Same idea, slightly different mechanics. Codex looks for AGENTS.md at every level from the Git root down to your CWD, plus the global ~/.codex/AGENTS.md. Files merge top-down; closer-to-CWD wins on conflicts.
The override file: AGENTS.override.md. When present at any level, it takes priority over the regular AGENTS.md at that level. Use it for temporary global overrides — sprint-specific rules, "this week, only test code," or to disable normal style preferences while running a migration.
project_doc_fallback_filenames in config.toml lets you reuse existing instruction files (TEAM_GUIDE.md, .agents.md, AI_GUIDE.md) instead of renaming. project_doc_max_bytes caps the size — useful when an over-eager teammate dumps the entire wiki into AGENTS.md.