Cursor failed to connect to WSL

2026-03-25 16:18:48.918 [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-03-25 16:18:48.918 [info] Resolving wsl remote authority ‘wsl+ubuntu’ (attempt #1)
2026-03-25 16:18:48.918 [info] Installing cursor-server with options: {“id”:“0eb54a4a66b39256a0621514”,“commit”:“fea2f546c979a0a4ad1deab23552a43568807590”,“line”:“production”,“realCommit”:“fea2f546c979a0a4ad1deab23552a43568807592”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:false,“killRunningServers”:false,“host”:“127.0.0.1”}
2026-03-25 16:18:51.459 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2026-03-25 16:18:52.100 [info] Successfully connected to Cursor server at http ://127.0.0.1:46151/version from Windows
2026-03-25 16:18:52.100 [info] Returning resolved authority for Cursor server at http :// 127.0.0.1:46151/version from Windows. Returning token: 838bfe4c-e6b1-4403-b9d2-6e8366b5b291
2026-03-25 16:20:08.555 [info] Resolving wsl remote authority ‘wsl+ubuntu’ (attempt #2)
2026-03-25 16:20:08.643 [warning] Failed to reuse existing connection, attempt 1 of 2 fetch failed
2026-03-25 16:20:08.760 [warning] Failed to reuse existing connection, attempt 2 of 2 fetch failed
2026-03-25 16:20:09.331 [info] Installing cursor-server with options: {“id”:“40a2e7fb1d43848dccbf39e6”,“commit”:“fea2f546c979a0a4ad1deab23552a43568807590”,“line”:“production”,“realCommit”:“fea2f546c979a0a4ad1deab23552a43568807592”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:false,“killRunningServers”:false,“host”:“127.0.0.1”}
2026-03-25 16:20:09.794 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2026-03-25 16:20:10.350 [info] Successfully connected to Cursor server at http ://127.0.0.1:45427/version from Windows
2026-03-25 16:20:10.350 [info] Returning resolved authority for Cursor server at http ://127.0.0.1:45427/version from Windows. Returning token: f658d55d-40be-4bd8-aa4d-edf0a641dc18
2026-03-25 16:20:50.248 [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-03-25 16:20:50.249 [info] Resolving wsl remote authority ‘wsl+ubuntu’ (attempt #1)
2026-03-25 16:20:50.249 [info] Installing cursor-server with options: {“id”:“eda30aa1d0ebb756d591df42”,“commit”:“fea2f546c979a0a4ad1deab23552a43568807590”,“line”:“production”,“realCommit”:“fea2f546c979a0a4ad1deab23552a43568807592”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:false,“killRunningServers”:false,“host”:“127.0.0.1”}
2026-03-25 16:20:50.638 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2026-03-25 16:20:50.688 [info] Successfully connected to Cursor server at http:/ /127.0.0.1:45427/version from Windows
2026-03-25 16:20:50.689 [info] Returning resolved authority for Cursor server at http: //127.0.0.1:45427/version from Windows. Returning token: f658d55d-40be-4bd8-aa4d-edf0a641dc18
2026-03-25 16:21:38.539 [info] Resolving wsl remote authority ‘wsl+ubuntu’ (attempt #2)
2026-03-25 16:21:38.543 [warning] Failed to reuse existing connection, attempt 1 of 2 fetch failed
2026-03-25 16:21:38.648 [warning] Failed to reuse existing connection, attempt 2 of 2 fetch failed
2026-03-25 16:21:39.168 [info] Installing cursor-server with options: {“id”:“4d208652feb0028d9888c002”,“commit”:“fea2f546c979a0a4ad1deab23552a43568807590”,“line”:“production”,“realCommit”:“fea2f546c979a0a4ad1deab23552a43568807592”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:false,“killRunningServers”:false,“host”:“127.0.0.1”}
2026-03-25 16:21:39.591 [error] Error installing Cursor server [wsl exec: installServerScript] Command failed with exit code 4294967295: stdout: 災難性的失敗
錯誤碼: Wsl/Service/E_UNEXPECTED

2026-03-25 16:23:34.539 [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-03-25 16:23:34.539 [info] Resolving wsl remote authority ‘wsl+ubuntu’ (attempt #1)
2026-03-25 16:23:34.539 [info] Installing cursor-server with options: {“id”:“0f5dfc62f4bb6f094b2a52fb”,“commit”:“fea2f546c979a0a4ad1deab23552a43568807590”,“line”:“production”,“realCommit”:“fea2f546c979a0a4ad1deab23552a43568807592”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:true,“killRunningServers”:false,“host”:“127.0.0.1”}
2026-03-25 16:23:39.304 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2026-03-25 16:23:45.729 [info] [wsl exec: installServerScript][stderr]: 2026-03-25 16:23:45 URL:http s://downloads.cursor.com/production/fea2f546c979a0a4ad1deab23552a43568807592/linux/x64/cursor-reh-linux-x64.tar.gz [93258149/93258149] → “/tmp/tmp.VH7Pp6ZZoz” [1]
2026-03-25 16:23:47.734 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2026-03-25 16:23:48.283 [info] Successfully connected to Cursor server at http ://127.0.0.1:46477/version from Windows
2026-03-25 16:23:48.283 [info] Returning resolved authority for Cursor server at http ://127.0.0.1:46477/version from Windows. Returning token: 30733ce3-548b-4baa-b11a-a116fd657ae7
2026-03-25 16:35:07.865 [info] Resolving wsl remote authority ‘wsl+ubuntu’ (attempt #2)
2026-03-25 16:35:07.871 [warning] Failed to reuse existing connection, attempt 1 of 2 fetch failed
2026-03-25 16:35:07.988 [warning] Failed to reuse existing connection, attempt 2 of 2 fetch failed
2026-03-25 16:35:08.566 [info] Installing cursor-server with options: {“id”:“f18da9ecdab80e7329b19cd4”,“commit”:“fea2f546c979a0a4ad1deab23552a43568807590”,“line”:“production”,“realCommit”:“fea2f546c979a0a4ad1deab23552a43568807592”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:false,“killRunningServers”:false,“host”:“127.0.0.1”}
2026-03-25 16:36:47.393 [error] Error installing Cursor server [wsl exec: installServerScript] Command failed with exit code 4294967295: stdout: 連線嘗試失敗,因為連線對象有一段時間並未正確回應,或是連線建立失敗,因為連線的主機無法回應。
錯誤碼: Wsl/Service/0x8007274c

Yesterday i accidentally pressed the update on Cursor, after that, the connection started to fail everytime.
What should I do to make it work again?

Have you tried the solutions suggestd in this thread: Can't connect to WSL anymore - #3 by deanrie ?

1 Like

Hi @HC1,

I looked into the errors in your logs. Two separate things are going on:

1. “Failed to patch code.sh launcher” (ENOENT) — This is a known cosmetic error. It does not cause your connection failure. Cursor still connects to WSL successfully even when this appears. You can safely ignore it.

2. The actual connection failure — The Wsl/Service/E_UNEXPECTED and 0x8007274c errors in your logs point to WSL itself becoming unstable, not a Cursor bug. This is usually caused by Windows updates or WSL resource exhaustion.

Quick fix:

  1. Open PowerShell and run wsl --shutdown

  2. Wait a few seconds, then reopen your WSL workspace in Cursor

If that doesn’t resolve it:

  • Check if you have mirrored networking enabled in your .wslconfig file (usually at C:\Users\<username>\.wslconfig). If networkingMode=mirrored is set, try temporarily commenting it out and restarting WSL. We’ve identified that mirrored networking can cause connection timeouts with recent Cursor updates.

  • If you need mirrored networking, try adding this to your Cursor settings (Ctrl+Shift+P > “Preferences: Open Settings (JSON)”):

    “remote.WSL.serverListenAddress”: “0.0.0.0”

To prevent recurrence, you can add resource limits to your .wslconfig:

[wsl2]
memory=8GB
processors=4

A related thread with more context: Cursor won’t connect WSL Ubuntu

Let me know if any of those steps help, or if the issue persists after trying them.

1 Like