Can't connect to WSL anymore

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Failed to patch code.sh launcher: Error: ENOENT: no such file or directory, open ‘c:\Users\ross\AppData\Local\Programs\cursor\resources\app\bin\code

2026-03-05 19:27:56.936 [info] Resolving wsl remote authority ‘wsl+Ubuntu-24.04’ (attempt #1)
2026-03-05 19:27:56.936 [info] Installing cursor-server with options: {“id”:“922f895e2dae836f07d8b507”,“commit”:“1917e900a0c4b0111dc7975777cfff60853059d0”,“line”:“production”,“realCommit”:“1917e900a0c4b0111dc7975777cfff60853059d3”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:true,“killRunningServers”:false,“host”:“127.0.0.1”}
2026-03-05 19:27:56.936 [error] Failed to patch code.sh launcher: Error: ENOENT: no such file or directory, open ‘c:\Users\ross\AppData\Local\Programs\cursor\resources\app\bin\code’
2026-03-05 19:27:57.547 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2026-03-05 19:27:59.467 [info] [wsl exec: installServerScript][stderr]: 2026-03-05 17:27:59 URL:``https://downloads.cursor.com/production/1917e900a0c4b0111dc7975777cfff60853059d3/linux/x64/cursor-reh-linux-x64.tar.gz`` [93178257/93178257] → “/tmp/tmp.Kydpd2u09q” [1]
2026-03-05 19:28:04.508 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2026-03-05 19:28:07.123 [error] Failed to connect to Cursor server from Windows, attempt 3 of 3 fetch failed
2026-03-05 19:28:07.130 [error] Error installing Cursor server Failed to connect to Cursor server from Windows. Please try rebooting WSL by running “wsl -d Ubuntu-24.04 --shutdown” and then reconnect.

Steps to Reproduce

click connect to wsl

Operating System

Windows 10/11

Version Information

Version: 2.6.12 (user setup)
VSCode Version: 1.105.1
Commit: 1917e900a0c4b0111dc7975777cfff60853059d0
Date: 2026-03-04T21:41:18.914Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. There are two errors in your logs. Let me break them down.

The main one is Failed to patch code.sh launcher: ENOENT. The file resources\app\bin\code is missing from your Cursor install. This is likely causing the second error too, failing to connect to the server from Windows.

Try these steps in order:

  • Check if the file actually exists. Go to C:\Users\ross\AppData\Local\Programs\cursor\resources\app\bin\ and see what’s in there.
  • Inside WSL, remove the Cursor server cache: rm -rf ~/.cursor-server
  • In PowerShell, run wsl --shutdown, then try reconnecting from Cursor.
  • If the bin\code file is indeed missing, try a clean reinstall of Cursor. Uninstall, delete the C:\Users\ross\AppData\Local\Programs\cursor folder, then reinstall.

A couple of questions:

  • Was this working before the 2.6.12 update, or is this a fresh install?
  • Can you list what files are in the resources\app\bin\ folder?

This will help figure out whether 2.6.12 shipped without that file or if the install got corrupted.

I already did all of that, and reinstall curser. that created files in another place but there no code.exe

Ok, if the file is still missing after a full reinstall, that’s important. A couple of questions:

  1. You wrote “created files in another place”. What exact path is that? Can you share the full path where Cursor is installed now?
  2. Go to the resources\app\bin\ folder in the Cursor install directory and send a screenshot of what’s inside (or a file list).
  3. What antivirus are you using? Windows Defender or a third-party one? Check its logs or quarantine. Sometimes antivirus removes code.exe or code.sh as a suspicious file.

One more thing to try: download the installer again from https://cursor.com, temporarily disable your antivirus, and install. If the file shows up, it means the antivirus was deleting it.

Let me know what you find.

Hi. This is also an issue for me. Exactly the same error message, and neither code.exe or code.sh is available in that directory.

I’ve tried re-installing Cursor from scratch and downgrading the WSL plugin to no avail.

[Info - 03:35:05.80] Resolving wsl remote authority ‘wsl+Ubuntu-24.04’ (attemp #1)

[Trace - 03:35:05.82] Installing cursor-server with options: {“id”:“1c59163a36eb33718d46bb40”,“commit”:“c6285feaba0ad62603f7c22e72f0a170dc8415a0”,“line”:“production”,“extensionIds”:[],“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“cleanInstall”:false}

[Trace - 03:35:05.257] WSL stderr: w�s�l�:� ��hKm0R �l�o�c�a�l�h�o�s�t� ��NtM�n �FO*g\��P0R �W�S�L�0N�A�T� �!j_ N�v �W�S�L� �

N/ec �l�o�c�a�l�h�o�s�t� ��Nt0

[Trace - 03:35:05.263] WSL stdout: Server script already installed in /home/jxwang/.cursor-server/bin/c6285feaba0ad62603f7c22e72f0a170dc8415a0/bin/cursor-server

[Trace - 03:35:05.266] WSL stderr: your 131072x1 screen size is bogus. expect trouble

[Trace - 03:35:05.269] WSL stdout: Checking to see if should kill running procs: SERVER_RUNNING_PROCESS= 945 /home/jxwang/.cursor-server/bin/c6285feaba0ad62603f7c22e72f0a170dc8415a0/node /home/jxwang/.cursor-server/bin/c6285feaba0ad62603f7c22e72f0a170dc8415a0/out/server-main.js --start-server --host=127.0.0.1 --port=0 --connection-token-file /home/jxwang/.cursor-server/.c6285feaba0ad62603f7c22e72f0a170dc8415a0.token --telemetry-level off --use-host-proxy --disable-websocket-compression --without-browser-env-var --accept-server-license-terms

[Trace - 03:35:05.270] WSL stdout: Server script is already running /home/jxwang/.cursor-server/bin/c6285feaba0ad62603f7c22e72f0a170dc8415a0/bin/cursor-server: 945 /home/jxwang/.cursor-server/bin/c6285feaba0ad62603f7c22e72f0a170dc8415a0/node /home/jxwang/.cursor-server/bin/c6285feaba0ad62603f7c22e72f0a170dc8415a0/out/server-main.js --start-server --host=127.0.0.1 --port=0 --connection-token-file /home/jxwang/.cursor-server/.c6285feaba0ad62603f7c22e72f0a170dc8415a0.token --telemetry-level off --use-host-proxy --disable-websocket-compression --without-browser-env-var --accept-server-license-terms

[Trace - 03:35:05.276] WSL stdout: Listening on 45213

1c59163a36eb33718d46bb40: start

exitCode==0==

listeningOn==45213==

connectionToken==6919f96d-0318-459c-9580-7be253df536a==

osReleaseId==ubuntu==

arch==x86_64==

platform==Linux==

tmpDir==/run/user/1000/==

1c59163a36eb33718d46bb40: end

[Error - 03:35:07.389] Failed to connect to Cursor server from Windows, attempt 3 of 3

v: request to http://127.0.0.1:45213/version failed, reason: connect ECONNREFUSED 127.0.0.1:45213

at ClientRequest.<anonymous> (c:\\Users\\jiaxu4.wang\\.cursor\\extensions\\anysphere.remote-wsl-0.0.8\\dist\\main.js:2:89833)

at ClientRequest.emit (node:events:519:28)

at emitErrorEvent (node:\_http_client:108:11)

at Socket.socketErrorListener (node:\_http_client:575:5)

at Socket.emit (node:events:519:28)

at emitErrorNT (node:internal/streams/destroy:170:8)

at emitErrorCloseNT (node:internal/streams/destroy:129:3)

at process.processTicksAndRejections (node:internal/process/task_queues:89:21)

[Error - 03:35:07.389] Error installing Cursor server

Error: Failed to connect to Cursor server from Windows. Please try rebooting WSL by running “wsl -d Ubuntu-24.04 --shutdown” and then reconnect.

at c:\\Users\\jiaxu4.wang\\.cursor\\extensions\\anysphere.remote-wsl-0.0.8\\dist\\main.js:2:106956

at process.processTicksAndRejections (node:internal/process/task_queues:103:5)

I use 0.08 remote wsl and fail to connect

Hey @razor7788, I can see your case is a bit different from the OP’s. From the logs, cursor-server starts fine and listens on port 45213, but Windows can’t reach it (ECONNREFUSED 127.0.0.1:45213). This is a common WSL networking issue.

A few things to check:

  1. Open C:\Users\<username>\.wslconfig and see if it has networkingMode=mirrored. If it does, try temporarily commenting that line out and restart WSL with wsl --shutdown.

  2. If you need mirrored networking, add this to Cursor settings via Ctrl+Shift+P > Preferences: Open Settings (JSON):

    "remote.WSL.serverListenAddress": "0.0.0.0"
    
  3. Also try:

    • In WSL: rm -rf ~/.cursor-server
    • In PowerShell: wsl --shutdown
    • Reconnect from Cursor

Can you share your Cursor version and the contents of .wslconfig? That’ll help narrow down the exact cause.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Upon updating Cursor this morning and reopening my project via WSL: Ubuntu, I get “The editor could not be opened due to an unexpected error. Please consult the log for more details.”
Also, I noticed the WSL extension has been updated today, could be related?

In Remote - WSL logs, is the following:
2026-04-14 10:14:03.253 [error] Failed to patch code.sh launcher: Error: ENOENT: no such file or directory, open ‘c:\Users\user\AppData\Local\Programs\cursor\resources\app\bin\code’
2026-04-14 10:14:16.860 [error] Failed to patch code.sh launcher: Error: ENOENT: no such file or directory, open ‘c:\Users\user\AppData\Local\Programs\cursor\resources\app\bin\code’
2026-04-14 10:14:16.921 [info] Resolving wsl remote authority ‘wsl+ubuntu’ (attempt #1)
2026-04-14 10:14:16.938 [info] Installing cursor-server with options: {“id”:“f8cbd6fc47c57be2c27f1133”,“commit”:“dacbe9b31599a253763e4910eb6ab38704653320”,“line”:“production”,“realCommit”:“dacbe9b31599a253763e4910eb6ab3870465332c”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:true,“killRunningServers”:false,“host”:“127.0.0.1”}
2026-04-14 10:14:17.132 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2026-04-14 10:14:19.789 [info] [wsl exec: installServerScript][stderr]: 2026-04-14 10:14:19 URL:https://downloads.cursor.com/production/dacbe9b31599a253763e4910eb6ab3870465332c/linux/x64/cursor-reh-linux-x64.tar.gz [104151084/104151084] → “/tmp/tmp.fYgyXNBLEE” [1]
2026-04-14 10:14:24.944 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2026-04-14 10:14:24.964 [info] [wsl exec: installServerScript][stderr]: ++ ‘[’ ‘!’ -d /home/user//bin/ ‘]’
2026-04-14 10:14:24.964 [info] [wsl exec: installServerScript][stderr]: ++ ‘[’ ‘!’ -d /home/user//bin_commit ‘]’
2026-04-14 10:14:24.964 [info] [wsl exec: installServerScript][stderr]: ++ set -e
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: ++ fix_download
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: ++ case “$QUALITY” in
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: ++ echo 'unknown quality: ’
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: unknown quality:
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: ++ return 1
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: + release_lock
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: + lockfile=/home/user/.cursor-server/.installation_lock
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: + ‘[’ -n 12235 ‘]’
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: + kill 12235
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: + echo ‘Unlocking /home/user/.cursor-server/.installation_lock’
2026-04-14 10:14:24.965 [info] [wsl exec: installServerScript][stderr]: + rm -f /home/user/.cursor-server/.installation_lock
2026-04-14 10:14:24.969 [info] [wsl exec: installServerScript][stderr]: + ‘[’ -n /home/user/.cursor-server/.installation_lock.target.23025-31102-12206-1776158058 ‘]’
2026-04-14 10:14:24.969 [info] [wsl exec: installServerScript][stderr]: + rm -f /home/user/.cursor-server/.installation_lock.target.23025-31102-12206-1776158058
2026-04-14 10:14:24.971 [info] [wsl exec: installServerScript][stderr]: + rm -f /home/user/.cursor-server/.installation_lock.target
2026-04-14 10:14:25.359 [error] Error installing Cursor server [wsl exec: installServerScript] Command failed with exit code 1: stdout: Killing all running Cursor servers
No running servers found
Killing running servers:
Removing all existing Cursor installations
CURSOR_LOCK_PREEMPT component=remote-wsl reason=forceReinstall lock_file=/home/user/.cursor-server/.installation_lock

Steps to Reproduce

Install latest cursor update.
Attempt to open project via WSL: Ubuntu

Expected Behavior

Should open my project without failing. Currently Cursor is unusable.

Operating System

Windows 10/11

Version Information

Version: 3.1.10 (user setup)
VSCode Version: 1.105.1
Commit: dacbe9b31599a253763e4910eb6ab38704653320
Date: 2026-04-13T11:39:16.806Z
Layout: editor
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.26200

Does this stop you from using Cursor

Yes - Cursor is unusable

After having already cancelled my subscription because of this (this isn’t even the first time Cursor randomly broke WSL support after an upgrade) I found out that the issue seems to be that there are now apparently TWO different WSL extensions. Specifically, Anysphere (Cursor) seem to have released their own WSL extension and installed it as part of an update.

The only reason I found out about this is because I opened the “Agents Window”, closed the permanently stuck loading window and then from there tried to re-open the WSL project which now gave me a small popup notice from anysphere.remote-wsl telling me that it needs to uninstall the other WSL extension (presumably the one from VSCode it used before) and reload the window in order to be enabled.

Clicking on “Uninstall & Reload” solved my problem - for now.

It’s worth noting that nothing else fixed this - even uninstalling didn’t fix it because I didn’t nuke my Cursor settings. I didn’t even get the popup when attempting to reopen projects normally. It only showed up after I had deliberately opened the Agents window and closed all other windows and then attempted to reopen the WSL project.

Hi there,

I also got affected by the issue this morning it seems and I wanted to share how I solved it.

The issue:
Cursor gets stuck at “Opening remote…” and hangs there forever.

Solution as TL;DR:
You likely have 2 conflicting remote WSL extensions (the official from vscode and the one from anysphere / cursor). As your Cursor desktop app is bricked, install the Cursor CLI agent and ask it to reomve the wsl remote extension from vscode to only keep the one from anysphere. Properly shutdown and restart WSL, launch Cursor. Enjoy :tada:

Now for the Cursor team to actually fix the issue (cf @mohitjain ), here are the details of my debugging session:

-–

It seems it cannot connect to WSL2 (which is where my workspace is). I asked Cursor agent to debug it by analyzing the logs and this is what I got:

I just reinstalled Cursor with the latest version from the website.
I tried searching for the WSL remote extension but the extension won’t load:

So I asked Cursor agent to look it up for me and indeed, it found 2 remote WSL extensions:

I asked it to remove the vscode one:

Restarted cursor after that and it “there was progress”. No more “Opening remote…” but still not properly loading:

And with all my currently opened files appearing as “Not saved” (which shouldn’t be :eyes: ):

And when trying to close Cursor, it got stuck here:

After that, I simply restarted wsl from Powershell (wsl.exe shutdown) and restarted Cursor… and it finally started working again.

Hi @thibauld,

Thanks for the incredibly detailed writeup and for sharing the fix. Your debugging session with the logs is spot on.

This confirms what @pluma also found above – the root cause is having two WSL remote extensions installed simultaneously. Cursor ships its own (anysphere.remote-wsl), and if the older Microsoft one (ms-vscode-remote.remote-wsl) is also present, they conflict during initialization, which is what causes the “Opening remote…” hang.

For anyone else hitting this, the fix is:

  1. Remove the Microsoft WSL extension – In Cursor on Windows: Extensions > search “WSL”. If both Remote - WSL (Microsoft) and Cursor’s anysphere.remote-wsl are enabled, disable or uninstall the Microsoft one. If the Extensions UI isn’t loading (as in Thibauld’s case), you can manually delete the ms-vscode-remote.remote-wsl-* folder from C:\Users\<you>\.cursor\extensions\

  2. Fully restart – Quit Cursor completely (ensure no Cursor.exe in Task Manager), then run wsl --shutdown in PowerShell, and relaunch Cursor

  3. Open from inside WSL – In a WSL shell: cd ~/your-project && cursor .

This is a known issue area, and our team is aware. Thanks again for taking the time to document the solution for others.