WSL Randomly Disconnects/Breaks

Describe the Bug

WSL disconnects or has trouble connecting, furthermore it often crashes and then wont start up again. When you let cursor control what distro to open it opens a nonexistent distro that always crashes (ubuntu vs Ubuntu).

Steps to Reproduce

Use WSL with Ubuntu it will eventually crash

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.4.3 (user setup)
VSCode Version: 1.99.3
Commit: e50823e9ded15fddfd743c7122b4724130c25df0
Date: 2025-08-08T17:34:53.060Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

Additional Information

2025-08-12 10:43:14.311 [info] [wsl exec: installServerScript] Running command
2025-08-12 10:43:14.311 [error] Failed to patch code.sh launcher: Error: ENOENT: no such file or directory, open ‘c:\Users\benho\AppData\Local\Programs\cursor\resources\app\bin\code’
2025-08-12 10:43:15.475 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2025-08-12 10:43:15.670 [info] Successfully connected to Cursor server from Windows
2025-08-12 10:43:15.670 [info] Returning resolved authority for Cursor server from Windows. Returning token: 8f4f376f-d9e6-4862-9942-1c358fd89e68
2025-08-12 10:59:50.259 [info] Resolving wsl remote authority ‘wsl+Ubuntu’ (attempt #2)
2025-08-12 10:59:50.474 [info] Successfully connected to Cursor server from Windows
2025-08-12 11:22:55.451 [info] Resolving wsl remote authority ‘wsl+Ubuntu’ (attempt #3)
2025-08-12 11:22:55.482 [warning] Failed to reuse existing connection, attempt 1 of 2 request failed, reason: socket hang up
2025-08-12 11:22:55.597 [warning] Failed to reuse existing connection, attempt 2 of 2 request failed, reason: socket hang up
2025-08-12 11:22:57.843 [info] Installing cursor-server with options: {“id”:“bc6035c56924664ac956a292”,“commit”:“e50823e9ded15fddfd743c7122b4724130c25df0”,“line”:“production”,“realCommit”:“e50823e9ded15fddfd743c7122b4724130c25df8”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:false,“killRunningServers”:false}
2025-08-12 11:22:57.843 [info] Checking output for installServerScript
2025-08-12 11:22:57.843 [info] [wsl exec: installServerScript] Running command
2025-08-12 11:22:59.264 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2025-08-12 11:23:01.512 [info] Successfully connected to Cursor server from Windows
2025-08-12 11:23:01.512 [info] Returning resolved authority for Cursor server from Windows. Returning token: a9e175b5-9acb-4db6-8740-80b3b4f756c0

Does this stop you from using Cursor

Yes - Cursor is unusable

Thanks for reporting this. Please update to the latest version and retest, as several WSL stability improvements were included in recent releases.

Please let us know if this still happens after these steps.

@sanjeed5 I saw their was a update pushed, and it improved slightly but still is unusable and still crashes pretty consistently.

Got it, can you share any additional crash details that would help the team better understand this issue?

Meanwhile, I’ll flag it to the team too.

cc @ravirahman

The biggest thing I have seen in additional to previous issues:

2025-08-20 09:59:38.835 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble

same exact issue here.

fwiw when I check this folder
2025-08-25 12:12:18.925 [error] Failed to patch code.sh launcher: Error: ENOENT: no such file or directory, open ‘c:\Users\dekla\AppData\Local\Programs\cursor\resources\app\bin\code’

I see “cursor” binaries but no “code” binaries.

Versions:

Version: 1.4.5 (user setup)
VSCode Version: 1.99.3
Commit: af58d92614edb1f72bdd756615d131bf8dfa5290
Date: 2025-08-13T02:08:56.371Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

Installation
Identifier
anysphere.remote-wsl
Version
1.0.9
Last Updated
2025-08-25, 12:12:09
Size
178.80KB
Marketplace
Published
2019-05-02, 13:40:03
Last Released
2025-07-24, 20:34:18

Hi @Ben_House and @deklanw, could you share the full logs from the “Remote - WSL” window when it breaks / disconnects (before reloading the window) so we can take a closer look?

Re:

Failed to patch code.sh launcher

This error is benign; we refactored this launcher in newer versions of Cursor, so it doesn’t need the patch anymore.

2025-08-25 13:00:54.893 [info] Resolving wsl remote authority ‘wsl+ubuntu’ (attempt #2)
2025-08-25 13:00:54.908 [warning] Failed to reuse existing connection, attempt 1 of 2 request to VERSION_LINK2 failed, reason: socket hang up
2025-08-25 13:00:55.016 [warning] Failed to reuse existing connection, attempt 2 of 2 request to VERSION_LINK2 failed, reason: socket hang up
2025-08-25 13:00:55.499 [info] Installing cursor-server with options: {“id”:“ed0601bde173fb9fd5647db5”,“commit”:“af58d92614edb1f72bdd756615d131bf8dfa5290”,“line”:“production”,“realCommit”:“af58d92614edb1f72bdd756615d131bf8dfa5299”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:false,“killRunningServers”:false}
2025-08-25 13:00:55.499 [info] Checking output for installServerScript
2025-08-25 13:00:55.499 [info] [wsl exec: installServerScript] Running command
2025-08-25 13:00:55.777 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2025-08-25 13:00:56.314 [info] Successfully connected to Cursor server at VERSION_LINK from Windows
2025-08-25 13:00:56.315 [info] Returning resolved authority for Cursor server at VERSION_LINK from Windows. Returning token: 6f307a80-bb47-4f4d-943b-dc0229a6f70c
2025-08-25 13:01:12.346 [info] Resolving wsl remote authority ‘wsl+ubuntu’ (attempt #1)
2025-08-25 13:01:12.347 [info] Installing cursor-server with options: {“id”:“6bdab465d89f3d33ce2069a6”,“commit”:“af58d92614edb1f72bdd756615d131bf8dfa5290”,“line”:“production”,“realCommit”:“af58d92614edb1f72bdd756615d131bf8dfa5299”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:false,“killRunningServers”:false}
2025-08-25 13:01:12.347 [info] Checking output for installServerScript
2025-08-25 13:01:12.347 [info] [wsl exec: installServerScript] Running command
2025-08-25 13:01:12.347 [error] Failed to patch code.sh launcher: Error: ENOENT: no such file or directory, open ‘c:\Users\dekla\AppData\Local\Programs\cursor\resources\app\bin\code’
2025-08-25 13:01:12.850 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2025-08-25 13:01:12.890 [info] Successfully connected to Cursor server at VERSION_LINK from Windows
2025-08-25 13:01:12.890 [info] Returning resolved authority for Cursor server at VERSION_LINK from Windows. Returning token: 6f307a80-bb47-4f4d-943b-dc0229a6f70c
2025-08-25 13:02:25.498 [info] Resolving wsl remote authority ‘wsl+ubuntu’ (attempt #2)
2025-08-25 13:02:25.505 [warning] Failed to reuse existing connection, attempt 1 of 2 request to VERSION_LINK failed, reason: socket hang up
2025-08-25 13:02:25.614 [warning] Failed to reuse existing connection, attempt 2 of 2 request to VERSION_LINK failed, reason: socket hang up
2025-08-25 13:02:27.744 [info] Installing cursor-server with options: {“id”:“370244eb43750a448dc5313f”,“commit”:“af58d92614edb1f72bdd756615d131bf8dfa5290”,“line”:“production”,“realCommit”:“af58d92614edb1f72bdd756615d131bf8dfa5299”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:false,“killRunningServers”:false}
2025-08-25 13:02:27.744 [info] Checking output for installServerScript
2025-08-25 13:02:27.744 [info] [wsl exec: installServerScript] Running command
2025-08-25 13:02:29.810 [error] Error installing Cursor server [wsl exec: installServerScript] Command failed with exit code 4294967295: stdout: C

last part is cutoff but says Catastrophic failure Error code: Wsl/Service/E_UNEXPECTED

Also,

VERSION_LINK=http://127.0.0.1:42635/version

VERSION_LINK2=http://127.0.0.1:35141/version

your forum is preventing me from posting it because new users can’t post multiple links

Hi @deklanw, this error means that the WSL environment froze. We are releasing an update to the client that should be more resource efficient. If possible, I’d also recommend opening a smaller folder in Cursor, or use a multi-root workspace, to reduce the # of files that need to be watched for changes.