Failed to create file handle

Where does the bug appear (feature/product)?

  • Cursor IDE

  • Cursor CLI

  • Background Agent (GitHub, Slack, Web, Linear)

  • BugBot

  • Somewhere else…


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!

  1. … Open cursor and leave it running for a couple of miunutes.

  2. … Close Cursor

  3. … 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)


Operating System

  • Windows 10/11

  • MacOS

  • Linux


Version Information

  • For Cursor IDE: Menu → About Cursor → Copy

  • For Cursor CLI: Run agent about in your terminal

Version: 2.6.21 (user setup)
VSCode Version: 1.105.1
Commit: fea2f546c979a0a4ad1deab23552a43568807590
Date: 2026-03-21T22:09:10.098Z
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.19045


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.


Does this stop you from using Cursor?

  • Yes - Cursor is unusable

  • Sometimes - I can sometimes use Cursor

  • No - Cursor works, but with this issue

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the Bug Reports category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

Bug Report Template - Click to expand

Where does the bug appear (feature/product)?

  • Cursor IDE
  • Cursor CLI
  • Background Agent (GitHub, Slack, Web, Linear)
  • BugBot
  • Somewhere else…

Describe the Bug
A clear and concise description of what the bug is.


Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!


Expected Behavior
What is meant to happen here that isn’t working correctly?


Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)


Operating System

  • Windows 10/11
  • MacOS
  • Linux

Version Information

  • For Cursor IDE: Menu → About Cursor → Copy
  • For Cursor CLI: Run agent about in your terminal
IDE:
Version: 2.xx.x
VSCode Version: 1.105.1
Commit: ......

CLI:
CLI Version 2026.01.17-d239e66

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:

  1. Can you share a screenshot of the errors? You mentioned “a pair of errors”, I’m curious if they’re identical or different.
  2. Are you using any MCP servers in Cursor?
  3. 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.

  1. Can you share a screenshot of the errors? You mentioned “a pair of errors”, I’m curious if they’re identical or different.

  2. Are you using any MCP servers in Cursor?

Not using any MCP Servers.

  1. Do you have an antivirus installed like Bitdefender or Kaspersky? Some of them can keep a lock on executable files.

Running McAfee

While running Cursor I see the following processes:

Several Cursor.exe processes (15 or so)

3 Node.exe Processes

After Exiting Cursor I see the following Processes:

I see the 2 CodeSetup processes and the 3 node processes.

Looking at the properties for the Node processes I can see they are being used by my Elgato StreamDeck.

If I stop my StreamDeck – the 3 node processes disappear. Then after exiting Cursor I only see thes 2 setup processes.

(I Still get the Errors shown above in the screen grabs.

Killing the 2 Cursor Setup processes does not help – error still occurs.

Hey, thanks for the detailed follow-up.

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:

  1. 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.

  2. 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.

  3. 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.

I see I sent them before, not sure why they didn’t come through.

Will try the other suggestions.

  1. 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.