Cursor IDE Crashes on macOS 24.3.0 - Research and Potential Solutions

Full disclosure: This post was auto-generated by Claude based on the problems I was experiencing and the research we conducted together. Please take everything below with a grain of salt.

Hi everyone,

I’ve been experiencing persistent crashes with Cursor IDE on macOS 24.3.0, with the error message “The window terminated unexpectedly (reason: ‘crashed’, code: ‘5’)”. These crashes occur 4-5 times per hour regardless of my hardware specs or regular updates.

My Hardware:

  • Mac Studio 2023
  • Apple M4 Max Chip
  • 36 GB Memory
  • macOS Sequoia 15.3.2

I wanted to share my research on this issue (conducted as of March 23, 2025) and see if anyone has found definitive solutions.

The Issue

The specific error:

The window terminated unexpectedly (reason: 'crashed', code: '5')

This happens regardless of:

  • Using SpecStory to manage chat history length
  • Running on high-end hardware
  • Regular updates of the application

Research Findings

After extensive research across Github issues, Cursor forums, and Electron documentation, I found this is a widespread issue affecting many Cursor users on macOS 24.3.0. The problem appears related to:

  1. Memory management issues in Cursor’s Electron framework
  2. GPU acceleration and rendering problems with macOS 24.3.0
  3. Memory leaks during AI operations with large token exchanges
  4. Potential race conditions in UI thread handling

Potential Solutions

I’ve compiled several potential workarounds:

1. Launch Cursor with GPU Flags

The most promising solution appears to be launching Cursor with specific flags to address the GPU/Electron issues:

open -a '/Applications/Cursor.app/Contents/MacOS/Cursor' --args --disable-gpu-compositing

Using --disable-gpu-compositing specifically (rather than completely disabling GPU with --disable-gpu) appears to be the sweet spot - it addresses the compositing issues while maintaining other GPU acceleration benefits.

2. Add Memory Management Flags

Additionally, adding memory management flags might help:

--js-flags="--max-old-space-size=4096"

This limits the JavaScript heap size to 4GB (adjustable based on your system).

3. Combine Both Approaches

For maximum stability, I’m testing launching with both flags:

open -a '/Applications/Cursor.app/Contents/MacOS/Cursor' --args --disable-gpu-compositing --js-flags="--max-old-space-size=4096"

4. Memory Management Practices

I’ve also found these practices helpful:

  • Monitoring memory usage in Activity Monitor
  • Creating periodic summaries of long conversations
  • Maintaining a separate “Project Memory Document” to preserve context between crashes
  • Carefully managing AI token usage

Questions for the Community

  1. Has anyone found a more permanent solution than using launch flags?
  2. Are there specific Cursor settings that help mitigate this issue?
  3. Has the Cursor team acknowledged this as a known issue with macOS 24.3.0?
  4. Has anyone created a custom launcher or automator script to simplify launching with these flags?

I appreciate any insights or additional solutions! This issue is significantly impacting productivity, and I’m hoping we can collectively find better workarounds until a permanent fix is available.

Thanks!

UPDATE: Solution found

After trying several approaches, I’ve found a solution that completely eliminates the crashes. I’ve been using Cursor for hours without a single crash, whereas before I was experiencing 4-5 crashes per hour.

The Working Solution

The fix involves launching Cursor with specific command-line flags that address both the GPU compositing issues and memory management problems. Here’s how to implement it:

  1. Create a simple launch script file named “Launch Cursor.command” with these contents:
#!/bin/bash
open -a '/Applications/Cursor.app/Contents/MacOS/Cursor' --args --disable-gpu-compositing --js-flags="--max-old-space-size=4096"
  1. Make the script executable with this Terminal command:
chmod +x ~/Desktop/"Launch Cursor.command"
  1. From now on, always launch Cursor using this script instead of opening the application directly.

Why This Works

This solution addresses two key issues:

  1. The --disable-gpu-compositing flag specifically targets the problematic GPU compositing feature in Electron (the framework Cursor is built on) while keeping other hardware acceleration benefits. This is more targeted than completely disabling GPU acceleration.

  2. The --js-flags="--max-old-space-size=4096" parameter better manages JavaScript memory allocation, preventing the memory leaks that contribute to crashes.

You must use the script to launch Cursor every time - if you launch Cursor directly, the flags won’t be applied and you’ll likely experience crashes again.

I hope this helps others experiencing the same issue! This seems to be a specific compatibility problem between macOS 24.3.0 and the Electron framework that Cursor uses, which these flags successfully work around.

Same issue, it’s the context size of the chat window.
you have to start a new chat

Performance and crashes should be improved in 0.48.1, which is available under Cursor Settings > Beta > Update Frequency: Early Access