Codex doesn't load AGENTS.md in all the parent directories

Resolved 💬 3 comments Opened Mar 2, 2026 by amit-mittal Closed Mar 2, 2026

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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗