Cursor 'Window Terminated Unexpectedly' (code 5): Fixes
Cursor says the window terminated unexpectedly (reason: crashed, code: 5)? Steps to rule out memory, disk, extensions and a bad install on Mac.
TroubleshootingUpdated 5 min read
On this page
You open Cursor, work for a few minutes, and the window dies:
The window terminated unexpectedly (reason: 'crashed', code: '5')Often it starts right after an update, and reopening the window crashes again.
Why it happens
We have not found an official explanation or a confirmed single cause. People on Cursor's community forum report constant crashes within minutes of launch after a recent update, so a bad build is one possibility. The message names no file, extension or setting, so the usual suspects below are candidates, not diagnoses:
- A half-finished update. Processes left from the old version can interfere with the new one.
- An extension that crashes the window. This is a common reason for crashes that repeat at the same point.
- Memory pressure or a nearly full disk. Large projects, many tabs and many open chats raise memory use.
- Damaged data in your user's Cursor settings or caches. This is a guess; we cannot verify where Cursor keeps its files.
- A damaged install.
Because nothing in the error points at one of these, the fixes work by elimination: change one thing, then see whether the crash returns.
| Likely cause | Typical symptom | Fix |
|---|---|---|
| Leftover processes after an update | Crash right after updating | Fix 1 |
| Extension | Crash at the same point each time | Fix 2 |
| Memory or disk | Crash after some minutes, or with big projects | Fix 3 |
| Damaged user data | Crash on every launch, even on a small folder | Fix 4 |
| Damaged install | Crash persists in a new user account too | Fix 5 |
Step-by-step fixes
Fix 1: Quit Cursor fully, restart, and update
- Close the crash dialog.
- Press ⌘Q with Cursor in front.
- Open Activity Monitor and search for
Cursor. If Cursor processes are still listed, select only those rows and click the stop button in the toolbar. Choose Quit first; use Force Quit only if they stay. Do not stop processes you do not recognize. - Restart your Mac. This clears anything that survived the update.
- Open Cursor from Applications.
- Open the About window from the Cursor app menu and compare the version with the latest build on Cursor's website. If you are behind, update before trying anything else.
Fix 2: Test with extensions disabled
A crashing extension is the easiest cause to test.
- If you can keep the window open, open the Extensions view and disable all extensions.
- Use Cursor normally for a while.
- If it stays up, re-enable extensions one at a time, using it for a few minutes between each.
- The extension that brings the crash back is your suspect. Update it or leave it off.
If the window dies before you can do this, go to Fix 4.
Fix 3: Rule out memory and disk space
- In Activity Monitor, open the Memory tab and look at Memory Pressure. If it is yellow or red, close other heavy apps and try again.
- Open System Settings > General > Storage and check free space. A nearly full startup disk can make apps crash without a useful message.
- Open a small folder in Cursor instead of your usual project. If the small folder is stable and the large one crashes, project size is a factor.
- Close unused tabs and old chats, and see whether the crash comes later or not at all.
Fix 4: Test in a new macOS user account
This separates "Cursor is broken on this Mac" from "something in my user's Cursor data is broken." It needs an administrator account.
- Open System Settings and search for Users & Groups.
- Add a new user account (macOS asks for an administrator password), then log in to it.
- Install and open Cursor there and use it for a while.
If it is stable in the new account, the cause is in your own user's Cursor data. Ask Cursor support which files to reset, because we cannot verify where Cursor keeps them. If it crashes in the new account too, go to Fix 5.
Fix 5: Reinstall Cursor
- Quit Cursor with ⌘Q.
- Drag Cursor from Applications to the Trash.
- Download the current build from Cursor's website and drag it into Applications.
- Open it. If the crash goes away but returns after the next update, report it with the details below.
Checklist before you contact support
- Cursor fully quit, Mac restarted, Cursor updated to the latest build.
- Tested with all extensions disabled.
- Memory pressure not yellow or red, and free disk space available.
- Tested with a small folder.
- Tested in a new user account.
- Reinstalled from a fresh download.
If nothing works
Contact Cursor support through Cursor's website. Include:
- Your Cursor version and macOS version.
- Whether your Mac has Apple silicon or an Intel chip (Apple menu > About This Mac shows it).
- How long after launch the crash happens and what you were doing.
- The results of the extension test and the new-account test.
- Any crash report from
~/Library/Logs/DiagnosticReports. In Finder, choose Go > Go to Folder…, paste that path, and look for files with Cursor in the name.
Subject: Cursor window crashes: reason 'crashed', code '5'
Cursor version: (version from About)
macOS: (version), Apple silicon / Intel
Error: The window terminated unexpectedly (reason: 'crashed', code: '5')
When: crashes about (N) minutes after launch, usually while (what you were doing)
Tried: full quit and restart, extensions disabled, small project folder,
new macOS user account, clean reinstall
Result: (still crashes / only crashes with extension X)
Crash report from ~/Library/Logs/DiagnosticReports attached.Common questions
Does code 5 mean my Mac is out of memory?
Not necessarily. The code does not say why the window died. Low memory is one candidate, which is why Fix 3 is worth a few minutes.
Will going back to an older version help?
It might if the update is the cause, but we cannot confirm that for any specific build. Ask Cursor support how to get an earlier version, and report the crash either way.
Is my work lost after a crash?
Files saved to disk are normally untouched, but unsaved edits in the crashed window may be gone. Save or commit often while you troubleshoot.
Are "Cannot find package 'vscode'" errors the same problem?
No. Some reports mention that message with extensions, which is an extension failing to load rather than a window crash. If you see both, test the crash with that extension disabled.