Data loss on crash - 68K lines of code truncated to 2K, cannot undo + save

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I was using Cursor, it was writing to a bunch of files from multiple agent prompts.
One of the files was server.py.
Cursor crashed on me (while i was outside of the Cursor app, which is the usual thing where it crashes)
I restarted Cursor
Noticed the file had changed from 68000+ lines of code to 2000 lines of code - the chat was saying “-66000” for removed lines.
i immediately panicked, went to Server.py, which was around 2000 lines of code now, obviously destroyed.
pressed Undo
phew the 68000+ lines of code was back.
but pressing Save, did not allow me to save, because there were newer changes, or something or other.
stumped, i did cmd-a Select All, cmd-C Copy, booted up a non-Cursor text editor, navigated to server.py, and overwrote what was there, saved it, and then continued with a new prompt.

but i really shouldn’t need to be in this predicament, so two things:

  1. Is there anything we can do about making Cursor crash less while on the background - i don’t always have access to three monitors and be able to have Cursor Window 1 on 2nd monitor and Cursor Window 2 on 3rd monitor, “at the top/front” → which seems to result in less crashes.
  2. Is there anything we can do about undo + save, so that i don’t need to chuck a non-Cursor text editor just to get through this eventual data loss.

Steps to Reproduce

  1. Have Cursor be writing to a file, in this case, Server.py
  2. Experience a crash
  3. Load chat back, now says “66000 lines removed, 2000 added”
  4. try to go to Server.py
  5. press CMD-Z to undo
  6. the 66000 lines that were removed, are reintroduced
  7. Press Save
  8. get an error / denied - i.e., can’t save it

Expected Behavior

If I’m undoing a serious dataloss, i shouldn’t need to copypaste the undo’d thing, edit it in a text editor and save on top of the file to get the work back in.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.35
VSCode Version: 1.105.1
Commit: cf8353edc265f5e46b798bfb276861d0bf3bf120
Date: 2026-01-13T07:39:18.564Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the detailed report. This is a serious issue, data loss on crash, plus not being able to save after undo.

On your questions:

  1. Background crashes: The team is actively working on stability. To help with debugging, can you share the crash logs? On macOS: ~/Library/Logs/DiagnosticReports/. Look for Cursor*.ips or Cursor*.crash files after the next crash.

  2. Undo + Save: This is a bug. After a crash, Cursor sees the file on disk as “newer” (even if it’s corrupted) and blocks saving the undo state. Your workaround, copying into another editor, is the right workaround for now.

The data loss issue is already being tracked by the team and they’re working on it. Crash logs will help pinpoint the exact cause of the crash in your case.

1 Like

i’ll have a look at this folder, so far it unfortunately doesn’t have cursor logs.

i guess the detail is that the window/workspace crashes, not the Cursor.app itself. would that mean that there’s no cursor crashlogs then?
are there other places i could look at for more information?

btw, speaking of, today i woke up to “209 lines of text” → “0 lines of text”, and when i looked at the 209 lines of text and asked what had happened, there was a 889 lines of text version waiting to be undo’d into. and there’s no information in any of the agent prompts about “209 → 0” lines change (full destruction), and no information in any of the agent prompts about “889 → 209” simplification (which i’ve not requested at all.

this makes me think it’d be neat if i could view, in the agent sidebar, which files the agents have been messing around with. so like a different view

Can you not recover the lines via timeline feature in vscode?

If it’s the window or workspace that crashes, and not Cursor.app itself, then yeah, there won’t be any system crash logs. For cases like that, we need logs from the Developer Tools.

After the next crash, can you try this:

  1. Open Cursor
  2. Help > Toggle Developer Tools
  3. Console tab, then copy the errors, especially the red ones

About recovery, @liquefy gave the right tip. Try Timeline (Local History). Right click the file in Explorer > Open Timeline, or use Command Palette > Local History: Find Entry to Restore. VS Code and Cursor automatically save local versions of files.

About the second case, 889 → 209 → 0 with nothing showing up in agent prompts, that’s also really important. Can you share the request ID from the chat where it happened? Three dots in the chat > Copy Request ID.

i just had a crash

the three agents i was running were:

9a7c5d76-d4e7-4026-bd9d-88cccf639e72

6e479519-084b-489c-8aab-959fb4cf7158

4be082fb-9605-4d67-a647-9654b5827445

and i was opening a fourth, earlier on (26 days ago) one while they were running → window/workspace crashed.

i hope this helps

edit: now one of them is erroring out with bad request: Request ID: cf80d56c-647f-4ef5-becd-ca2bdfbffd3c
{“error”:“ERROR_BAD_REQUEST”,“details”:{“title”:“Bad request.”,“detail”:“Bad Request”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}

ok this is looking pretty promising:

Screenshot 2026-01-19 at 8.14.20

there should be no instance where it decides to delete 68122 lines and introduce 70664.

5e3e4ae5-a709-4f7a-a094-5ad89e2a7f57

i hope this helps.

i’m a bit worried for the sanity/health of server.py now.

Thanks for the Request IDs, I’ll pass them to the team.

I’m seeing an interesting pattern. You were running 3 agents at the same time, and you opened a 4th chat when the crash happened. Can you reproduce this? Do crashes happen more often when multiple agents are running in parallel?

Also, deleting 68K lines and adding 70K is critical. The team is already working on crash stability and preventing data loss, so these Request IDs will help a lot.

For now, I’d recommend:

  • Use Timeline / Local History to recover
  • Make frequent git commits until a fix is out
  • Try not to run more than 1 to 2 agents at the same time

If you catch any console errors in Developer Tools (Help > Toggle Developer Tools > Console) after the next crash, please send them here.

oh, absolutely, crashes happen way more often when i switch between agent prompts, or have multiple running, and make a new one. or i am away from cursor for a while, return back, and it has crashed.

i love to use cursor with multiple agents running at the same time. it’s really powerful. but the instability / incessant window/workspace crashing, is really killing the joy for me. once that’s ironed out, i’m gonna go completely insane with the agents running at the same time, like i was, before i realized that prompt-switching or new-prompt-opening was causing issues.

it was fine that they crashed, but when i realized that the crashing was going on AND huge dataloss / truncation was going on, that’s when i started being wary and no longer enjoying the process.

glad that -68k +70k is being looked at, it’s really scary to see.

i had two cursor agents going:

73304912-3ba1-4499-9b73-cc4ec637d52d
d84bcd6a-b5ac-4965-b894-289d73afe9ae

in this case, i was busy doing something else with a browser / iMessage - and only returned back when the Cursor icon started bouncing. unfortunately, i already knew it was a crash.

devtools.txt (25.9 KB)

this is what the devtools says. please delete it if it contains stuff that shouldn’t be out in the wild.

@deanrie

workbench_devtools.txt (38.6 KB)

so the details of this are as follows:

i have 4 windows open, all with their own workspaces.

4th window/workspace is doing something

then 2nd workspace crashes for no apparent reason (it was not doing anything).

is it so that i shouldn’t be using multiple windows + multiple workspaces at the same time, until the crash-proneness has been fixed?

17e9bd48-8e7d-4343-9494-d761f24f9182 was the one that wasn’t running, in window2

bf97e992-57f5-4017-9188-f08b8d23470a was running, in window4.

window2 crashed, in fact, twice.

another crash window2 crash. - was working on 697df29a-0797-404d-a1d1-9a32b72289bf in window2, but also on 2ee76922-d779-4146-bb50-da365980763f on window4.

it seems like multi-window-agents is slightly brittle. even if the workspace only has 1 agent running, and another workspace has another agent running.

i had to restart my macbookpro

and cursor, upon booting, immediately crashed.

i think this is probably the motherlode of this bug:

full on destruction on ray-graph + server.py

ff9acab9-7cde-403f-9c41-3a52268e9045

i hope this can be saved and caused to never happen again

i was able to undo all the two files that were botched up, and.. copy-paste them back in outside of cursor and now i’m back to working order, i hope.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.