Does anyone else experience instability with Cursor and WSL?

I keep having this cycle of problems that seems to becoming more frequent. I start cursor, i have 4 repos I am working across all in the project. All is good for many queries, edits and a few hours and then all of a sudden Cursor gets laggy and crashes. I thought it might be the number or terminals I had open, but I eliminated that with no terminal use, it could be that one of the files I have open is a log file and I use the editor to view the log, and the log is getting cleared, maybe that it could be an undo buffer bug? I don’t know, but whatever it is, it is getting ANAF.

I have had a similar situation. Compared to SSH, WSL doesn’t seem to be as stable. For example, yesterday I experienced repeated crashes that caused the plugins to keep reporting errors, and the issue was only resolved after I reinstalled Cursor.

Hey, thanks for the report. This looks like an extension host issue in WSL.

Quick question: are you using the WSL extension for Cursor? In the bottom-left of the editor it should say WSL: <distro name>. If it doesn’t, the problem is most likely that Cursor is running via Windows instead of the WSL environment.

Fix:

  • Install the WSL extension in Cursor (from the Extensions marketplace)
  • Open a WSL terminal
  • cd into your project directory
  • Run cursor . from there

The WSL extension lets Cursor run extensions directly inside WSL. It’s much faster and more stable, and it helps prevent extension host crashes.

Here’s a thread where this helped another user with the same issue: How to recover from "Extension host terminated unexpectedly 3 times..."?

Let me know if this helps.

Hi Dean, yes I am connecting exactly how you described. I already have WSL installed. Now that you mentioned it, I did remove it, and reinstall it to see if that will help.

I do not open cursor from the WSL project folder as you describe. I normally open cursor from my Windows task bar and open WSL as a recent project. When I try the command you suggested I saw an access error and I didn’t bother to figure out why because opening from Windows seemed to work.

I did try setting these folders to rwx but it didn’t correct it.

Alan

I can see a screenshot with an error on /run/user/1000/. This is a common XDG_RUNTIME_DIR issue in WSL.

A few things to check:

  1. Which WSL distro are you using, and is systemd enabled? Check in your WSL terminal:

    cat /etc/wsl.conf
    

    If systemd is disabled, the /run/user/1000 folder might not be created correctly.

  2. Try creating the directory manually and setting the right permissions:

    sudo mkdir -p /run/user/1000
    sudo chown $(whoami):$(whoami) /run/user/1000
    chmod 700 /run/user/1000
    export XDG_RUNTIME_DIR=/run/user/1000
    
  3. Then try running cursor . again from the WSL terminal.

If that doesn’t help, please share the output of:

  • wsl --version
  • cat /etc/wsl.conf
  • ls -la /run/user/

Hi Dean,

Thanks for the steps. All of those made it work.

So this launches cursor in an ubuntu shell thing, that personally I don’t like too much because it’s usability is worse. I suspect that this is the native ubuntu version. I cannot resize the vertical scroll panel widths and the window sizing with the double title bars is flakey. I prefer the native Windows version and connect from the bottom left. But thanks for the assist.. appreciate the alt advice.

It is not necessary to install Cursor inside the WSL environment; instead, I would recommend using the WSL extension within Cursor installed on the Windows side.

Then, select the Remote Explorer (if it is not visible, you might need to reload the window after installing the extension).

From there, you can select your WSL distribution to open a new window inside that environment.