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