OpenAI Codex · tool · fg-0501
Codex ignores AGENTS.md files in folders below the directory it was started from
Rules in packages/api/AGENTS.md are not followed when Codex starts at the repo root
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
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
Affects: Codex CLI, IDE extension, and ChatGPT desktop app, as of 2026-10
Sources
- https://learn.chatgpt.com/docs/agent-configuration/agents-md
- https://github.com/openai/codex/issues/9836
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp