An iCloud-evicted file in a project hangs the whole server (blocking reads fill the libuv pool) and the desktop never notices #28510
What happened#
"I see this issue and can't connect to anything." The Mac's environment card showed "tunnel is offline" (tunnel_down, HTTP 530, Relay could not reach the environment endpoint (endpoint_request_failed)). After a restart it later showed "T3 Code on did not answer". Threads couldn't be stopped, settled or deleted. Restarting the desktop app helped for only a minute or two before the server hung again.
Diagnosis#
Projects under an iCloud-synced ~/Desktop had evicted (dataless) files. Reading them blocked forever because iCloud was stalled. A live stack sample of the hung backend showed all 4 libuv-worker threads stuck in read(2), with the main thread idle, so every fs/dns-dependent request hung (no HTTP replies, no traces, the relay saw tunnel_down 530). The desktop never noticed: DesktopBackendManager.ts:563 probes readiness only until the first success. After ⌘Q the hung backend was orphaned and ignored SIGTERM.
[Full diagnosis to paste here: see below]
Steps to reproduce#
- On macOS with iCloud Drive "Desktop & Documents" on, put a git repo with a linked worktree under
~/Desktopand add it as a T3 project. - Evict the worktree's
.gitpointer file and a few project files (brctl evict <path>), then make iCloud unable to serve them (e.g. go offline or disable network forbird). - Open the project and threads in T3 Code (desktop).
- Expected: the evicted files are skipped or time out, and the server stays responsive. Actual: libuv workers block in
read, the server stops answering (did not answer/tunnel_down530 over T3 Connect), and the desktop shows nothing until it's restarted.
(The libuv exhaustion and the stuck reads were observed directly. The brctl evict + offline repro is suggested and wasn't run on the reporter's machine.)
Version#
Desktop 0.1.4 (stable; "App version 0.1.4 / Host version 0.1.4"). The t3 triage CLI was 0.1.6.
Environment#
macOS (Darwin 25.6.0, arm64), T3 Code (Beta) desktop 0.1.4 (Electron 44.9.3), managed cloudflared 2026.10.4 over QUIC, iCloud Drive Desktop & Documents with Optimize Mac Storage on.
Evidence#
**[Full evidence to paste here: see below]**
Related issues#
#8844 (endpoint_request_failed, Windows → iOS) has the same client symptom on a different platform, with no hang analysis. #26513 (QUIC→HTTP/2 fallback, 530) doesn't fit because the tunnel was connected over QUIC. #27952 (managed ingress drift) doesn't fit because the tunnel was healthy whenever the backend was. I found no existing issue for iCloud-evicted files or for the desktop not detecting a hung backend. v0.1.6's #24194 (SQLite temp files blocking the event loop) is a different blocking path.
Fix applied or workaround#
The agent captured stack samples (read-only), restarted iCloud's bird daemon (iCloud stayed stalled), rebuilt one evicted worktree pointer from git metadata, restored one evicted file from git, and SIGKILLed the orphaned backend after quit (twice). The user re-cloned repos into ~/Developer (not iCloud-synced) and removed the Desktop projects from T3. After that the fresh backend had 0 Desktop files open, 0 stuck libuv workers, and T3 Connect reported "Tunnel connected". Workaround: keep projects outside iCloud-synced folders (or mark them "Keep Downloaded"). After ⌘Q, make sure no orphaned backend is left before relaunching.
Filed by#
Claude Code (claude-opus-5-5) via t3 triage
ChiragThesia(GitHub profile, opens in a new tab) added labelsvia-triage
Duplicate of #26417. That issue covers the same failure on a macOS host: project-file reads that never return take all four libuv workers, the server stops answering (
did not answer, 530 over T3 Connect), and the desktop doesn't notice because it probes readiness only at startup. There the trigger was a TCC prompt; here it is iCloud eviction. The kernel wait is different, but the server behaves the same way.Checked on main
5732bbee39with the dev server on a fresh database. I added four projects whosepublic/index.htmlis a FIFO, so favicon resolution blocks on it the same way it would on a dataless file. All fourlibuv-workerthreads stayed inwait_for_partner, andGET /.well-known/t3/environment, the path the desktop uses for its readiness probe, went from 200 in 23 ms to no response after 8 s.- Server-side fix in review: #26462. It moves project-file reads in Claude skill discovery, favicon resolution and
t3.jsonloading onto a killable child with a deadline on macOS. The session-scanner read from #15971 is handled in #23690. - The backend left running after ⌘Q is #22983, with a fix in review in #22572.
Your workaround stands until those land: keep projects out of iCloud-synced folders, or mark them "Keep Downloaded".
- Server-side fix in review: #26462. It moves project-file reads in Claude skill discovery, favicon resolution and
juliusmarminge closed this
Sign in to join this conversation.
/usr/bin/sample 5 (hung backend, 3987 samples per thread)#
Thread libuv-worker x4: 3987 thread_start > pthread_start > node::...GetValidatedFd > read <- every sample, all 4 threads Main thread: 3976 uv_run > uvio_poll > kevent <- idle 3 uvio_poll > uv_stream_io > ... http_parser::Execute <- still parsing requests
curl to the hung backend#
open fds of the hung backend (stat flags)#
__worktrees//.git hidden,compressed,dataless (open x3) //public/icon-512.svg compressed,datalessfirst occurrence: server.trace.ndjson goes silent while the process lives#
20:28:38 ConnectReachability.check <- last periodic check 20:32:47 last server span 22:06:50 desktop.lifecycle.windowAllClosed <- user quit; no backend lifecycle events in between 22:07:18 ConnectReachability.check "Tunnel connected · 4 connections · QUIC" (after restart)
client diagnostics#
Cause: tunnel_down HTTP status: 530 Route: T3 Connect Error: Relay could not reach the environment endpoint (endpoint_request_failed). Trace IDs: 34f19779f9ba6d0c2382565fa26e6d13, d8349b1311d6c783d35e6c7f7f55eb74