Session header can show "Agents.md: <none>" even though the workspace AGENTS.md is loaded later

Resolved 💬 2 comments Opened Apr 14, 2026 by ziaahmed812 Closed Apr 14, 2026

What version of Codex CLI is running?

codex-cli 0.120.0

What subscription do you have?

Business

Which model were you using?

gpt-5.4 (via a custom codex-lb OpenAI-compatible local backend)

What platform is your computer?

Linux 6.17.0-20-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

GNOME Terminal 3.52.0 using VTE 0.76.0, on Ubuntu 24.04

What issue are you seeing?

The Codex CLI session header can show Agents.md: <none> even though the workspace AGENTS.md is later loaded and used by the session.

In my case, I started a session in a workspace that did not yet have AGENTS.md. Later, I created AGENTS.md in the workspace root and continued using the same session. The session eventually picked up the AGENTS instructions, but the top session header still kept showing Agents.md: <none>.

So the problem seems to be that the header reflects the session-start state and does not refresh after AGENTS.md becomes available or is reloaded.

Why I think this is a real UI/state mismatch and not user error:

  • the workspace root does contain AGENTS.md
  • the file is valid and is in the correct location
  • the same session later shows the AGENTS content in the loaded instructions/context
  • but the header still says Agents.md: <none>

This is confusing because it makes it look like project instructions are not active when they actually are.

What steps can reproduce the bug?

  1. Start codex in a project/workspace directory that does not yet contain AGENTS.md.
  2. Keep that same Codex session open.
  3. Create a valid AGENTS.md in the workspace root.
  4. Continue using the same session.
  5. Observe that the session can later load/use the AGENTS instructions, but the header still shows Agents.md: <none>.

What I expected:

  • once the session detects and loads the workspace AGENTS.md, the header should update to reflect that, or at least not keep showing <none>

What actually happened:

  • the header continued to show Agents.md: <none>
  • but the session later had the AGENTS instructions loaded in context

Extra note:

  • starting a brand-new Codex session after AGENTS.md exists appears to avoid the problem, so this looks like a stale-session-header issue rather than a failure to detect the file at all.

What is the expected behavior?

If a workspace AGENTS.md becomes available and is loaded into the current session, the session header should reflect that state instead of continuing to show Agents.md: <none>.

At minimum, the UI should avoid showing stale/misleading information. Ideally one of these should happen:

  • the header updates once AGENTS.md is detected and loaded
  • or the header clearly indicates that the value is from session start only
  • or the session requires an explicit refresh/reload and the UI communicates that clearly

The main expectation is that the header should not say Agents.md: <none> while the session is actually using AGENTS instructions.

Additional information

I checked this locally and the behavior appears to be a stale session-header issue, not a failure to detect the file itself.

Relevant details from my local session:

  • The workspace AGENTS.md was created later in the same workspace
  • The file now exists at the workspace root and is valid
  • In the same session, AGENTS instructions later appeared in the loaded session context / user instructions
  • But the top header still showed Agents.md: <none>

So the session eventually had the AGENTS content, but the top metadata/header did not catch up.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗