Accidentally clicked Undo & all deleted

I accidentally clicked “undo all,” which deleted all project files. They’re still visible in my review along with the code, but I can no longer click “accept all.” Is there any way to restore them?

No guarantee, but check these:

  1. Restore via checkpoint – if you have an visible checkpoints in the agent chat you may be able to restore from there (try the newest one, not the oldest one)
  2. Run git status; if it shows a ton of deleted files then run git restore . (If the deleted files were created by the agent and never committed, git can save them though)
  3. You could try restoring from Cursor’s local history (right click a file in the explorer → Timeline/Local History → restore. If the whole repo is gone this would only work if you can get a folder back, though.
  4. Check your trash, Time Machine, File History snapshots if you have them

Worst case scenario: manually recreate files by copying the content out of the Review diffs you’re seeing

When I click on “Undo All” it is deleting the entire file!!! Not only reverting the proposed changes

WTF??

Note: the files were already accepted before. It was showing the diff of only the last changes/prompt. It should just undo the changes, not delete the file!

Version: 2.4.37
VSCode Version: 1.105.1
Commit: 7b9c34466f5c119e93c3e654bb80fe9306b6cc70
Date: 2026-02-12T23:15:35.107Z
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 22.1.0

Hey there!

This specific bug is fixed in 2.5.

Good, but we cannot use 2.5 because of other bugs…

@Sandro1 @kroggen This has happened to me a lot too. Cursor keeps local file history (snapshots) under:

%APPDATA%\Cursor\User\History\

(on Windows that’s usually C:\Users\AppData\Roaming\Cursor\User\History\)

Each random-looking folder (e.g. 3942dd06) is one tracked file (identified by its full path). Inside that folder you’ll see an entries.json (index: which file it is + list of revisions with timestamps) and one or more snapshot files like AB12.md (the actual saved contents for a revision so you would normally want the latest one indeed).

So let’s say you just pressed undo on your “MyLostFile” file those commands might help :

  1. Select-String -Path “$env:APPDATA\Cursor\User\History\*\entries.json” -Pattern “MyLostFile” -SimpleMatch

Open the matching entries.json, look at the “resource” line to confirm it’s the right file, then pick the revision entry with the latest “timestamp” and note its “id” (e.g. BY8U.md).

  1. Copy that revision file back over your empty/broken file (adjust paths):

Screenshot 2026-04-12 133640

Note: Using screenshot on this since I am having issues pasting it at the time of posting this comment.

Hope it helps.