Codex doesn't load AGENTS.md in all the parent directories
What version of Codex CLI is running?
v0.107
What subscription do you have?
Enterprise
Which model were you using?
gpt-5.3-codex
What platform is your computer?
Darwin
What terminal emulator and version are you using (if applicable)?
iTerm2
What issue are you seeing?
Repo structure:
- AGENTS.md
- java/AGENTS.md
- go/AGENTS.md
Now, if codex is invoked from the root of the repo, codex only loads the AGENTS.md present in the root of the repo even if it is working on code present in go folder.
I expect codex to merge both AGENTS.md without having me to invoke codex from go folder since the changes might be in different folders.
What steps can reproduce the bug?
As described above, you can ask it to do any change and it won't be loading AGENTS.md from the sub-folders in the plan mode.
Ran "Summarize the instructions." after the change is done and you won't find any context present in go/AGENTS.md being picked up.
What is the expected behavior?
Codex should automatically load AGENTS.md in all the parent directories while working on a sub-directory even if it was invoked from repo's root.
Additional information
_No response_
3 Comments
This is by design, so we don't consider it a bug.
For a description of how it's intended to work, refer to this documentation.
There is a feature request to dynamically load AGENTS.md during a task based on source files that are accessed. If you'd like to see that feature, please upvote.
Thanks, Eric! That's exactly what I am looking for.
For me it was fixed after switching agent environment from "Windows Subsystem for linux" to "Windows native"