Undo suggestion deletes entire file after accepting a created file + one small suggestion

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I accept a file the agent created. The agent then makes one tiny suggestion to that file (e.g. one trailing space). When I click Undo on that suggestion, the entire file is deleted instead of only reverting the tiny change.

Steps to Reproduce

Agent creates a file (e.g. my-prescriptions.js) and I accept it.
Agent makes one small suggestion to that file (e.g. add one trailing space in a comment).
I click Undo on that suggestion.
Result: the whole file is deleted (reverts to “file didn’t exist”).

Expected Behavior

Undo should only revert the last suggestion (e.g. remove the one character). The file and the rest of its contents should stay.

Operating System

MacOS

Version Information

Version: 2.4.27 (Universal)
VSCode Version: 1.105.1
Commit: 4f2b772756b8f609e1354b3063de282ccbe7a690
Date: 2026-01-31T21:24:58.143Z
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 25.2.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Ouch! I can reproduce that. Thanks a lot for reporting that. Bug filed. :folded_hands:

This bug is still happening to me. It’s quite a horrible issue, and it keeps deleting my files if i click undo, Gosh! Could you please fix it and update the cursor, i think it is a very very serious bug.

Version: 2.4.28
VSCode Version: 1.105.1
Commit: f3f5cec40024283013878b50c4f9be4002e0b580
Date: 2026-02-03T00:56:18.293Z
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 25.2.0

Good to know - when the fix will be available for us?