Repository navigation
[Bug]: Cold WSL startup exceeds wslpath timeout and falls back to Windows backend #14348
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- On Windows 11, configure T3 Code 0.0.44 to use an Ubuntu WSL 2 backend in WSL-only mode.
- Start T3 Code while the distro is stopped and its systemd startup takes more than 10 seconds. On this machine, a Windows-side
wsl.exe -d Ubuntu --exec /usr/bin/wslpath -u <existing Windows path>completes successfully in about 12.2–12.6 seconds from a cold distro. - Observe repeated
wslpath conversion failedpreflight errors and the modal sayingWSL backend is still unavailable; T3 Code falls back to the Windows backend for this launch. - Keep an Ubuntu process running, repeat the same conversion, and start T3 Code again. The conversion takes about 0.4 seconds; T3 Code starts the Linux backend successfully.
The affected Windows paths existed, and /mnt/c/Users/... was mounted inside Ubuntu. The direct wslpath command returned the correct /mnt/c/... path with exit code 0.
Expected behavior
Cold WSL startup should not be reported as a path conversion failure. T3 Code should allow a slow distro enough time to start, or surface a timeout-specific explanation and retry without losing the requested WSL backend for the launch.
Actual behavior
desktop.wsl.windowsToWslPath repeatedly takes about 10.4 seconds and yields wslpath conversion failed for ..., even though the same conversion succeeds if allowed about 12 seconds. After its retry window, T3 Code shows WSL backend is still unavailable and uses Windows. Prewarming Ubuntu makes the WSL backend start normally. After the successful launch, the Linux server listens on 0.0.0.0:3773, and /.well-known/t3/environment returns HTTP 200 from both WSL and Windows localhost.
Impact
Major degradation or frequent failure. A cold distro prevents the selected WSL-only backend from starting until Ubuntu is kept running manually.
Version or commit
T3 Code desktop 0.0.44
Environment
Windows 11 x64, build 26200.9550; WSL 2.9.12.0; default distro Ubuntu, WSL 2, systemd=true.
Logs or stack traces
desktop.wsl.preWarm: approximately 10.4 s
desktop.wsl.windowsToWslPath: approximately 10.4 s per attempt
desktop.backendConfiguration.wslPreflight:
Could not stage the WSL runtime; launching from the mounted server tree instead.
reason: wslpath conversion failed for <T3 install>\resources\wsl-runtime.tar.gz
desktop.backendInstance.scheduleRestartFiber:
reason: wslpath conversion failed for <user profile>\.t3\userdata\wsl-server-tree\0.0.44
Direct Windows-side command with the distro cold:
wsl.exe -d Ubuntu --exec /usr/bin/wslpath -u <same existing Windows path>
exit=0; elapsed=12.2–12.6 s; output=/mnt/c/Users/.../0.0.44
Same command while an Ubuntu process keeps the distro running:
exit=0; elapsed=0.4 s; same output
Ubuntu journal during cold starts:
WSL (2 - init-systemd(Ubuntu)) ERROR: WaitForBootProcess:3594: /sbin/init failed to start within 10000ms
The current source defines WSLPATH_TIMEOUT = Duration.seconds(10) in DesktopWslEnvironment.ts. The error message does not distinguish command timeout from a real conversion failure.
Workaround
Start Ubuntu and keep a process running before launching T3 Code. Once T3 Code's Linux server starts, the extra process is no longer needed.
Related reports
- WSL backend never starts in a distro with automount disabled: wslpath conversion fails and the app silently falls back to Windows #8297 has the same error text, but its distro deliberately disables Windows-drive automount, so
wslpathactually exits 1. Here automount works and the command exits 0 when given enough time. - [Bug]: Unusable. WSL backend readiness timesout at 60s because the server bundle loads over /mnt/c (takin 80s to boot) and app stuck on "Connecting to WSL…" forever #4535 concerns the later HTTP readiness timeout after WSL preflight, not this path-conversion timeout.
Activity
juliusmarminge commentedon Sep 30, 2026
Triage
Confirmed against current
main(v0.0.44plus later commits). This is not a path-conversion failure, and it is not a duplicate of open issue #8297 or closed issue #4535.In
apps/desktop/src/wsl/DesktopWslEnvironment.ts, bothPRE_WARM_TIMEOUTandWSLPATH_TIMEOUTare 10 seconds. WSL-only startup awaitspreWarm(wsl.exe -d <distro> -- true) and thenwindowsToWslPath(wsl.exe -d <distro> -- wslpath -u <path>). Each call is interrupted at 10 seconds.windowsToWslPaththen collapses three different outcomes intoOption.none(): the timeout, a non-zero exit, and empty stdout.stderris discarded. Callers inprepareWslRuntimeImplandresolveMountedAppRootboth report that aswslpath conversion failed for ….That matches the timings here. A cold
wslpaththat is allowed to finish returns exit 0 in about 12.2–12.6 seconds, with the correct/mnt/c/...path. The desktop spans stop at about 10.4 seconds, which is the timeout plus child teardown (PROCESS_TERMINATE_GRACEis 1 second), notwslpathrejecting the path. The same command takes about 0.4 seconds once Ubuntu is already running.The failure is classified as non-fatal, so
DesktopBackendManagerretries it up toWSL_TRANSIENT_PREFLIGHT_RETRY_LIMIT(12), and thenDesktopBackendPoolshows "WSL backend is still unavailable" and applies the in-memory Windows fallback for that launch. The retries never help if every attempt is killed before systemd finishes:preWarmis killed at 10 seconds, and the followingwslpathstarts cold and is killed again. The Ubuntu journal line (/sbin/init failed to start within 10000ms) is WSL's own boot wait, and it lines up with that same 10-second cutoff.Open issue #8297 has the same error string for a different cause: automount is disabled there, so
wslpathreally exits 1. This report has automount working. Closed issue #4535 is the later 60-second HTTP readiness timeout, after preflight has already succeeded.Worth fixing in two parts: let the first cold boot finish (the 10-second caps on
preWarmandwslpathare shorter than a slow systemd start), and report a timeout separately from a realwslpathfailure so a permanent conversion error does not look like a slow boot. A fast non-zerowslpathexit still returns immediately, so a longer timeout would not slow down the #8297 case.fix(desktop): give a cold WSL distro time to boot before wslpath conv…
fix(desktop): give a cold WSL distro time to boot before wslpath conv…