OpenAI Codex · tool · fg-0496

Codex drops later AGENTS.md instructions once project guidance passes 32 KiB

If you see Rules from the AGENTS.md closest to the working directory are missing, the cause and the fix for OpenAI Codex are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Rules from the AGENTS.md closest to the working directory are missingA long root AGENTS.md crowds out folder-specific instructions
Cause
project_doc_max_bytes, 32 KiB by default, caps how much project guidance Codex reads, and Codex stops adding files once the combined size reaches it. Files nearer the working directory come last in the chain, so they are the ones cut.
Fix
Raise project_doc_max_bytes in config.toml, or trim the root file and move detail into nested files.
Apply
# ~/.codex/config.toml project_doc_max_bytes = 65536
Affected
Codex CLI, IDE extension, and ChatGPT desktop app, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun