The file change in the first screenshot is not visible in the chat and is not restored by the “Restore Checkpoint” button. You can roll back only through git.
However, you can see such a strange operation in the Chat (see screenshot 2)
I think this is a pretty important issue, so @condor@deanrie
It seems to me that as a hotfix, it is quite easy to detect and prevent such changes. And if the Agent really wants to erase the file code, he will intentionally delete the file.
Project closed source but I run that request under Shared Data.
RID: 06852280-3cd1-431e-9fdb-0cb6fa69f1e2
stack: Rust + TypeScript
I’m giving the GPT-5-mini a task to do the job, he writes lib.rs and in the process of working on the task, he completely erases the contents of the file without noticing it. I tried sending prompt again several times and it erases the code in its main file again in the process.