/status shows Agents.md: <none> even when AGENTS.md exists and appears to be loaded
Resolved 💬 7 comments Opened Apr 11, 2026 by yuebozhang Closed Apr 12, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
Summary
/status shows Agents.md: <none> even when AGENTS.md exists and appears to be loaded.
Environment
- Codex CLI
v0.120.0 - macOS
Darwin 25.4.0 arm64 - Model:
gpt-5.4 - Collaboration mode:
Default
Description
In my session, /status consistently showed:
Agents.md: <none>
However:
- The current working directory was a project root containing a root-level
AGENTS.md - I also added another
AGENTS.mdat the workspace root to rule out a workspace-root mismatch - The assistant still appeared to read and follow the project
AGENTS.md
This makes it look like the issue is in the status display logic, or in a mismatch between status path resolution and actual AGENTS loading behavior.
Steps to Reproduce
- Open Codex CLI in a project directory that contains a root-level
AGENTS.md - Confirm the file exists and is readable
- Run
/status - Observe that
Agents.mdis shown as<none>
Observed Behavior
/statusshowsAgents.md: <none>AGENTS.mdexists at the active project root- Another
AGENTS.mdalso exists at the workspace root - The assistant still appears to follow the project instructions
Expected Behavior
- If
AGENTS.mdis found and loaded for the active project or workspace,/statusshould show that file instead of<none> - If
/statusis intentionally checking a different directory than the session cwd, it should clearly indicate which directory it checked
Why This Is Confusing
It is hard to tell whether:
AGENTS.mdwas not discoveredAGENTS.mdwas discovered but not displayed- the status panel is stale
- the status panel is using different path resolution logic than the actual instruction loader
Privacy / Redaction
This report is redacted and does not include:
- private note contents
- tokens or credentials
- identifiable local paths
- repository names unrelated to reproducing the bug
7 Comments
use iCloud syne, ~/Library/Mobile Documents/iCloud~md~obsidian/Documents/y_vault
/Users/y/Library/Mobile\ Documents/iCloud\~md\~obsidian/Documents/y_vault/AGENTS.md
I traced both code paths and believe the status display is consistent with the actual instruction loading — they share the same discovery function.
Analysis
Status display (
tui/src/status/helpers.rs:39):Instruction loading (
core/src/project_doc.rs:89):Both paths call
discover_project_doc_paths()(core/src/project_doc.rs:216) for project-level AGENTS.md discovery. There is no scenario where one succeeds and the other fails — the display logic and the loading logic use the same function with the same config.Likely explanation
The observation that "the assistant still appeared to follow the project AGENTS.md" is probably not caused by the file actually being loaded. Without concrete evidence (e.g., the model quoting specific content from your AGENTS.md, or exhibiting behavior that only your instructions would produce), the model's default behavior can easily appear to align with generic instructions.
Given your iCloud-synced workspace (
~/Library/Mobile Documents/iCloud~md~obsidian/...), one possibility is that the file exists as a cloud-only placeholder and hasn't been materialized locally, causingfs.get_metadata()to not find it. Another is that no project root marker (.git, etc.) was found, though that would still search the cwd and should locate the file if it's present on disk.Suggestion
Could you confirm:
.gitfolder or other project root marker?This would help distinguish between "AGENTS.md isn't being found" (expected
<none>) vs. a genuine display/loading discrepancy.I checked the local state on my side and can add a bit more evidence.
/Users/y/Library/Mobile Documents/iCloud~md~obsidian/Documents/y_vault/.gitAGENTS.mdexists locally and is readable:AGENTS.md | size=2089 | mode=-rw-r--r--ls -l@ AGENTS.mdshows:com.apple.decmpfscom.apple.lastuseddate#PScom.apple.provenanceAGENTS.mdas a normal local markdown file in the vault root, alongside the top-level folders.More importantly, I have a behavioral example that seems hard to explain as “default behavior happened to align”:
My
AGENTS.mdcontains explicit deletion-safety rules, including:00_MOCWhen I asked the agent to delete the entire
00_MOCdirectory, it did not delete it directly. It first recognizedthat this was a top-level directory deletion, listed the exact files that would be removed, and waited for
confirmation before proceeding. I’ve attached a screenshot of that interaction.
So from my side:
.gitroot markerAGENTS.md, not justgeneric assistant behavior
That makes me think there may still be some gap between the current explanation and what is actually happening in my
setup, or there is another code path / cached context / instruction source involved that hasn’t been ruled out yet.
already use agents:
<img width="1221" height="461" alt="Image" src="https://github.com/user-attachments/assets/5b4bef37-e9af-4cbc-890e-d10e8831aee4" />
<img width="1218" height="352" alt="Image" src="https://github.com/user-attachments/assets/92c4947a-cd7e-4e68-b3f2-596b117c18e4" />
<img width="688" height="451" alt="Image" src="https://github.com/user-attachments/assets/b863d9ec-991d-4cac-8369-42c2a8fb9622" />
<img width="792" height="170" alt="Image" src="https://github.com/user-attachments/assets/3e861bd5-ea99-42d1-98cf-e8c3d6edfdf9" />
file is local:
<img width="763" height="414" alt="Image" src="https://github.com/user-attachments/assets/0c0bee61-5c8f-4b98-b607-01659e12ac53" />
show agents none:
<img width="929" height="200" alt="Image" src="https://github.com/user-attachments/assets/865f270f-9d8c-43c4-b77a-af1a2ea3eb01" />
Thanks for the thorough follow-up — the evidence is convincing, and the iCloud placeholder theory doesn't hold up. I dug deeper into the code and have two working theories.
Theory A: Silent error on the iCloud path
The
/statusdisplay spawns an async task that callsdiscover_project_doc_paths. If that function returns anyErr(not just "file not found"), it silently falls back to<none>— the error only goes to the tracing log (chatwidget.rs:7107-7109). On an iCloud-backed filesystem, it's plausible thatdunce::canonicalizeortokio::fs::metadatahits a transient I/O error that gets swallowed here.The problem is that the instruction-loading path (
get_user_instructionsincodex.rs:550) calls the same discovery function, so if it errors there too, the model shouldn't get the instructions either — unless they come from a different source (see Theory B).Theory B: Instructions loaded from the global home, not the project
Codex loads instructions from two independent sources:
~/.codex/AGENTS.md(orAGENTS.override.md) — loaded once at config init intoconfig.user_instructionsdiscover_project_doc_pathsby walking from cwd to the project rootIf you happen to have an
AGENTS.mdin~/.codex/with similar content, the model would follow those instructions while/statuscould still show<none>for project-level docs.Debugging steps
Could you check:
~/.codex/AGENTS.mdor~/.codex/AGENTS.override.mdexist on your machine?realpathreturn for your vault path? (realpath ~/Library/Mobile\ Documents/iCloud\~md\~obsidian/Documents/y_vault)RUST_LOG=codex_core=debug, do you see any warnings like"failed to discover project docs"in the log output?/statusmatch your vault root?This should narrow down whether it's an error-swallowing issue on the iCloud path or a source mismatch.
Thanks for the bug report. This should be addressed by https://github.com/openai/codex/pull/17506, which will be included in the next release.
<img width="1504" height="398" alt="Image" src="https://github.com/user-attachments/assets/ac224bc6-7627-4012-a054-896131981435" />
nice