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:
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.
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
Have Cursor be writing to a file, in this case, Server.py
Experience a crash
Load chat back, now says “66000 lines removed, 2000 added”
try to go to Server.py
press CMD-Z to undo
the 66000 lines that were removed, are reintroduced
Press Save
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)
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:
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.
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.
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
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:
Open Cursor
Help > Toggle Developer Tools
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.
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}
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.
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.
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.