I just mistakenly clicked the UNDO ALL button and all my files and code are gone

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I dont understand why there isn’t a confirmation for the UNDO ALL button. I was trying to type something in the chat then i mistakenly clicked the UNDO ALL button and like that I saw all the code of over 70 + file just dissapear.
Ok, i was first panicking then i thought, there will be a redo all button, but guess what there isn’t. Tried ctrl shift z and ctrl y, nothing happened. Tried to check timeline change but most of the files where already deleted. Check online and i saw that you can click restore checkpoint, tried that nothing happened.
Now i have to tell the ai to rebuild the whole plan from scratch using double the tokens.

I dont just understand why sth this simple can actually be this damaging. I mean they could have just added a confirmation box for the undo all to prevent misclick or a redo all to bring them all back.

It feels like it is an issue that can be easily fixed, or maybe it is me that dosent know what i was doing. Because am confused asf now.

Steps to Reproduce

Clicking the UNDO ALL button.

Expected Behavior

I could not restore all the code and files that where undone, which should be possible.

Operating System

Windows 10/11

Version Information

Version: 2.5.20 (user setup)
VSCode Version: 1.105.1
Commit: 511523af765daeb1fa69500ab0df5b6524424610
Date: 2026-02-19T20:41:31.942Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

1 Like

Hey, thanks for the report. Several users have reported the same issue with accidental “Undo All” clicks.

A few things you can try to recover:

  1. Git restore: Run git status in Terminal. If the files show as deleted, try git restore . to bring them back. This only works for files that were previously committed.
  2. Local History or Timeline: Right-click a file in the Explorer, then look for “Timeline” or “Local History”. Cursor keeps snapshots you might be able to restore from.
  3. Checkpoint: If you still see checkpoints in the chat, try the most recent one, not the earliest. If that didn’t work, it might be because the files were newly created by the agent and never committed.

About the confirmation dialog request, the team is aware of this. Multiple users have asked for it. No ETA yet, but your report helps with prioritization.

Let me know if any of the recovery steps work.

For me, the easiest way was to revert back the changes of my last message. I only lost updates of the last message.

Your the goat, this worked for me also!