codex - 💡(How to fix) Fix Session header can show "Agents.md: <none>" even though the workspace AGENTS.md is loaded later [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17781Fetched 2026-04-15 06:28:23
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×2closed ×1

Error Message

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

Root Cause

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

RAW_BUFFERClick to expand / collapse

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.

extent analysis

TL;DR

The issue can be worked around by starting a new Codex session after creating the AGENTS.md file, as the stale session header appears to be the cause of the problem.

Guidance

  • Verify that the AGENTS.md file is correctly located in the workspace root and is valid.
  • Try starting a new Codex session after creating the AGENTS.md file to see if the issue is resolved.
  • If the issue persists, check if there are any configuration options or commands to refresh or reload the session header.
  • Consider reporting this as a bug to the Codex CLI developers, as the expected behavior is for the session header to update when the AGENTS.md file becomes available.

Example

No code snippet is provided as this issue appears to be related to the Codex CLI's handling of session state rather than a specific code problem.

Notes

This workaround may not be ideal, as it requires starting a new session, but it should help mitigate the issue. The root cause of the problem seems to be a stale session header that is not updating when the AGENTS.md file becomes available.

Recommendation

Apply workaround: starting a new Codex session after creating the AGENTS.md file, as this appears to resolve the issue. This is recommended because it provides a clear and simple way to avoid the stale session header problem, even if it's not a permanent fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING