project_root_markers not respected in repository root discovery?
What version of Codex CLI is running?
0.105.0-alpha.11
What subscription do you have?
Plus
Which model were you using?
gpt-5.3-codex
What platform is your computer?
Linux 6.17.1-300.fc43.x86_64 x86_64 unknown
What terminal emulator and version are you using (if applicable)?
Ghostty
What issue are you seeing?
project_root_markers = [".git", ".sl"] in $CODEX_HOME/config.toml is not being respected, I think? Repository root AGENTS.md is not discovered when I start codex from a subdirectory.
This prevents users of other source control systems like Sapling from discovering AGENTS.md in the repository root properly, and I suspect it could also affect general code exploration. I need to do some more experimentation around that though.
See this PR for a fix: #12536
What steps can reproduce the bug?
Relatively straightforward to discover from reading the implementation of codex-rs/core/src/project_doc.rs discover_project_doc_paths, it's hardcoding ".git" in a string literal.
You can make a fake ".sl" project just by running "mkdir .sl" in a tmp directory, create some subdirectories, etc:
echo 'project_root_markers = [".git", ".sl"]' >>~/.codex/config.toml
mkdir -p /tmp/monorepo/.sl
mkdir -p /tmp/monorepo/a/b/c/d
echo This is a big monorepo >/tmp/monorepo/AGENTS.md
cd /tmp/monorepo/a/b/c/d
codex exec "/status"
What is the expected behavior?
I would have expected for Agents.md from /status to show ../../../AGENTS.md, but it shows <none>.
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗