ChatGPT 5.1 Codex does not follow directions in AGENTS.md file.
What version of Codex is running?
codex-cli 0.58.0
What subscription do you have?
Plus
Which model were you using?
gpt-5.1-codex
What platform is your computer?
Linux 6.17.0-6-generic x86_64 unknown
What issue are you seeing?
ChatGPT-5.1-codex does not follow directions in AGENTS.md properly. It ignores steps, directions, implementations to improve its cognitive ability.
I have AGENTS.md describing how to build and maintain a reference database of all code that it adds to the project and all code within the project along with descriptions of what everything actually does, as well as use cases, parameters, referencees, file locations, and a full-featured semantic search / keyword search filtering shell script that allows to query and update said database with ease.
This prevented it from filling up its context window with a thousands of lines of code and taking hours to do so when 90% of the stuff its reading is irrelevant to the prompt request.
The previous version was able to follow instructions and use the database instead of its context window to figure things out... why is it now that it completely ignores my database and shell script??
This is a major bug that is costing me and everyone else more time wasted and more bad code generation.
It actually turned something that used up 75% of the weekly usage time into something that used ~ 5% for the same exact prompt, and the code was many fewer tokens, and with many fewer errors.
What steps can reproduce the bug?
Insert this AGENTS.md and wheel.sh into any project and then ask it to build up the WHEEL.db database with the files from your project. It will automatically create the database (or at least it did) and store all definitions and files in a nice neat database, it will also implement change tracking to eliminate the lack of long term memory on these Agent systems.
Once the database is built, Codex does not use only wheel.sh except when absolutely necessary for lookups and information gathering as well as for writing code that uses existing functions instead of re-inventing the wheel every time.
What is the expected behavior?
The expected (and previous behavior in the version before this one) was using the shelll script to save time and recall what the functions do across many files and have a way to reference what the AI did before so it can quickly understand the code and not spend hours examining the entire project everytime i want to make a small change.
Additional information
I can't believe you guys have not implemented this already.. this is like the low hanging fruit for something like this that should be built-into the thing -- in fact i give you permission to take my two files and hard code them into codex to save us all hours of wasting time re-prompting the same thing in different ways to try and get code that actually works.
Another similar implementation can be cloned from https://github.com/mikeNickaloff/AGENTIC-CODING-FRAMEWORK which has a README explaining why its needed.
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This bug report also contains information about how to solve many other issues that have yet to be addressed.
I also noticed that global instructions aren't followed much in version 5.1, so GPT5 is still more practical for now, although CodeX is faster in version 5.1. However, it seems I haven't delved into deeper considerations.
I was having the same problem. I managed to get him to understand me by emphatically stating it more than once.
So that he would follow and obey the rules of the file.
For me the AGENTS.md are not in the context even for some reason...?
Thanks for the bug report. We'll share the feedback with the team responsible for training our codex models. If you see other model behavior that you'd like to report, please use the
/feedbackcommand. That will provide us with additional details including logs and conversation text.Still occurs on codex 0.80 with gpt 5.2 xhigh model. It has not been resolved yet.
@EraserandRain, this is model behavior. It won't be resolved by a CLI update.