Codex fails to discover and report inherited AGENTS.md instructions from parent directories
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- cli, developer-experience
Research direction
Start with the uploaded reproduction thread 019fd1e8-7007-7092-8f59-7dae8f3655a6 and trace the Codex CLI's AGENTS.md discovery behavior for a working directory and its parent directories. Verify the applicable ancestry files are loaded and accurately reported, including both repository-root and parent-directory instructions.
Written by the indexing model from the issue text.
Description
What version of Codex CLI is running?
codex-cli 0.146.0-alpha.3.1
What subscription do you have?
Plus
Which model were you using?
gpt-5.6-terra low
What platform is your computer?
No response
What terminal emulator and version are you using (if applicable)?
VS Code
Codex doctor report
What issue are you seeing?
Codex did not automatically recognize or report all applicable AGENTS.md files in the working-directory ancestry.
Prompt: “Before I start, what AGENTS.md files do you have loaded?”
Codex replied that only the instructions supplied in the conversation were active, citing a single file path. When asked which AGENTS.md files were active, it again said
it was not referencing parent-repository files unless explicitly provided or discovered.
This was incorrect: the working directory had applicable instruction files at both the repository root and a parent directory. After I challenged the response, Codex
searched the ancestry and found both files, then acknowledged the mistake.
There was no explicit error message—this is a context/instruction-discovery issue. Expected behavior: Codex should automatically discover, load, and accurately report all
applicable AGENTS.md files from the current working directory up to the repository root, including parent-directory instructions.
What steps can reproduce the bug?
Uploaded thread: 019fd1e8-7007-7092-8f59-7dae8f3655a6
What is the expected behavior?
No response
Additional information
No response
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·