AGENTS.md not loaded from ancestor directories above repo root
What version of the Codex App are you using (From “About Codex” dialog)?
Codex 桌面版: 26.609.9530.0
What subscription do you have?
deep seek
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
System instructions state that "The contents of the AGENTS.md file at the root of the repo and any directories from the CWD up to the root are included with the developer message." However, AGENTS.md files in ancestor directories between the repo root and the filesystem root are not being injected.
What steps can reproduce the bug?
在 ~/Documents/Codex/AGENTS.md 放置一个 AGENTS.md(不在 repo 根目录,但在 CWD 的祖先路径上)
启动一个 CWD 为 ~/Documents/Codex/2026-06-18/new-chat-2 的对话
检查初始对话上下文中是否包含该 AGENTS.md 的内容
What is the expected behavior?
~/Documents/Codex/AGENTS.md 的内容应出现在开发者消息中
Additional information
根本原因推测: 项目无 git 仓库(projectless chat),harness 未在 repo 边界外遍历 AGENTS.md。
建议修复: 即使无 git repo,也应从 CWD 向上遍历到 writable root 或文件系统根,加载所有符合条件的 AGENTS.md。
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗