Cursor crashing regularly code 5?

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor has died half a dozen times in the last 48 hours, weirdest thing is it dies after completing a task, when its no longer doing anything. Error message comes up - window closed, I think error 5.

Steps to Reproduce

Random.

Expected Behavior

Not crash.

Operating System

MacOS

Version Information

Version: 3.13.25
VS Code Extension API: 1.128.0
Commit: 31e8d61c448c7472e371505838a0fe34083dad50
Date: 2026-07-28T06:17:45.069Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin x64 25.5.0

For AI issues: which model did you use?

new grok and composer. (not the ai)

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey there!

What you’re describing isn’t intended behavior, and it’s not something on your end.

A few things that helps:

  1. Split long agent work into several shorter chats rather than one long-running conversation. This is the biggest lever: how much conversation state builds up in a single chat is what drives it.
  2. Close or archive agent conversations you’re done with. Everything open in that window shares the same budget, so finished conversations still count against it.
  3. Reload the window before things get bad. Command Palette (Cmd+Shift+P) then “Reload Window”, as soon as it starts feeling sluggish. Once it’s fully wedged, a full quit with Cmd+Q is the only way out.
  4. Clear out old chats. Command Palette then “Delete Old Chats”. It asks for an age cutoff and reclaims the storage those chats were holding. It can sit for a minute or two while it runs, which is expected.

This is an issue we’re tracking and we’ve let the team know. No timeline to share yet, but I’ll post here when there’s an update.

it hasn’t felt sluggish at any point.
and the weird thing is it always crashes after having successfully completed its task. not mid task.

Biggest thing to try: start a fresh chat for the next chunk of work instead of continuing a long one. Closing/archiving finished agent conversations in that window also helps.

And don’t wait for lag - after a big finished task, reload the window from the Command Palette (“Reload Window”), or fully quit with Cmd+Q between sessions.

If it still happens after shorter chats, reply here and I’ll dig further.