r/cursor • • 4d ago

Bug Report Cursor memory consumption due to "Enable My Machines" toggle

Recently (after upgrading to 3.32), I discovered that each time I open the Cursor desktop app on my Mac, my Mac starts to swap like crazy. It appears that Cursor starts a Cursor local worker for every repo I worked on, 29-30 in total, and eats up about 7-8 GB RAM for no reason.
This is caused by the app registering a My Machines worker for each repo. It looks like a bug - the switch in the UI cannot be flipped, i.e. you cannot disable it even if you want to.
I discovered that if you set MOLTEN_GLASS_NO_WORKER to 1, i.e. launchctl setenv MOLTEN_GLASS_NO_WORKER 1, this would override the UI value and force the local workers not to start. RAM usage back to normal.
Not sure this affects other OSes, or versions - but it was driving me crazy, so if you are affected - hope this helps. I'm sure it's a bug, and gets fixed soon.

6 Upvotes

6 comments sorted by

•

u/AutoModerator 4d ago

Thanks for reporting an issue. For better visibility and developer follow-up, we recommend using our community Bug Report Template. It helps others understand and reproduce the issue more effectively.

Posts that follow the structure are easier to track and more likely to get helpful responses.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Saver411 4d ago

If the UI toggle is locked, you can usually force it off directly in the underlying configuration JSON file. If it still keeps spawning worker processes for every past project on launch, clearing out the workspace storage cache resets that ghost registry completely.

What stack are you running across all those active repos?

1

u/Guilty_Spray_6035 3d ago

I was unable to find a setting in json, or any other config I could toggle beside the environment variable. Stacks are pretty different. Majority are python, javascript, rust, 1 or 2 zig, shell scripts, ...

1

u/signal_ledger 3d ago

Thanks for tracking this down, the per-repo worker detail is the key part. 29 to 30 workers at roughly 250 MB each lines up with the 7 to 8 GB you are seeing, so it is not one leak, it is one worker per repo adding up.

Two things worth checking if you have not already: first, make sure the env var is set before Cursor launches, not after, because launchctl setenv only affects processes started after it, so a full quit and relaunch, or a restart, is the reliable test. Second, check in Activity Monitor whether the workers stay alive after you close the repo windows. If they do, that is the bug to report, with the version, macOS version, and repo count, since a closed repo should not keep a worker.

On the indexing question, the local indexing and chat in the main window should keep working with the workers off. The workers are for the My Machines background work, so turning them off should mainly affect remote or background tasks, not ordinary local editing. If background indexing does stop, that is worth adding to the bug report, because it would mean the toggle is doing more than its name suggests.

1

u/Wilmari_Iampieri 3d ago

good catch on that env variable. does killing the workers break any of the background indexing or local context features, or does everything else still work normally?