codex - 💡(How to fix) Fix TUI shows `Agents.md: <none>` even though repo `AGENTS.md` is loaded into prompt [1 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#17510Fetched 2026-04-12 13:27:23
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4closed ×1commented ×1

Code Example

codex debug prompt-input "test"

  Actual behavior:

  - Header says: Agents.md: <none>

  Expected behavior:

  Additional notes:

  - This was not a repo layout problem; the file exists at repo root
  - Session metadata appears to record the repo cwd, but the injected AGENTS.md content shows up as prompt content
    rather than as explicit header metadata
  - This makes the header misleading even though instruction loading is working

  Evidence:

  - codex debug prompt-input "test" output includes content from the Agent.md

### What steps can reproduce the bug?

1. Create a repo with a root `AGENTS.md`
  2. Start Codex in that repo
  3. Observe the header/status panel shows `Agents.md: <none>`
  4. Run:
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

0.120.0`

What subscription do you have?

Azure

Which model were you using?

GPT-5.4

What platform is your computer?

Windows

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

PowerShell

What issue are you seeing?

Environment:

  • Codex CLI: 0.120.0
  • OS: Windows
  • Working repo has root AGENTS.md
  • Repo is trusted in ~/.codex/config.toml

Summary: The TUI header shows Agents.md: <none>, but the repo AGENTS.md is actually being loaded and injected into the model prompt.

Steps to reproduce:

  1. Create a repo with a root AGENTS.md
  2. Start Codex in that repo
  3. Observe the header/status panel shows Agents.md: <none>
  4. Run:
    codex debug prompt-input "test"

Actual behavior:

  • Header says: Agents.md: <none>

Expected behavior:

Additional notes:

  • This was not a repo layout problem; the file exists at repo root
  • Session metadata appears to record the repo cwd, but the injected AGENTS.md content shows up as prompt content rather than as explicit header metadata
  • This makes the header misleading even though instruction loading is working

Evidence:

  • codex debug prompt-input "test" output includes content from the Agent.md

What steps can reproduce the bug?

  1. Create a repo with a root AGENTS.md
  2. Start Codex in that repo
  3. Observe the header/status panel shows Agents.md: <none>
  4. Run:
    codex debug prompt-input "test"

What is the expected behavior?

No response

Additional information

No response

extent analysis

TL;DR

The issue can be mitigated by ensuring the AGENTS.md file is correctly referenced in the Codex configuration, potentially by updating the config.toml file.

Guidance

  • Verify that the AGENTS.md file exists at the root of the repository and that the repository is correctly configured in ~/.codex/config.toml.
  • Check the session metadata to ensure it is recording the correct repository cwd.
  • Run codex debug prompt-input "test" to confirm that the content from AGENTS.md is being injected into the prompt, despite the misleading header.
  • Consider updating the config.toml file to explicitly reference the AGENTS.md file, if possible.

Notes

The exact cause of the issue is unclear, but it appears to be related to how the AGENTS.md file is being loaded and injected into the model prompt. Further investigation into the Codex configuration and session metadata may be necessary to fully resolve the issue.

Recommendation

Apply workaround: The best course of action is to try to mitigate the issue by ensuring the AGENTS.md file is correctly referenced in the Codex configuration, as this may help to resolve the misleading header issue.

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