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

View original on GitHub ↗

6 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #13154
  • #13386
  • #13288
  • #11838
  • #11757

Powered by Codex Action

smurfix · 4 months ago

Not a duplicate (of these, at least)

guidedways contributor · 4 months ago
guidedways contributor · 4 months ago

@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.md for 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 to experimental_instructions_file it's been great so far.

etraut-openai contributor · 4 months ago

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 /feedback command. That additional information is useful.

smurfix · 4 months ago

@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.