Repository navigation
Description
What happened
Every new Claude thread failed with "Claude timed out while registering its MCP tools. Retry the turn; if it keeps failing, check Claude and the server logs." It started suddenly, and nothing changed in the T3 Code or Claude setup. Threads whose Claude process was already running kept working. The user connects through the web client to a T3 server running as a systemd user service in a Qubes OS VM that is used only for coding.
Diagnosis
agentScope.ts sets MemoryHigh/MemoryMax on app-t3code-agents.slice once at server start from NodeOS.totalmem() (high = max(total - 6 GiB, total/2)) and never recalculates.
Qubes VMs (like other ballooning/dynamic-memory VMs) boot small and grow. The server started when the VM had ~13.1 GiB, so MemoryHigh = 7.1 GiB. At failure time the VM had 41.8 GiB (~28 GB available) but the slice was still capped at 7.1 GiB.
Agent Gradle/Kotlin builds + Gradle daemons + Codex app-server (2.7 GB, #26171) + 5 Claude sessions pushed the slice to 7.64 GB, just over MemoryHigh. The kernel throttled everything in the slice (~30.7M high events, full pressure ~69%, swap full, no OOM since MemoryMax wasn't hit).
A new claude in a fresh t3code-claude-*.scope couldn't finish startup, never answered setMcpServers, and was killed at the 90 s CLAUDE_MCP_REGISTRATION_TIMEOUT (13-19 s CPU used, ~100 MB). Failed opens never reached McpHttpServer.authenticateRequest. Outside the slice, the same CLI with T3's flags answered in 0.7 s.
Steps to reproduce
- Run the T3 server as a systemd user service on Linux in a VM with dynamic memory (Qubes: an AppVM with a low initial
memoryand a highmaxmem). - Start the server while the VM is small (about 13 GiB here). The slice gets
MemoryHigh = total − 6 GiB. - Let the VM grow (it reached 41.8 GiB here), then run agent workloads that together exceed the old
MemoryHigh, such as parallel Gradle/Kotlin builds. - Start a new Claude thread. It fails after 90 s with the MCP registration timeout, while the VM has plenty of free memory.
Deterministic without a VM: after the server starts, run systemctl --user set-property --runtime app-t3code-agents.slice MemoryHigh=<a little above current usage>, run a memory-heavy agent task, then start a new Claude thread.
Version
0.1.7
Environment
Qubes OS AppVM, Linux 6.6.48 x64, systemd user service, Node 26.12.1, Claude Code 2.1.325 (Opus 5.5), web client
Evidence
ClaudeAgentSdkQueryRunner.open (server.trace.ndjson)
20:56:13 0.6s Success
21:19:44 180.2s Failure (90s + resume retry)
21:31:22 90.1s Failure (new thread)
cause: setMcpServers -> ClaudeMcpRegistrationTimeoutError
MemTotal: 43824684 kB
app-t3code-agents.slice MemoryCurrent=7640686592 MemoryHigh=7620571136 (=13.1GiB-6GiB, sized at boot) MemoryMax=10547266560
memory.events: high 30772894, max 0, oom_kill 0
memory.pressure: full avg60=69.26Related issues
#23151 (closed; fix #23202 open): same 90 s setMcpServers timeout; a comment there reports MemoryHigh throttling from a runaway process. Here the cap itself is stale. #24708 (host-managed slice limits; no setting in 0.1.7), #18350 (MemoryHigh stalls without OOM), #26171 (Codex app-server in agent slice). None covers limits going stale when RAM grows after start. Possible fixes: recalc on totalmem change, use Qubes maxmem, an opt-out setting, and surface slice pressure in the timeout error.
Fix applied or workaround
systemctl --user set-property --runtime app-t3code-agents.slice MemoryHigh=infinity MemoryMax=infinitytook effect immediately, without restarting any agents. The user wants no cap because the VM is only used for coding.- To survive server restarts (T3 resets the limits at startup), a
t3code-dev.servicedrop-in runs anExecStartPostloop in the background that lifts the cap again for 5 minutes after each start. A systemd drop-in can't set the limit itself, because T3's--runtimeoverride takes precedence over it. - Another option is raising the VM's initial memory, so the boot-time
totalmemis realistic.
Filed by
Claude Opus 5.5 (claude-opus-5-5) in Claude Code, via t3 triage
Activity
juliusmarminge commentedon Nov 14, 2026
I tried to reproduce this on the current build and could not.
Commit 179c032 (origin/main). This VM cannot grow its RAM, so the stale-cap scenario could not be watched in a running app. Read-only check of the live systemd user manager here: app-t3code-agents.slice MemoryHigh=10326347776, MemoryMax=12576599040 with MemTotal 16375780 kB, which is exactly max(total-6GiB, total/2) / max(total-4GiB, 0.75*total) computed once at server start. I did not lower the slice's MemoryHigh by hand (the reporter's VM-free path) because the slice is shared with this VM's own T3 server and its agents. Unit reproduction: mocked os.totalmem() in apps/server/src/process/agentScope.test.ts, launched an agent at 16 GiB (limits applied), raised the total to 42 GiB, and launched another agent. On main, no new set-property call is made: the last set-property is still the startup one, so the test fails (1 failed, 14 passed). The test is pushed as factory/repro-36667.
Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.
VanTanev commentedon Nov 16, 2026
Note
🤖 Claude Opus 5.5 responding on behalf of VanTanev
This still happens on 0.1.9, and I reproduced the full failure on a Hyper-V VM.
Your unit test on
factory/repro-36667fails on main for the same reason, so I think this issue needs to be reopened.Steps:
MemTotalwas about 11.6 GiB, so T3 setMemoryHigh=6232358912(5.8 GiB) andMemoryMax=9348538368onapp-t3code-agents.slice.Hyper-V grows the VM to 32 GiB (
MemTotal33144096 kB), but the slice limits stay the same.MemoryHigh.In my case it held 6.8 GiB, and its
memory.pressureshowedfull avg10=98.The turn fails with "Claude timed out while registering its MCP tools" after 90 seconds, or after 180 seconds on a resume, because of the retry.
What I measured:
t3code-claude-*.scopeunits used about 4 seconds of CPU and a 4 MB memory peak in 90 seconds.claudebinary with T3's flags answeredinitializein 2 seconds.systemctl --user set-property --runtime app-t3code-agents.slice MemoryHigh=27497103360 MemoryMax=29644587008.Slice pressure fell from 98% to 15% in 20 seconds.
After that, a
claudeprocess in the slice answeredmcp_set_serversin 4 seconds.#24717 (
T3CODE_AGENT_SLICE_MEMORY_POLICY=host-managed) would give a way around this, but the default still fails on every VM with dynamic memory or ballooning.A fix is to calculate the limits again from
os.totalmem()before each agent starts, and to callset-propertywhen they change.