You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gpt-5.1-codex-max made several bad decisions one after another, ending with the deletion of the file #6981
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.
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.
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.
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.
Activity
github-actions commentedon Nov 20, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Checking unexpected file changesstep force resets all unrelated changes elsewhere #6187Powered by Codex Action
etraut-openai commentedon Nov 20, 2025
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
/feedbackcommand. That additional information is useful.AlexanderMorou commentedon Dec 4, 2025
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.