Skip to content

ChatGPT 5.1 Codex does not follow directions in AGENTS.md file. #6666

Closed

Description

@mikeNickaloff

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.

AGENTS.md
wheel.sh

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.

Activity

  1. added
    bug
    on Nov 14, 2025
  2. added
    CLI
    model-behavior
    on Nov 14, 2025
  3. github-actions commented on Nov 14, 2025

    @github-actions
    Contributor
  4. mikeNickaloff commented on Nov 14, 2025

    @mikeNickaloff
    Author

    This bug report also contains information about how to solve many other issues that have yet to be addressed.

  5. 812913329 commented on Nov 14, 2025

    @812913329

    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.

  6. PauloBoaventura commented on Nov 14, 2025

    @PauloBoaventura

    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.

  7. flazouh commented on Nov 26, 2025

    @flazouh

    For me the AGENTS.md are not in the context even for some reason...?

  8. etraut-openai commented on Dec 1, 2025

    @etraut-openai
    Contributor

    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 /feedback command. That will provide us with additional details including logs and conversation text.

  9. EraserandRain commented on Jan 12, 2026

    @EraserandRain

    Still occurs on codex 0.80 with gpt 5.2 xhigh model. It has not been resolved yet.

  10. etraut-openai commented on Jan 12, 2026

    @etraut-openai
    Contributor

    @EraserandRain, this is model behavior. It won't be resolved by a CLI update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugmodel-behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions