/status incorrectly shows Agents.md: <none> on Windows PowerShell
<img width="637" height="290" alt="Image" src="https://github.com/user-attachments/assets/c9c79a77-f9b7-4903-9d2e-c2fdd1a6d854" />
Notes for Review
- This draft is intentionally sanitized.
- Local usernames, absolute repo names, internal domains, and unrelated project details are omitted.
- Replace placeholder values only if you want to provide more precise evidence when submitting.
Title
/status shows Agents.md: <none> even though root AGENTS.md is injected into session context on Windows PowerShell
Summary
On Windows with PowerShell, Codex CLI shows Agents.md: <none> in /status, even though the repository root AGENTS.md is actually loaded into the session context.
This makes /status misleading: it suggests that AGENTS.md is not active, while session artifacts show that the file was injected into user_instructions.
Environment
- OS: Windows
- Shell: PowerShell
- Workspace type: git repository
AGENTS.mdlocation: repository root- Project trust: trusted
- Running client version observed in logs:
0.118.0
Reproduction Steps
- Put an
AGENTS.mdfile in the repository root. - Start Codex CLI from the repository root in PowerShell.
- Run
/status. - Observe that
/statusshowsAgents.md: <none>.
Expected Behavior
When the repository root AGENTS.md has been loaded, /status should display the active AGENTS.md path instead of <none>.
Actual Behavior
/statusshowsAgents.md: <none>.- However, session data shows that the root
AGENTS.mdwas injected into the model context.
Evidence
The local setup appears valid:
AGENTS.mdis located at the git root.- The current working directory is the repo root.
- The project is marked as trusted.
Session artifacts indicate that AGENTS.md was actually loaded:
- Session records contain a section like
# AGENTS.md instructions for <repo-root>. turn_context.user_instructionscontains the fullAGENTS.mdcontent.
This behavior has been observed in multiple sessions on different dates, not just a single one.
Additional Validation Performed
- Verified that
AGENTS.mdis readable from the repo root. - Verified that the repo root and current working directory match.
- Verified that the project is trusted in local Codex config.
- Converted
AGENTS.mdfrom UTF-8 with BOM to UTF-8 without BOM. - Prepared a minimal standalone git repro repo with only a root
AGENTS.mdand reproduction instructions.
The BOM change did not affect /status; it still showed Agents.md: <none>.
Impact
This is confusing because /status implies that AGENTS.md is not active, while the session context indicates that it is active.
As a result, users cannot reliably use /status to confirm whether repository instructions were applied.
Hypothesis
This appears to be a /status display or state-reporting issue on Windows PowerShell, rather than a failure to discover or inject AGENTS.md.
Optional Sanitized Evidence Snippet
Below is the kind of evidence available locally, with paths intentionally generalized:
session file:
<codex-home>/sessions/<date>/rollout-<id>.jsonl
session content includes:
"# AGENTS.md instructions for <repo-root>"
turn_context includes:
"user_instructions": "<contents of AGENTS.md>"
Minimal Repro Package
I also prepared a minimal reproduction repository with:
- a root
AGENTS.md - a short
README.mddescribing the exact reproduction steps - no unrelated business code
Suggested maintainer verification in the minimal repo:
- Start Codex CLI from the minimal repo root.
- Run
/status. - Ask:
If the repo root AGENTS.md is loaded automatically, say exactly MINIMAL-AGENTS-LOADED.
If both of the following happen at the same time:
/statusshowsAgents.md: <none>- the assistant still says
MINIMAL-AGENTS-LOADED
then the issue is very likely in /status reporting, not in AGENTS discovery/injection.
Suggested Maintainer Checks
- Verify whether
/statusreads from the same source of truth as session instruction injection. - Verify whether Windows PowerShell session initialization skips or loses the active
AGENTS.mddisplay state. - Compare behavior between:
- actual session instruction injection
/statusreporting
What I Can Provide If Needed
- A sanitized screenshot of
/statusshowingAgents.md: <none> - A sanitized excerpt from a session jsonl showing injected
AGENTS.md - A sanitized excerpt from local logs showing the running client version
- A minimal standalone repro repository containing only the files needed to demonstrate the issue
-----
Minimal AGENTS Status Repro
This folder is intended to be used as a minimal git repository for reproducing a Codex CLI issue:
/statusshowsAgents.md: <none>- but the repository root
AGENTS.mdstill appears to be injected into session context
How To Reproduce
- Open a terminal in this directory.
- Run
git initif.gitdoes not already exist. - Start a fresh Codex CLI session from this directory.
- Run
/status. - Ask:
If the repo root AGENTS.md is loaded automatically, say exactly MINIMAL-AGENTS-LOADED.
Expected
/statusshould show the activeAGENTS.mdpath.- If the file is loaded, the assistant should say
MINIMAL-AGENTS-LOADED.
Bug Signal
If both conditions happen at the same time:
/statusshowsAgents.md: <none>- the assistant still says
MINIMAL-AGENTS-LOADED
then the problem is likely in /status reporting rather than AGENTS discovery/injection.
-----
<img width="637" height="290" alt="Image" src="https://github.com/user-attachments/assets/b87a0777-8311-48d1-ba3a-5cc693990b1f" />
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗