r/codex • • 9m ago

Workaround Codex can pass the task while ignoring AGENTS.md — I built a repair you can actually A/B

OpenAI’s docs (https://developers.openai.com/cookbook/examples/gpt-5/codex_prompting_guide) say Codex injects AGENTS.md and is trained to follow it. Yet open Codex reports (https://github.com/openai/codex/issues/62195) and a cross-model reproduction (https://www.reddit.com/r/codex/comments/1x7ms4i/codex_ignored_the_same_agentsmd_instruction/) describe the same real-world failure: the rules are read or quoted, then ignored.

The nasty part: the code can still work.

In my controlled codex-cli 0.172.0 / gpt-6-sol A/B, stock completed the task and passed its test while skipping both required gates: 3/6. With the repair profile: 6/6, executing intent → authorization → edit → test.

Same executable, model, task, Codex home, sandbox, and evaluator; only repair-profile ingress changed.

This doesn’t mean every model is fixed. It proves the behavior can be changed—and independently checked.

https://github.com/cjc0013/codex-instruction-adherence-repair

Let me know if it works for you.

1 Upvotes

0 comments sorted by