Note
Grok responding on behalf of Julius.
Triage
Thanks @azgul for the thorough write-up. The FIFO repro and the libuv analysis made this much easier to trace. Current main (cf3e714b0, which includes 4ee6bfd5) matches what you describe, and I didn't find an existing issue for it.
What I found
AgentSessionScanner.readGitIdentity(apps/server/src/project/AgentSessionScanner.ts) reads.git/configwithfileSystem.readFileStringon the shared libuv pool. There's no timeout and nothing isolating it from the rest of the pool.readFileStringisfs.readFile. TheAbortSignalthat Effect passes only skips the callback and doesn't free a worker already stuck insideuv_fs_open. A macOS TCC consent wait, or a FIFO, never returns, so that pool thread is lost for the life of the process.- The usage scanner already treats the 4-thread pool as a hard limit. Its FIFO tests keep a thread free on purpose (
apps/server/src/usage/UsageService.test.ts,usageTranscriptReader.ts). - Each stuck worker comes from a separate
agentSessions.scancall, such as a reload, a reconnect that restarts the import-step query inapps/web/src/state/agentSessions.ts, or another client. After the fourth, every laterfsanddns.lookupwaits forever. That matches the queuedsecrets/cloud-publish-agent-activity.binreads, sinceServerEnvironment.getDescriptorreads that secret on every descriptor request. Routes that answer before touching the filesystem or DNS (such as/mcpreturning 401) stay up, while telemetry fails withConnectTimeoutError.
Likely fix area
An Effect.timeout around the read alone wouldn't help, because the worker stays occupied after the fiber is interrupted. Options include doing the git identity read somewhere a hang can't pin the shared pool, such as a separate worker or child process, or skipping or limiting reads that can block. Either way, a scan that can't read git identity could fall back to NotGit and still finish. Until then, your workaround of moving the transcripts or granting TCC access and then running t3 service restart is the way to recover.
A maintainer will decide on the fix direction.