Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
On Windows machines where WSL is not installed, every command run in Cursor’s integrated terminal opens a console window. The window asks to install or update the Windows Subsystem for Linux (“Press any key to install…”) and times out after 60 seconds.
The window is triggered by Cursor’s localhost-port probe, which runs wsl.exe --list --running --quiet without first checking that WSL exists. When the WSL component is missing, wsl.exe is only the stub shipped with Windows. Instead of returning an empty list, the stub starts wsl.exe --update --confirm --prompt-before-exit, and that process shows the prompt.
On managed machines this is a real blocker: users have no admin rights, WSL is forbidden by IT policy, and the update cannot succeed anyway.
Root cause (from the shipped bundles)
- out/vs/workbench/workbench.glass.main.js: OpenInBrowserWatcher.registerCommandDetection calls openBrowserUrlsService.captureLocalListeningPorts() on prompt start and on every onCommandFinished.
- That call goes to the main process, out/main.js, NativeHostMainService.captureLocalListeningPorts. On Windows it runs netstat.exe -ano together with captureRunningWslListeningPorts() : eh(“wsl.exe”, [“–list”,“–running”,“–quiet”], { encoding:“utf16le”, timeout:…, windowsHide:true }, …)
windowsHide does not help here, because the visible window belongs to the child process that the stub starts itself (wsl.exe --update …). - A second path calls probeService.captureLocalListeningPorts() directly, without checking the autoOpenLocalhostUrls setting. It runs when a localhost page loads in the Browser Tab, so it can trigger the same prompt.
Steps to Reproduce
- Use Windows 11 without the WSL feature installed.
- Keep the default for Cursor Settings → Browser → “Automatically open localhost links in the Browser Tab”, which is on.
- Open the integrated terminal and run any command, for example dir.
- A WSL install/update console window appears. It opens again at the start and end of every command.
Expected Behavior
No wsl.exe process is started when WSL is not installed. The WSL port lookup should be skipped quietly.
Operating System
Windows 10/11
Version Information
Cursor 3.24.18 (VS Code 1.128.0), commit be4c9e5350d77747b42cd467cbd3370a753d4640, build 2026-10-13
Additional Information
Suggested fix
Before starting wsl.exe, check that WSL is actually installed, and skip captureRunningWslListeningPorts() if it is not. Possible checks, which can be combined:
- the registry key HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss exists and has at least one distribution;
- the WSL package is present (%ProgramFiles%\WSL\wsl.exe) instead of only the System32 stub.
The result can be cached for the whole session, so the probe doesn’t run on every command.
Workaround
Turn off Cursor Settings → Browser → “Automatically open localhost links in the Browser Tab”. The terminal watcher then stops calling the probe. The Browser Tab path described above can still trigger it.
Does this stop you from using Cursor
No - Cursor works, but with this issue