OpenAI Codex · tool · fg-0501

Codex ignores AGENTS.md files in folders below the directory it was started from

If you see Rules in packages/api/AGENTS.md are not followed when Codex starts at the repo root, the cause and the fix for OpenAI Codex are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Rules in packages/api/AGENTS.md are not followed when Codex starts at the repo rootEdits to AGENTS.md during a session have no effect until a new session
Cause
Codex builds its instruction chain once per run, walking from the project root down to the current working directory and no further. Files in deeper folders, and edits made after launch, are not read.
Fix
Start Codex in the folder whose rules apply with --cd, keep shared rules in the root AGENTS.md, and restart after changing instructions.
Apply
codex --cd services/payments
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