Describe the Bug
A clear and concise description of what the bug is.
Everytime I close cursor I get a pair of errors. ERRO Failed to create file handle: The process cannot access the file because it is being used by another process. \AppData\Local\Programs\cursor\resources\app\resources\helpers\node.exe" (attempt 1-16). Only happens when I close cursor, otherwise it works fine.
Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!
… Open cursor and leave it running for a couple of miunutes.
… Close Cursor
… Errors popup after a minute or two.
Expected Behavior
What is meant to happen here that isn’t working correctly? No Errors
Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)
For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…) Auto
For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…
Additional Information
Add any other context about the problem here.
For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)
For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…
Additional Information
Add any other context about the problem here.
Does this stop you from using Cursor?
Yes - Cursor is unusable
Sometimes - I can sometimes use Cursor
No - Cursor works, but with this issue
The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!
Hey, thanks for the report. It looks like when Cursor closes, one of the background processes doesn’t release node.exe in time, and the system can’t create a file handle because the file is still locked.
A couple questions so we can narrow it down:
Can you share a screenshot of the errors? You mentioned “a pair of errors”, I’m curious if they’re identical or different.
Are you using any MCP servers in Cursor?
Do you have an antivirus installed like Bitdefender or Kaspersky? Some of them can keep a lock on executable files.
As a workaround, you can try:
Open Task Manager after closing Cursor and check if node.exe or cursor.exe processes are still running. If they are, end them manually.
Try running Cursor as admin, then close it and see if the error still happens.
Let me know if the screenshots help clarify what’s going on.
I can see the CodeSetup-stable-2.6.22.exe and .tmp processes in your screenshot. Those are the auto-updater. You’re on 2.6.21, and it looks like 2.6.22 is trying to install in the background. The error is likely happening because the updater is trying to replace node.exe while Cursor hasn’t fully released it yet.
A few things to try:
Let the update finish first. Restart Cursor and let it update to 2.6.22 via Help > Check for Updates. Once you’re on the latest version, see if the error still happens when you close it.
Add a McAfee exclusion for the Cursor install folder %LOCALAPPDATA%\Programs\cursor. McAfee can hold file locks on executables, which can make the shutdown race condition worse.
Can you also share screenshots of the actual error dialogs? You mentioned “a pair of errors” and referenced screenshots, but I only see the Task Manager screenshot. Seeing the exact error messages will help narrow this down.
Let me know how it goes after updating and adding the exclusion.
Let the update finish first. Restart Cursor and let it update to 2.6.22 via Help > Check for Updates. Once you’re on the latest version, see if the error still happens when you close it.
I opened Cursor and hit the Check for Updates button.
Didn’t really see anything happening, but let it sit for a while.
Checked the Help Menu again later and instead of Check for Updates it now said Restart to Update.
Clicked on that – cursor closed and the install dialog popped up.
After a while I got the same errors as before.
Went to Cursor downloads via browser and manually downloaded the installer for 2.6.22 and installed.
Problem no longer occurs now.
So seems to be a problem with that update process.