AGENTS.md is loaded but not reliably followed in the unified desktop experience

Open 💬 1 comment Opened Jul 19, 2026 by pchalamet

What version of Codex is running?

Observed in the unified ChatGPT/Codex desktop experience with local runtime versions:

  • 0.144.2
  • 0.145.0-alpha.18

The affected sessions used gpt-5.6-sol with medium reasoning on macOS.

What happened?

Repository-level AGENTS.md files are still discovered and loaded, but their instructions are no longer followed reliably.

This is specifically not an AGENTS.md discovery problem. Inspection of local session rollout records confirms that:

  • the task working directory is the correct Git repository;
  • the file is located at the Git root;
  • there is no competing AGENTS.override.md;
  • the files are non-empty and well below the default 32 KiB combined limit;
  • the complete file appears in the initial task context under # AGENTS.md instructions for ....

Despite that, applicable and explicit rules are intermittently omitted until the user says something like “read AGENTS.md” and repeats the requirement. After the reminder, Codex generally complies.

The behavior became noticeably unreliable after moving to the unified ChatGPT/Codex desktop experience around the July 2026 rollout. Newer task records contain a substantially larger instruction/context stack, with repository guidance embedded in a combined user-context block after several developer instruction blocks. That prompt-layout change may or may not be causal; the verified regression is that loaded repository instructions are not applied consistently.

Steps to reproduce

  1. At the root of a Git repository, create a non-empty AGENTS.md containing clear completion requirements, for example:
  • update an Unreleased changelog entry for applicable changes;
  • run a named validation command;
  • follow a specific repository organization rule.
  1. Start a fresh task in that repository using the unified desktop app.
  2. Request an implementation without repeating the AGENTS.md rules in the task prompt.
  3. Let Codex complete the change.
  4. Inspect the resulting diff, validation performed, and local rollout record.
  5. Confirm that the rollout contains the complete automatically injected AGENTS.md.
  6. If a rule was omitted, tell Codex to read AGENTS.md; it will often then identify and perform the missing work.
  7. Repeat across fresh tasks. The failure is intermittent but frequent enough that durable repository guidance cannot be trusted.

Expected behavior

Applicable AGENTS.md instructions should be treated as binding repository policy throughout the task, including during final verification. Users should not need to repeat those instructions in every prompt.

If a later direct user instruction conflicts with AGENTS.md, the later instruction can take precedence, but absent such a conflict the repository policy should be followed consistently.

Actual behavior

The file is present in context, but rules can be silently omitted. The task may be declared complete without satisfying required changelog, validation, documentation, or repository-organization steps.

Explicitly reminding Codex to read the already-loaded file often fixes the omission, which further indicates an adherence/salience failure rather than file discovery failure.

Investigation performed

I audited local task metadata and rollout records across multiple repositories, without relying on model recollection:

  • verified Git roots and task working directories;
  • verified file placement, size, and lack of overrides;
  • verified the full AGENTS.md text was automatically injected;
  • compared task behavior before and after the unified-app transition;
  • found repeated post-transition user reminders to read the already-injected file;
  • also found occasional successful compliance, so the problem is intermittent rather than total loading failure.

No repository names, paths, source code, or proprietary instruction contents are included in this report.

Consequences

This undermines the main purpose of AGENTS.md as durable repository guidance:

  • users must manually repeat policy in ordinary task prompts;
  • required validation can be skipped;
  • changelog and documentation requirements can be missed;
  • repository structure and engineering conventions can be violated;
  • CI may fail only after the work is committed or pushed;
  • the final response can incorrectly claim completion;
  • trust in unattended or long-running Codex tasks is significantly reduced.

A policy file that is loaded but only intermittently obeyed is operationally equivalent to an unreliable policy mechanism.

Suggested resolution

  • Preserve repository guidance as a dedicated, high-salience instruction layer rather than burying it in a large combined context block.
  • Add a deterministic pre-final compliance pass against applicable AGENTS.md requirements.
  • Keep the instruction chain available across compaction, continuations, and subagent handoffs.
  • Expose which instruction files were loaded and whether their requirements were checked.
  • Add regression tests using large unified-app prompt stacks where repository instructions impose explicit completion gates.

View original on GitHub ↗

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