Basic coding quality / AGENTS.md adherence issues
Resolved 💬 6 comments Opened Mar 5, 2026 by smurfix Closed Mar 5, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
codex consistently ignores coding quality constraints in my AGENTS.md. Specifically, no duplicated code!
(And even if that wasn't in there, come on, you simply do not add identical code to the only two subclasses of a common superclass!)
Thread: 019cbab1-3909-75a3-8a2c-a4798b4bd442
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Not a duplicate (of these, at least)
Most likely this: https://github.com/openai/codex/issues/13386
@smurfix you may have better luck with a custom system prompt / developer instructions (see: https://github.com/openai/codex/discussions/7296)
I've been able to steer codex to adhere to constraints in a custom system prompt. I keep
AGENTS.mdfor project specific stuff (which means your AGENTS file can be a handful of lines). I used to have duplicate instructions spread out across AGENTS and never could make codex stop reverting changes in git across multiple ongoing sessions, but once I moved these toexperimental_instructions_fileit's been great so far.Thanks for the bug report. We'll share the feedback with the team responsible for training our codex models. We're tracking this feedback and similar reports so we can improve future models. And thanks for using the
/feedbackcommand. That additional information is useful.@guidedways that may well be. However, codex and/or whichever other agent I use should listen to instructions and avoid anti-patterns, esp. the ones it has been explicitly cautioned against, out of the box. Bespoke system instructions may be necessary for bespoke scenarios — but if you need them for run-of-the-mill bug hunting there's something deeper amiss.