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
Codex Max (medium) deletes whole files without need. Gets confused. Model behavior. #6999
The model at times deletes entire files instead of making localized edits. This behaviour is dangerous and sometimes the model gets lost/confused and has to revert files from git or rebuild the deleted files from previous context. This consumes a lot of tokens and is very slow and dangerous. The model sometimes says "I accidentally deleted the file".
What steps can reproduce the bug?
Is not easy to create initial conditions since depends on many variables. I recommend model observation on real engineering tasks.
What is the expected behavior?
Make several smaller minor edits, instead of attempting to rewrite whole files at once. Likely would save on tokens, the changes are easier to track by a human engineer and less dangerous (if not using git). The model sometimes in front of accidental delete rebuilds from context instead of making a git checkout from head. The git checkout would be the faster and cheaper way to perform the correction in front of that failure (context inspection would be useful to determine if is the proper corrective step).
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 in the CLI. That will provide us with additional details including logs and conversation text.
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 in the CLI. That will provide us with additional details including logs and conversation text.
Activity
github-actions commentedon Nov 20, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered 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. If you see other model behavior that you'd like to report, please use the
/feedbackcommand in the CLI. That will provide us with additional details including logs and conversation text.waldoalvarez00 commentedon Nov 23, 2025
I was able to catch one example where the model did this weird thing, please check it here: https://github.com/openai/codex/issues/new?template=2-bug-report.yml&steps=Uploaded%20thread:%20019aad7b-cb3e-7f40-aed1-72e880e8f022 . After using the trace to correct the problem or improve the model, please delete the trace.
Pritahi commentedon Dec 29, 2025
Hi, I noticed Codex was deleting entire files without need. We provide granular tool permissions (https://mcp-shield.vercel.app) so agents can't overwrite or delete without explicit approval. Would love to chat about securing your agents!