Nightly update reports WSL backend stopped, but old server survives and blocks reconnect #19735
After updating through T3 Code’s built-in nightly updater, my Ubuntu environment and its threads disappeared from the app.
- Windows desktop after update:
0.0.46-nightly.20261014.3132 - Existing WSL server:
0.0.46-nightly.20261014.3118 - Distro: Ubuntu, WSL2
- Date: 15 October 2026
The observed sequence:
- At
02:45:23 UTC, the updater requested shutdown of both backends. Both stop operations reported success after approximately one second. - After installation, the old Linux T3 server was still running on port
3774. - The desktop launched a replacement on port
3775. At02:48:25 UTC, it exited with code78:
ServerAlreadyRunningError: A T3 Code server already owns
/home/<user>/.t3/userdata. Stop that server, or use a separate
T3 home and pair with it, then retry. No server was stopped.
Expected: the update stops the previous desktop-managed WSL server and reconnects to the same environment.
Source investigation found:
- The updater calls
instance.stop()before installation. - WSL shutdown tracks the Windows
wsl.exelauncher. Cleanup usestaskkill /T /F, without subsequently verifying that the Linux server exited or released its ownership lock. - On exit code
78, the backend manager disables restarting. WSL reconciliation also skips retries after ownership refusal.
Relevant source: update shutdown, ownership failure handling, retry suppression.
The reason the original Linux process survived remains unknown. Isolated shutdown tests using a dummy process and the old T3 executable with an empty data directory both stopped correctly.
The database remained intact: 312 thread records and 5,562 messages. A backup passed PRAGMA quick_check. After confirming no agent runs were active, we gracefully stopped the old server. Reconnection has not yet been verified.
Upgrading again just now to 0.0.46-nightly.20261015.3145 went fine.
Reproduced this twice today on consecutive nightly updates, including one starting from a
20261015build, so it doesn't appear fixed by the later nightlies.Environment: Windows 11 (build 26300), WSL2 Ubuntu 20.04, desktop-managed WSL backend.
Updater quit (UTC) Update Desktop backendInstance.stopspansResult 2026-10-15 13:57:43 → 0.0.46-nightly.20261015.3158both Success, 1203 ms / 1641 msOld WSL server 0.0.46-nightly.20261014.3118kept running and held the lock. Replacement exited with code 78 at 13:58:45.2026-10-15 20:09:44 …20261015.3158→…20261015.3171both Success, 828 ms / 785 msWSL server 0.0.46-nightly.20261015.3158(started 14:16) kept running. Replacement exited with code 78 at 20:10:27.Both quits came through the updater path (
desktop.lifecycle.beforeQuitForUpdate→ "allowing updater-controlled quit", thenbefore-quit received). Same error both times:ServerAlreadyRunningError: A T3 Code server already owns /home/<user>/.t3/userdata. Stop that server, or use a separate T3 home and pair with it, then retry. No server was stopped.Additional observations:
- After the first update there were two orphaned Linux servers, not one. The lock owner (
…20261014.3118, parent was PID 1 by then) and an oldert3 --bootstrap-fd 0from a differentwsl-runtime/sha256-…build, started the previous day. So survivors can pile up across updates. - The surviving servers were fully functional. One still had an attached
claudeprovider session, and the old server kept serving WSL threads that the updated desktop could no longer see. From the user's side, every WSL thread disappeared from the sidebar after each update. Nothing was lost:statev2.sqlitewas intact both times. - The surviving server's
server-runtime.jsonstill pointed at it after the desktop reported the stop as successful, so the desktop could detect the leftover before spawning a replacement. - Recovery each time: confirm no runs are active,
kill -TERMthe leftover~/.t3/wsl-runtime/*/t3process inside the distro (it exited cleanly within a few seconds), then relaunch T3 Code. After the first recovery the desktop retried on its own (wslBackend.startNewat 14:16:23) and reconnected. After the second it didn't retry until the app was relaunched (20:20:55 → ready on…3171).
This supports the source analysis above: the Windows-side stop reports success, but the Linux server outlives it, and the exit-78 ownership refusal then leaves the WSL environment offline.
- After the first update there were two orphaned Linux servers, not one. The lock owner (
Seen again updating to 0.0.46-nightly.20261015.3176
Another occurrence with desktop
0.0.46-nightly.20261015.3176and an older desktop-managed Ubuntu backend still on0.0.46-nightly.20261015.3171. The older server was healthy on port 3774 while the replacement exited with code 78. The surviving server had provider and tunnel child processes.Three isolated trials with the same
.3171executable and disposable data directories did not reproduce the survivor. Two relay-termination trials and one abrupt Windows-parent-exit trial all stopped the Linux server. These trials do not establish the failing condition in a populated environment. Stablev0.1.0was not tested.Source inspection at
b67ac65b74found two incomplete shutdown guarantees:- A timed-out
DesktopBackendManager.stop()resolves normally even while the run remains active. Its existing test,keeps a timed-out run active until its process exits, passes and explicitly demonstrates this behavior. The updater then proceeds to installation. - The Windows process handle represents
wsl.exe; its completion does not independently acknowledge that the Linux T3 backend and its provider sessions finished shutting down.
The timeout case alone is not a demonstrated explanation for the earlier reports of fast, successful stops. A fix should gracefully stop and verify the exact desktop-managed Linux T3 process and its owned providers, while preserving unrelated WSL processes. It must not terminate the distro or all of WSL.
No source fix is written yet. I can prepare a focused pull request once the failing lifecycle condition is reproduced and the shutdown approach is confirmed. I would avoid claiming that exposing timeout failures alone fixes this issue.
- A timed-out
Same failure here today, this time updating from
0.0.46-nightly.20261014.3132to0.1.1-nightly.20261016.3203.Environment: Windows 11, WSL2 Ubuntu, desktop-managed WSL backend.
- The old WSL server (
0.0.46-nightly.20261014.3132) was started by the desktop app itself the day before and stayed healthy through the update; it kept answering on port 3773. - The app restarted for the update at 15:42 UTC on Oct 16. After the restart it tried to start a new WSL backend three times (15:44:18, 15:55:03, 15:55:55 UTC, port 3774). All three exited with code 78,
ServerAlreadyRunningError: A T3 Code server already owns /home/<user>/.t3/userdata. After that it stopped retrying and showed the "This T3 home is unavailable" dialog. - Recovery: checked that no agent runs were active, then ran
kill -TERMon the leftover server (it exited cleanly in about 3 seconds). The desktop started a new backend at 16:03:51 UTC on0.1.1-nightly.20261016.3203and the app works normally again.
So the surviving-server problem is still present in the newest nightly.
Collected with help from an AI agent.- The old WSL server (
Happened again today
Same here with the 5~ last nightly updates
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Thanks for the report. One part of this is fixed on main in #20277. Please test on the nightly built from main on 2026-10-21, or on the next stable release. One part is still open: A replacement launched within the roughly two-second detection and shutdown window can still be refused. If that part still matters to you, please open a new issue for that part only.
t3dotgg(GitHub profile, opens in a new tab) closed this
SunkenInTime(GitHub profile, opens in a new tab) linked this to #22478
Sign in to join this conversation.
Restarting T3 code did bring them back.