codex - 💡(How to fix) Fix Bug: ~/.agents/skills loads, but ~/.agents/AGENTS.md is not loaded as user instructions [2 comments, 3 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#17111Fetched 2026-04-09 08:02:14
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1

Root Cause

This is surprising because both live under the same ~/.agents/ user-level directory, so the natural expectation is that if Codex supports one, it should either support the other as well, or clearly document that only skills/ is loaded from that location.

RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

CLI

Describe the bug

~/.agents/skills/ is recognized and usable, but ~/.agents/AGENTS.md does not appear to be loaded automatically as instruction context.

This is surprising because both live under the same ~/.agents/ user-level directory, so the natural expectation is that if Codex supports one, it should either support the other as well, or clearly document that only skills/ is loaded from that location.

In my case, I have rules in ~/.agents/AGENTS.md that are not being followed unless I surface them manually.

For transparency: this issue text was drafted and submitted by Codex, OpenAI's coding agent, on behalf of the user operating this CLI session.

Steps to reproduce

  1. Put a recognizable instruction in ~/.agents/AGENTS.md
  2. Start Codex CLI in a normal session
  3. Ask Codex to perform an action that should obviously reflect that instruction
  4. Observe that the instruction is not applied
  5. Compare this with ~/.agents/skills/, which is recognized from the same ~/.agents/ hierarchy

Expected behavior

One of the following should be true:

  • ~/.agents/AGENTS.md is loaded automatically, consistent with ~/.agents/skills/
  • or Codex clearly documents that ~/.agents/skills/ is supported there but AGENTS.md is not

Actual behavior

~/.agents/skills/ works, but ~/.agents/AGENTS.md does not seem to be loaded as instructions.

Additional context

There are already related issues around global AGENTS handling and visibility, for example:

  • global/centralized AGENTS support
  • /status not showing global AGENTS files

This issue is specifically about the inconsistency of behavior within ~/.agents/.

extent analysis

TL;DR

Check the documentation or configuration for specific instructions on loading ~/.agents/AGENTS.md as it may not be automatically loaded like ~/.agents/skills/.

Guidance

  • Verify if there are any configuration options or flags in the Codex CLI that allow specifying additional instruction files or directories.
  • Review the documentation for any mentions of supported file types or locations for instructions, to understand if ~/.agents/AGENTS.md is expected to work.
  • Consider manually loading or referencing the ~/.agents/AGENTS.md file in your Codex sessions as a temporary workaround.
  • Check if there are any open issues or discussions related to global AGENTS handling that might provide insight into this inconsistency.

Notes

The issue seems to stem from an inconsistency in how Codex handles different files within the ~/.agents/ directory. Without clear documentation or an explicit statement on supported files, it's challenging to provide a definitive fix.

Recommendation

Apply workaround: Manually load or reference the ~/.agents/AGENTS.md file in your Codex sessions until clearer documentation or support for this file type is provided.

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…

FAQ

Expected behavior

One of the following should be true:

  • ~/.agents/AGENTS.md is loaded automatically, consistent with ~/.agents/skills/
  • or Codex clearly documents that ~/.agents/skills/ is supported there but AGENTS.md is not

Still need to ship something?

×6

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

Back to top recommendations

TRENDING