Skip to content

gpt-5.1-codex-max made several bad decisions one after another, ending with the deletion of the file #6981

Closed

Description

@guidedways

What version of Codex is running?

0.61.0-alpha.3

What subscription do you have?

Pro

Which model were you using?

gpt-5.1-codex-max ExHigh

What platform is your computer?

macOS

What issue are you seeing?

From the beginning Codex just kept making poor decisions, I had to constantly steer it to do better (in terms of architecture) and in the end when it was nearly there, it deleted the entire file because it felt it had made too many continuous edits one after another.

What steps can reproduce the bug?

Uploaded thread: 019aa00a-7f6b-7aa2-a48f-6de2276df170

What is the expected behavior?

Never, ever, ever, ever, ever, ever, ever delete a file when not asked. Never git checkout (I've instructed clearly in AGENTS.md) - any time codex feels it's working for too long or making too many repeated edits, it ends up giving up and destroying all that hard work.

Additional information

No response

Activity

  1. added
    bug
    on Nov 20, 2025
  2. added
    model-behavior
    on Nov 20, 2025
  3. etraut-openai commented on Nov 20, 2025

    @etraut-openai
    Contributor

    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 make future models more robust and efficient. And thanks for using the /feedback command. That additional information is useful.

  4. AlexanderMorou commented on Dec 4, 2025

    @AlexanderMorou

    I've noticed this occurs a lot more often when the context window hits 44-35%. You'll ask it to make an innocuous edit, and it'll completely delete the file. You stop it and ask it wtf it was doing and all it can do is apologize. Further supporting this might be a context issue, is codex then tries to reconstruct the file only to yield a file several times shorter (654 lines to ~160). Is this related to the automatic compaction, missing in the middle, or some other behavior? It's very, very frustrating and I've had it happen a handful of times already.

    Mine is in v0.63.0, wsl 2.0 on Debian 12. Windows 10.

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

    bugmodel-behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions