Windows WSL: WSL Daemon exists with code 0

From one day to another Cursor does not work with “Connect to WSL” (WSL extension) anymore.

I am trying to connect to my Ubuntu distro. Shortly after that this error appears:

As I mentioned it worked the day before yesterday. I tried uninstalling and reinstalling.

Visual Studio Code does work though!

Best
Björn

1 Like

Hey, I think there may be some issues with the cursor-server that is installed on your local machine. We are currently looking at improving the stability of this, but for now, you may find a fix is to delete the ~/.cursor-server/ folder from the remote machine, which lets Cursor reinstall it from scratch!

Let me know if this helps at all.

Unfortunately not. I removed the ~/.cursor-server folder in my Ubuntu WSL distro and restarted Cursor, connecting to it, but the same error as before pops up with no additional information. There has been no new cursor-server folder created.

Hey, what Distro are you running in WSL?
It may be the distro is not compatible with the current cursor-server version.

We have a new update coming soon which comes with a newer cursor-server so it’s possible that update will fix whatever issue is causing it to fail here!

1 Like

Fixed it! There are actually some other threads about it:

Here’s what I did:

  • Opened cursor
  • Opened any local folder to have access to extensions tab
  • Uninstalled WSL extension
  • Restarted cursor
  • Installed WSL extension

After that I could connect to WSL Ubuntu again.

3 Likes

I tried both approaches above, both removing the cursor-server and reinstalling the WSL extension, and I’m still getting the error. To rub salt on the wound, opening with code . still uses cursor, so I had to go and undo that as well.

Are there any estimates as to when cursor will be usable in WSL again?

Are you trying to run Cursor inside WSL, or running Cursor on Windows and connecting to WSL? Running Cursor directly in WSL isn’t supported right now, but running it on Windows and connecting to WSL should work

For the code . issue, you would have been prompted if you wanted Cursor to be installed for code on install. On Windows, you can remove the alias like this:

Running Cursor on Windows and connecting to WSL. Stopped working today for me. I did need to install an older version of the WSL extension to begin with for it to work, but today it stopped working… I thought of reinstalling the extension, but it doesn’t let me uninstall the extension: No remote version installed to resolve wsl.

Edit: :man_shrugging:

Hey, can you show the error when you try to uninstall it? That shouldn’t get stuck!


(Thanks for taking notice, I have not yet had the time to see if there’s anything else I can do, like if reinstalling Cursor would help.)

Looking online, it appears this is a bug that can happen in VSCode too, not just Cursor!
While I don’t have a good suggestion, a reinstall would likely resolve this:

  1. Uninstall Cursor
  2. Delete the .cursor folder in your user directory
  3. Reinstall Cursor
  4. Install the WSL extension fresh

Let me know if either of those help get you back up and running.

@deanrie Do we have any good troubleshooting steps we could try here?

1 Like

Hey, try completely uninstalling Cursor by following this guide:

1 Like

Running into the same issue again. Tried opening via Windows (not WSL directly), reinstalling extensions, reinstalling cursor, etc.
Is a fix for this on the roadmap? The only alternative for me is to remote to a box or to move to another IDE.

Hi I managed to fix this issue after trying multiple approaches here an none of them worked for me. What worked for me was completely uninstalling both VS Code and Cursor from windows as well as going into my file system and removing any reference to cursor that was left behind. Look in these places.

    • Delete the folder at %APPDATA%\Cursor
  • Delete the folder at %USERPROFILE%\.cursor
  • Extensions:
  • Delete the folder at %LOCALAPPDATA%\

I also deleted the ~/.cursor-server folder on my WSL image.

I then reinstalled VS code and checked WSL still worked. After this I then reinstalled cursor. If when you are installing it says cursor folder exists ensure you delete that folder before proceeding. Then when cursor has installed open the WSL connection and it will prompt the reinstallation of cursor-server.

I could then connect fine!

Hope this helps

1 Like

I followed what Acarthew1 said and got mine working :relieved_face: :+1: thanks!

The fix appears to be deleting %USERPROFILE%\.cursor folder. After reinstalling I tried swapping that folder back to my backed up version and it went back to being broken. Maybe there’s some corrupted extensions in there or something.