CODEX deletes entire file on accident. Says '..my mistake.'

Enjoy using CODEX, works most of the time, but …..Um. How does this even happen?
Using Visual Studio Code 1.109.5 and CODEX GPT-5.4, with Visual Studio.

Would figure CODEX might at least make a local temp copy of a file it is working on. Almost lost years of work.

Lesson : Last time I ask CODEX to delete a function in my file. I’ll find it myself next time.

1 Like

When working with AI coding tools, always use source control and commit often :slight_smile:

2 Likes

When working with Codex, either as an extension or with the SDK…Simply Don’t.

The AI with the shell tool can wipe your drive with one “whoopsie-doodle” of output of the wrong token sequence. The Codex application is completely irresponsible.

The only safe way to use coding tools is to strictly allow permission to one designated file at a time in a repo, or a completely abstracted surface of file directories that is sanitized against symlinks, etc, a function that has no possible method of writing outside of its workspace, and not by the AI executing code or having access to a shell. Even a virtual in-memory repo that acts as a canvas in your own application, and which you decide to commit to files with revision control.

1 Like