/status incorrectly shows Agents.md: <none> on Windows PowerShell

Resolved 💬 1 comment Opened Apr 15, 2026 by jingzhentech-cell Closed Apr 15, 2026

<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.md location: repository root
  • Project trust: trusted
  • Running client version observed in logs: 0.118.0

Reproduction Steps

  1. Put an AGENTS.md file in the repository root.
  2. Start Codex CLI from the repository root in PowerShell.
  3. Run /status.
  4. Observe that /status shows Agents.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

  • /status shows Agents.md: <none>.
  • However, session data shows that the root AGENTS.md was injected into the model context.

Evidence

The local setup appears valid:

  • AGENTS.md is 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_instructions contains the full AGENTS.md content.

This behavior has been observed in multiple sessions on different dates, not just a single one.

Additional Validation Performed

  • Verified that AGENTS.md is 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.md from UTF-8 with BOM to UTF-8 without BOM.
  • Prepared a minimal standalone git repro repo with only a root AGENTS.md and 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.md describing the exact reproduction steps
  • no unrelated business code

Suggested maintainer verification in the minimal repo:

  1. Start Codex CLI from the minimal repo root.
  2. Run /status.
  3. 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:

  • /status shows Agents.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 /status reads from the same source of truth as session instruction injection.
  • Verify whether Windows PowerShell session initialization skips or loses the active AGENTS.md display state.
  • Compare behavior between:
  • actual session instruction injection
  • /status reporting

What I Can Provide If Needed

  • A sanitized screenshot of /status showing Agents.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:

  • /status shows Agents.md: <none>
  • but the repository root AGENTS.md still appears to be injected into session context

How To Reproduce

  1. Open a terminal in this directory.
  2. Run git init if .git does not already exist.
  3. Start a fresh Codex CLI session from this directory.
  4. Run /status.
  5. Ask: If the repo root AGENTS.md is loaded automatically, say exactly MINIMAL-AGENTS-LOADED.

Expected

  • /status should show the active AGENTS.md path.
  • If the file is loaded, the assistant should say MINIMAL-AGENTS-LOADED.

Bug Signal

If both conditions happen at the same time:

  • /status shows Agents.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" />

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗