Skip to content

[Bug]: Regression: desktop still launches the Windows WSL install prompt on hosts without WSL (#21225 fix was reverted in #22222) #27723

Done

Description

@Greedquest

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

This was reported in #21038 and fixed in #21225, but the fix was reverted about 4 hours later in #22222 ("revert: fourteen unverified desktop fixes from the takeover campaign"). #21038 is still closed, so nothing tracks the bug now. I'm filing this as a verified regression on a real machine.

Area

apps/desktop

Steps to reproduce

  1. Use Windows 11 without WSL installed (wsl --status says "The Windows Subsystem for Linux is not installed"). The C:\Windows\System32\wsl.exe stub is still present.
  2. Leave the WSL backend off (the default). desktop-settings.json has no wsl* keys.
  3. Run T3 Code desktop and open the project picker, the command palette, or Settings.

Expected behavior

The desktop does not run wsl.exe while the WSL backend is off, and never runs it on a host where WSL isn't installed.

Actual behavior

readWslState (desktop:get-wsl-state) calls listDistros, which runs wsl.exe --list --verbose. On a host without WSL, the Windows stub opens a new terminal window with the "Windows Subsystem for Linux must be updated… Press any key to install" prompt (wsl.exe --update --confirm --prompt-before-exit). This happens again every time the renderer re-reads the state (about every 30 seconds while the palette or Settings is open). Pressing any key other than Esc/Ctrl-C starts a WSL install.

On main and v0.1.5, apps/desktop/src/ipc/methods/wsl.ts:26 is still:

const distros = available ? yield* wslEnvironment.listDistros : [];

available comes from makeIsAvailable, which only checks that System32\wsl.exe exists. That is always true on Windows 11, so the probe always runs. Restoring the && settings.wslBackendEnabled gate from #21225 fixes the case where the backend is off. A stronger fix would also make isAvailable detect a real WSL install, for example the Microsoft.WSL package or the HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss key, instead of checking for the stub.

Impact

Minor bug or occasional failure

Version or commit

T3 Code (Beta) v0.1.5 (installed build, bundle line main.cjs:148346 confirmed to have no gate)

Environment

Windows 11 Pro 10.0.26200, WSL not installed, T3 Code desktop v0.1.5

Logs or stack traces

From ~/.t3/userdata/logs/desktop.trace.ndjson. Each failure matches a popup's start time exactly (16:20:03 trace = 16:20:03 wsl.exe process creation):

DesktopWslDistroListError: wsl.exe --list --verbose exited with code 1
    at ...probeDistros (app.asar\apps\desktop\dist-electron\main.cjs:140740:60)
    at desktop.wsl.listDistros (app.asar\apps\desktop\dist-electron\main.cjs:140743:59)
    at ...readWslState (app.asar\apps\desktop\dist-electron\main.cjs:68862:73)
    at desktop.ipc.wsl.getState (definition) (app.asar\apps\desktop\dist-electron\main.cjs:148361:11)

Spawned process: C:\WINDOWS\system32\wsl.exe --update --confirm --prompt-before-exit

Workaround

Press Esc in the popup each time, or install WSL.

Activity

  1. hoop-ai commented on Nov 23, 2026

    @hoop-ai

    Still happens on the current nightly, 0.1.12-nightly.20261120.4994 (Windows 11 Home 26H2, build 26300.9457, WSL not installed, WSL backend off).

    Opening Settings → General ran wsl.exe --list --verbose, and the stub opened the install prompt (wsl.exe --update --confirm --prompt-before-exit) in the same second. It opened again 38 s later while Settings stayed open:

    desktop.wsl.probeDistros  DesktopWslDistroListError: wsl.exe --list --verbose exited with code 1
        at desktop.wsl.listDistros (main.cjs:162192)
        at desktop.ipc.wsl.getState (main.cjs:84931)    channel: desktop:get-wsl-state
    

    Neither fix PR was merged: #27734 was closed as a duplicate of #22493, and #22493 was closed as stale on Nov 12. main still has const distros = available ? yield* wslEnvironment.listDistros : []; at apps/desktop/src/ipc/methods/wsl.ts:26. Following the note on #22493, I opened #41351: the same change re-applied on current main, with @only21mil kept as author.

    makeIsAvailable still only checks that System32\wsl.exe exists. This machine has none of the signs of a real install: no WSLService or LxssManager service, no C:\Program Files\WSL\wsl.exe, no HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss key. Checking for any of them would tell "WSL installed" apart from "stub only".

    No user setting avoids it. The only path that skips the probe is a managed policy, which also marks the app as organization-managed, so it isn't a workaround for individual users.

  2. juliusmarminge commented on Nov 23, 2026

    @juliusmarminge
    Member

    #40918, now on main: On Windows without WSL installed, reopening the desktop and opening Settings, the project picker, or the command palette no longer invokes the WSL install stub or its installer prompts.

    Not done: The issue also requests no wsl.exe probes whenever the WSL backend is disabled; on machines with WSL installed, readWslState still lists distributions regardless of that setting.

    Closing; open a new issue if what is left still matters to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions