Cursor WSL error: Failed to patch code.sh launcher

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

This morning I launched cursor IDE in wsl (by “cursor .”) from the project directory as usual. See the following errors:

2026-03-24 13:26:32.990 [error] Failed to patch code.sh launcher: Error: ENOENT: no such file or directory, open ‘c:\Users\presa\AppData\Local\Programs\cursor\resources\app\bin\code’
2026-03-24 13:26:32.990 [info] Resolving wsl remote authority ‘wsl+Ubuntu’ (attempt #1)
2026-03-24 13:26:32.990 [info] Installing cursor-server with options: {“id”:“246cc5d72d37f12518856ea8”,“commit”:“fea2f546c979a0a4ad1deab23552a43568807590”,“line”:“production”,“realCommit”:“fea2f546c979a0a4ad1deab23552a43568807592”,“extensionIds”:,“serverApplicationName”:“cursor-server”,“serverDataFolderName”:“.cursor-server”,“forceReinstall”:false,“killRunningServers”:false,“host”:“127.0.0.1”}
2026-03-24 13:26:33.355 [info] [wsl exec: installServerScript][stderr]: your 131072x1 screen size is bogus. expect trouble
2026-03-24 13:26:33.533 [info] Successfully connected to Cursor server at http://127.0.0.1:45963/version from Windows
2026-03-24 13:26:33.533 [info] Returning resolved authority for Cursor server at http://127.0.0.1:45963/version from Windows. Returning token: 4fee0d5a-106e-4bbe-9c74-db6bc5c37eee

A few details:

  • Cursor version 2.6.21 (and also tried 2.6.12), WSL version: 2.6.1.0, Ubuntu 24.04.4 LTS
  • There is no code.sh / code / code.exe in the \resources\app\bin directory.
  • I tried a clean install (rm -rf ~/.cursor-server, wsl --shutdown, uninstall cursor, restart computer, and install cursor again). Same issue remains.
  • I tried disable Windows 11 antivirus before re-install. Same issue remains.
  • I tried re-installing an earlier Cursor version (2.6.12). Same issue remains.

Any suggestions is highly appreciated.

Steps to Reproduce

Open WSL terminal, and launch cursor by “cursor .”

Expected Behavior

Error message as described above.

Operating System

Windows 10/11

Version Information

Version: 2.6.21 (user setup)
VSCode Version: 1.105.1
Commit: fea2f546c979a0a4ad1deab23552a43568807590
Date: 2026-03-21T22:09:10.098Z
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

Hey, this is a known issue. The code file is missing in resources\app\bin\ in the latest versions. A few users hit the same thing here: Can't connect to WSL anymore

One thing from your logs: it looks like the WSL server actually connected successfully: “Successfully connected to Cursor server at http://127.0.0.1:45963/version from Windows”. The code.sh error is the first step, but the connection still went through after that. Is Cursor actually broken after this, or is it just an error in the logs and the IDE still opens?

If it really isn’t working, can you share the file list from C:\Users\presa\AppData\Local\Programs\cursor\resources\app\bin\? That should help us narrow it down.

Thanks for the response.

The IDE still opens. I’m relatively new to cursor so I’m not sure if all functions of cursor work or not with this error. Start seeing this error massage upon launching the IDE is worrisome.

The files in \app\bin are: cursor, cursor.cmd, cursor-tunnel.exe, code-tunnel.exe.

There is a fix: I mentioned this in one of my email chats with cursor team, and it was suggested to me to re-install WSL extension (inside cursor IDE Extension view) to an older version v0.08. I did that, and the error is gone. Interestingly I then re-install WSL extension to the latest version again, the error did not come back … So as of right now, I cleared the issue by installing an old WSL extension and then reverting back to latest version. Fingers crossed it stays this way!

Glad you found a fix. Just to clarify, the Failed to patch code.sh launcher error is cosmetic right now. As your logs show, the WSL connection succeeds right after it (Successfully connected to Cursor server), so it doesn’t affect how the IDE works.

That said, the workaround of reinstalling the WSL extension (v0.08 → latest) is a great find, thanks for sharing. It’ll help other users hitting the same error.

The team is aware of the issue. There’s no exact ETA yet, but your report helps us prioritize it.

Marking this thread as solved. Let me know if the error comes back.