Crash/auto-close triggers "undo chain diff" reverting all session file changes (data loss)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When Cursor crashes or auto-closes unexpectedly, it executes an “undo chain diff” operation that reverts ALL file changes made during the session. This causes complete data loss of all work done since the last manual Keep All ran. The revert operation is visible in the Timeline panel as an “undo chain diff” entry.

Steps to Reproduce

  1. Open a project in Cursor
  2. Use AI to make multiple file edits (edits are pending, not yet “Keep All”)
  3. Before clicking “Keep All”, Cursor crashes or auto-closes ( maybe laptop shuts down unexcitingly)
  4. Reopen Cursor
  5. All pending file changes are reverted instead of preserved
  6. Check Timeline panel - shows “undo chain diff” entry at the time of crash

Expected Behavior

On crash, pending file changes (not yet “Keep All”) should either:

  1. Be preserved as-is for user to review on relaunch, OR
  2. Be saved to a recovery state

Cursor should NOT execute the undo chain on crash. Pending changes should persist until the user explicitly accepts or rejects them.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.21 (system setup)
VSCode Version: 1.105.1
Commit: 68e0a0385b87408d050869ea543e3778ad53f780
Date: 2026-01-02T23:46:13.381Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.19045

For AI issues: which model did you use?

Claude Opus 4.5 (though this bug is unrelated to AI - it’s a crash recovery issue)

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. This is a serious data loss issue.

To help the team reproduce and fix the bug, we’ll need a bit more info:

  • Crash logs: Next time it crashes, open Help > Toggle Developer Tools > Console and save or copy all error messages (especially the red ones).
  • Steps to reproduce: What exactly triggers the crash? (a specific action, the size of the changes, the number of files in Review)
  • Timeline screenshot: If possible, share the “undo chain diff” entry from the Timeline panel after the crash.

Current workaround: Click “Keep All” more often to reduce the risk of losing changes if it crashes.

I’ll pass this to the team so they can prioritize it.