Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
I am reporting a severe memory leak that occurs specifically after closing a project window on macOS.
While actively working in a repository, RAM consumption is completely normal. However, when I close the project window (clicking the red ‘X’ on macOS) and leave the app running in the background, the memory usage for that specific closed instance slowly climbs up to exactly ~4.16 GB and stays there permanently.
Since I work with 3-5 different repositories a day, closing them leaves multiple “ghost” processes consuming ~4GB each. This quickly exhausts the physical RAM and forces the system to use heavy Swap Memory.
The Real Impact (Why this is critical): This issue caused such extreme system freezes and lag on both my and my teammate’s machines (M2 Pro 16GB) that we genuinely believed our hardware was no longer sufficient for our workflow. Because of this specific memory leak, we were forced to upgrade and purchase two brand new M4 Pro MacBooks with 24GB of RAM.
Only after spending thousands of dollars on new hardware did we realize that the exact same RAM spiking issue persists on the new machines. Because of these lingering “ghost” processes, I recently caught my macOS Swap Memory usage spiking up to an astonishing 28 GB. This is not just a performance issue; it is severely degrading our SSD lifespans (wear and tear).
Steps to Reproduce
Open any repository in Cursor on macOS.
Observe Activity Monitor (RAM usage is completely normal).
Close the project window using the red ‘X’ on macOS (do not Quit the app entirely with Cmd+Q, just close the window).
Watch the Activity Monitor: The RAM usage for the background process starts climbing slowly until it hits exactly ~4.16 GB and plateaus.
Open and close multiple projects throughout the day to see RAM exhaust completely and Swap memory spike to 20+ GB.
Expected Behavior
When a project window is closed, all child processes (including MCP servers, language servers, and extension hosts tied to that specific window) should receive a SIGTERM and terminate cleanly. The memory should be fully released back to the system immediately, rather than climbing to 4GB and becoming an orphaned ghost process.
Operating System
MacOS
Version Information
Version: 2.6.13
VSCode Version: 1.105.1
Commit: 60faf7b51077ed1df1db718157bbfed740d2e160
Date: 2026-03-06T06:17:49.499Z (3 days ago)
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.2.0
For AI issues: which model did you use?
Composer 1.5, Opus, Gemini
For AI issues: add Request ID with privacy disabled
HARDWARE IMPACT: This issue was so severe that it caused extreme system freezes on both my and my teammate’s machines (M2 Pro 16GB). We actually thought our hardware was bottlenecking and could no longer handle modern development, so we both recently spent a lot of money to upgrade to M4 Pro 24GB MacBooks, only to discover that the exact same RAM spiking issue persists. It is clearly a specific memory leak in Cursor, not a hardware limitation.
I noticed on the forum that other users recently reported issues like “MCP server process leaks consuming 3-5GB”. I suspect my issue is directly related to this. It seems that child processes are becoming orphaned and failing to terminate when a window is closed. Please prioritize investigating this, as it is causing severe SSD wear and tear due to the 28GB swap usage.
Additional Information
I noticed on the forum that your team is aware of similar issues (like “MCP server process leaks” and “RAM not resetting”). I strongly suspect my issue is directly related. It seems that child processes become orphaned and enter an endless loop when a window is closed.
Please prioritize a proper cleanup mechanism for child processes upon window close. This is causing massive frustration, hardware damage risks (28GB swap), and forced unnecessary hardware upgrades for your users.
Does this stop you from using Cursor
Yes - Cursor is unusable