Version Control / File Management Bug: Incorrectly deletes the file if you reject / "undo" the last suggestion to a file

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

If I “undo” / reject the (last) proposed change on a file it is incorrectly deleting the file. I have been able to reproduce 3 times on both untracked and tracked files.

Steps to Reproduce

Steps to reproduce:

  1. Have a prompt generate a new file or update an existing file
  2. Accept those changes in the review experience
  3. Prompt to edit the same file from (1)
  4. Reject (“undo”) those changes from (3) in the review experience

Expected Behavior

Expected: the file is in the same state from end of steps (1) & (2)
Actual: the file is deleted

Operating System

MacOS

Version Information

Version: 2.4.31 (Universal)
VSCode Version: 1.105.1
Commit: 3578107fdf149b00059ddad37048220e41681000
Date: 2026-02-08T07:42:24.999Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 24.5.0

For AI issues: which model did you use?

I don’t think it is model related but I have been using claude-4.5-sonnet

Does this stop you from using Cursor

No - Cursor works, but with this issue

1 Like

Hey, thanks for the report. This is a known issue. Here’s a big thread where it’s being tracked: Rejecting suggested changes can delete the entire file

I saw your comment there too. Your note that it happens specifically when rejecting the last change in a group is really helpful, and I’ll pass that detail to the team.

The team is aware, but I can’t share an ETA yet. Your report helps with prioritization, especially since this affects both tracked and untracked files.

For now, the safest workaround is to commit to Git more often before accepting or rejecting changes. If the file does get deleted, you can try restoring it via Checkpoints (open the chat where the change happened, find the message before the deletion, then click Restore Checkpoint) or by running git checkout -- <file_name>.

Let me know if there’s anything else you can add.