Repository navigation
Description
What happened
On one Windows machine, the T3 Code desktop app (nightly) suddenly showed both of its environments as disconnected: the local Windows server and a WSL server (t3 serve as a systemd user service in Ubuntu). The client only reported EnvironmentRpcUnavailableError: <host> is not connected. Neither the app nor the servers indicated the real cause. Restarting the desktop app did not help.
Both servers were still running and accepting TCP connections. Other routes answered (slowly). Only /.well-known/t3/environment never returned, so the client's descriptor probe timed out every time (10 s for loopback, 2.5 s for the WSL address) and marked both environments offline.
Diagnosis
In both servers, the environment descriptor handler was stuck at the same place:
InterruptError: All fibers interrupted without error
at ServerSecretStore.get
at config.readAgentActivityPublishingActive
at environment.metadata.descriptor
getDescriptor (ServerEnvironment, relayTracing bundle) calls readAgentActivityPublishingActive(secrets) on every request, which does readSecretString("cloud-publish-agent-activity") → ServerSecretStore.get → a plain async fileSystem.readFile(<secretsDir>/cloud-publish-agent-activity.bin). Nothing caches the result. So the endpoint the client uses as its liveness check depends on the libuv threadpool and the disk being healthy.
The two servers were stalled for different reasons, and the result was the same:
- Windows server: threadpool saturated by background git work. Successful
ServerSecretStore.getspans took 14–23 s each (normally 0–50 ms), longer than the client's 10 s probe timeout, so every probe failed with 499. The visible load was background VCS work for projects on an SMB network share that the user had not opened in days: 1,295runGitCommandspans in 12 minutes. These came fromautoPullProjects,refreshStatusUpstreamIfStale,statusDetailsandfetchRemoteForStatus, about 10 s pergit statuson the share, withreadStatusDetailsLocalfailing and retrying every few seconds per project. One registered project is the root of the whole share, with dozens of discovered tracked folders. The trigger for the onset is not proven: the same polling was already running a few minutes earlier while secret reads were still fast. - WSL server: disk I/O stalled. The WSL VM's virtual disk started failing writes (
hv_storvsc ... cmd 0x2a status: scsi 0x2 srb 0x4 host 0xc0000001, 1,600+ times), with I/O pressure at about 88% and many processes, including T3's owngitchildren, stuck inDstate atadd_transaction_credits. The server'sserver.trace.ndjsonstopped being written entirely, and the descriptor endpoint hung the same way.systemctl --user stop t3code.servicethen hung infinal-sigkillbecause the server's threads were blocked in the kernel. The host-side cause appears to be a heavily fragmented sparse VHDX (1.25 M extents), which is outside T3. Still, systemd reportedt3code.servicepeak memory 9.6 GB, which contributed to the WSL VM sitting at its 14 GB cap.
Taken together: whenever the server's async fs is stalled, for any reason, the client says only "not connected". The process is alive, other routes answer, and nothing in the UI or logs points at stalled I/O. This is the same mechanism as #26417 and #24897, which were fixed for specific triggers. The descriptor still reads a secret file through the shared pool on every probe, on the current nightly.
Suggestions (maintainers' call):
- Cache
cloud-publish-agent-activity(and the other server secrets) in memory and refresh on write, so the descriptor and liveness probe never touch disk. - When a probe gets 499 or times out while the TCP connection succeeds, show something like "host is unresponsive (server busy / I/O stalled)" instead of "not connected".
- Throttle or skip background VCS polling (
autoPullProjects, upstream refresh, status retry loops) for projects that haven't been opened recently, especially on network paths where onegit statustakes about 10 s. Retrying a failingstatusDetailsevery few seconds per project adds to the problem.
Steps to reproduce
- On Windows, run T3 Code Desktop (nightly) with several projects whose roots are on a slow SMB share (mapped drive;
git statusabout 10 s), including one project at the share root. Leave them unopened. - Let the background VCS polling run (auto-pull and status refresh happen automatically).
- Add more fs load, or slow the disk, until
ServerSecretStore.gettakes more than 10 s. - The environment flips to "not connected" while the server stays running.
curl http://127.0.0.1:<port>/.well-known/t3/environmenthangs whilecurl http://127.0.0.1:<port>/answers.
A deterministic version, as in #26417: block 4 libuv workers (for example with FIFO reads on Linux/macOS), then probe /.well-known/t3/environment.
Version
Windows desktop server and WSL server: 0.1.13-nightly.20261126.5305 (both report this version). The triage CLI was the same build.
Environment
- Windows 11 Pro 10.0.26200 x64, T3 Code (Nightly) desktop, Electron 44.10.1, server exposure
network-accessible, Tailscale Serve enabled (Tailscale healthy, not involved) - WSL 2.7.12.0, kernel 6.18.33.2, Ubuntu with
t3code.service(systemd user service, service launcher 0.1.0),.wslconfigmemory=14GB - Projects: several on an SMB-mapped drive reached over VPN, others on local NVMe and inside WSL
statev2.sqliteis 3.6 GB (Windows server)- Providers: Claude, Codex (several concurrent agent sessions in WSL)
Evidence
Windows server, server.trace.ndjson, every descriptor request (26 of 26 in the window):
GET /.well-known/t3/environment durationMs≈10002 http.response.status_code=499 exit=Interrupted
cause at ServerSecretStore.get > config.readAgentActivityPublishingActive > environment.metadata.descriptor
ServerSecretStore.get durations in the same minutes: 3766, 9604, 14219, 14442, 14826, 15116, 15137, 14862, 14021, 18479, 23389, 20825, 20713, 17433, 16472 ms. At the minute before onset: 0 ms.
Client side: clientRuntime.environment.fetchRemoteEnvironmentDescriptor → RemoteEnvironmentAuthTimeoutError: ... timed out after 10000ms (loopback) and after 2500ms (WSL address), followed by EnvironmentRpcUnavailableError: <host> is not connected. (63×).
Background git load in the 12 minutes before onset (Windows server): runGitCommand 1,295, GitVcsDriver.statusDetails.indexPath 246, readStatusDetailsLocal 174 (mostly GitCommandError: Git status failed on share-hosted projects, retried every 2–5 s), autoPullProjects spans of 48–80 s, and fetchRemoteForStatus.alternates/download about 30 s each against the UNC path.
WSL server, boot-service.log:
WARN environment api request failed
errorTag: 'Interrupt'
cause: InterruptError ... at ServerSecretStore.get
at config.readAgentActivityPublishingActive
at environment.metadata.descriptor
systemctl --user status t3code.service: deactivating (final-sigkill) (Result: timeout), Memory: 1.9G (peak: 9.6G, swap peak: 982.7M). The server main process was a zombie (Zl) and its git child was in Ds at add_transaction_credits. server.trace.ndjson mtime froze at onset.
Related issues
- [Bug]: Claude skill discovery and favicon reads of project files can exhaust the libuv pool and wedge the host for hours (TCC-blocked open on a removable volume) #26417 (closed): libuv pool exhaustion wedges the host,
ServerSecretStore.getstuck,/.well-known/t3/environment499. Same symptom with a different trigger. Its suggestion "keep auth off the pool: cache server secrets in memory" still seems unaddressed for the descriptor path. - [Bug]: Host stops answering mint-credential/assets after a client sleeps mid-request: ServerSecretStore.get blocked 17.6 h behind dpop.verifyRequestDpopProof #24897 (closed):
ServerSecretStore.getblocked behind DPoP proof verification - Antigravity runtime temp-dir cleanup starves the server's file I/O for minutes, and successful title generations report a timeout and retry #23877 (open): Antigravity temp-dir cleanup starves server file I/O (another source of pool starvation)
Fix applied or workaround
- The Windows environment recovered on its own once the load eased. No T3 config was changed.
- WSL:
wsl --shutdownwas the only way to clear the stuck processes. It stopped the disk churn immediately. The host-side VHDX fragmentation is being handled separately (not a T3 bug). - Possible user-side workaround: archive or remove idle projects that live on network shares, so background git polling doesn't run against them.
Filed by
Drafted with t3 triage by Claude Code (model: Claude Opus 5.5, claude-opus-5-5), reviewed by the reporter.
Activity
davidebigpicture commentedon Nov 28, 2026
Follow-up: the background git load comes from auto-pull, which ignores project activity
I traced the git load on the Windows host further. It's almost entirely
autoPullProjects. In a sample window, each idle share-hosted project got about 153 git calls from it. Thread-driven calls (subscribeVcsStatus,refreshVcsBranch) were in the single digits.How it works in
0.1.13-nightly.20261126.5305(from the server bundle):autoPullProjects(projectStore.listShells(), settings), then repeats it everyautomaticGitFetchIntervalfor as long asbackgroundPolicy.shouldRunHostWorkis true.autoPullProjectskeeps every project whose resolveddefaultAutoPullis true. Then, for each one, 4 at a time, it runsgit.statusDetails(cwd)withAwaitStatusFetch, so every pass includes a remote fetch.defaultAutoPull: truetherefore makes every registered project a permanent polling target. Here that's 14 projects on an SMB share over VPN, including one whose root is the share itself. Theauto_pullcolumn inprojection_projectswas 0 for all of them; the settings value is what counts.Suggestions:
Git status failederrors.WSL side, now confirmed (not a T3 bug): the WSL VM's I/O stall had a host-side cause. Its sparse
ext4.vhdxhad about 1.25 M NTFS extents, at the NTFS per-file limit, so the host rejected writes that needed new extents.wsl --manage <distro> --set-sparse falsefailed with0x80070299(FILE_SYSTEM_LIMITATION). After rebuilding the distro onto a non-sparse VHDX (2.6 K extents), the WSL server is healthy. It's still a clear example of the main problem in this issue: a server that is alive but I/O-starved shows only "not connected".Follow-up drafted with
t3 triageby Claude Code (Claude Opus 5.5), reviewed by the reporter.