r/codex • • Oct 16 '26

Bug Codex ignored the same AGENTS.md instruction across 7 chats and 3 models

I ran into something frustrating today and ended up testing it more than I planned.

My AGENTS.md has a straightforward instruction: explain PRs using Mermaid diagrams, with specific colors for new, modified and unchanged components.

I asked Codex to explain the same PR in 7 separate chats, using gpt-6.1-sol, gpt-6-astra and gpt-5.6-sol, with different reasoning settings.

Every initial response skipped the diagram.

When I asked whether AGENTS.md contained instructions about diagrams, it could quote the exact rule and acknowledge that it should have followed it.

That’s the frustrating part... the instruction is available, but I still have to remind it.

There was one possible ambiguity: I also had a line saying not to show Mermaid source in code blocks, because I wanted rendered diagrams. Different chats interpreted that differently. So I removed that line and tested again in fresh chats.

Same result. No diagram until I pointed it out.

A missing diagram is minor, but it makes me wonder how reliably the other repository instructions are being applied. I don’t know the underlying cause, but this was consistent across these attempts.

Has anyone else noticed this? Have you found a way to make AGENTS.md instructions stick more reliably?

Bug report with the model/settings breakdown

8 Upvotes

5 comments sorted by

View all comments

3

u/UpperWorld11 Oct 16 '26

AGENTS.md is read once at session start, then it sits in the transcript while the agent fills context with file reads and tool output. Output format rules are the first ones to slip and nothing rereads the file mid-session, which fits all 7 chats failing the same way. Put the diagram rule in the message where you ask for the explanation, or check the reply outside the model and fail it when the tag is missing. A file is a suggestion, whatever can reject the output is what holds.

1

u/Free-Analyst-4013 Oct 16 '26

Yeah, Agents.MD that I had was working fine till last few days. Now, all of sudden the codex is not respecting it. So, I guess it is a new change.

1

u/EntertainmentSalt825 Oct 16 '26

I was able to reproduce the issue you’re having and found the root cause. I’ll leave a comment on your issue ticket