You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Server event loop freezes 6–28 s on a normal-sized database (5.9 GB), so remote devices lose Send #26224
Situation
I run T3 Code v0.1.3 (AppImage) on Linux (Arch, Ryzen 9 6900HX, 30 GB RAM) all day. I connect to it from a phone, an iPad and a Mac. Being able to control threads from several devices is the main reason I use T3. My usage is normal: a few agents at a time, including Codex and Grok sessions.
Complication
Since 2026-10-21, Send greys out on my other devices many times a day. The server's event loop freezes for 6 s or longer. During a freeze it answers nothing, so the client's thread-access check hits its 6 s timeout and Send greys out. t3 doctor --dry-run says the database is healthy: 5.64 GiB, 0 KiB reclaimable. Nothing on my side helps.
Event-loop stalls per day, from logs/event-loop-stalls.ndjson:
Day
Stalls
Stalls ≥ 6 s
Longest
10-19
3
1
7 s
10-20
18
0
4 s
10-21
239
54
21 s
10-22
194
38
25 s
10-23
100
13
23 s
10-24
56
10
25 s
10-25
81
7
19 s
10-26
195
38
24 s
10-27 (partial)
43
12
28 s
Evidence
These come from server.trace.ndjson*, about 20 minutes on 10-27:
Finding
Measured
Database growth
3.8 MB on 10-19 to 5.9 GB on 10-27. It adds 100–450 MB a day, and 425 MB (204k events) on 10-21 alone.
ProjectionMaintenance.compactEventStore
One run took 826 s (16:50 to 17:03)
Reader lock waits
80 waits over 0.5 s, up to 2.4 s. All of them came after compaction started.
Session and auth checks
Median 17 ms, worst about 2 s. The checks are cheap; they are slow only when they queue.
GitHub PR lookups (branchPullRequest)
6,153 calls in 20 minutes, worst 12.5 s
Rows in orchestration_events that rebuild their prompt from an older event
24,459. This means users can't trim the log themselves.
I couldn't line up a single ≥ 6 s stall with the compaction run. Server traces rotate after about 20–36 minutes, and none of those windows contained one. I can collect more data if you tell me what would help.
Question
What should a steady, multi-device user be able to count on, whatever size their database reaches?
Answer: what good looks like
#
Acceptance criterion
How anyone can check it
1
Send never greys out on a connected device while the host is up
Use 2+ devices for a normal working day
2
Zero event-loop stalls of 6 s or more over 7 days of normal use
Thanks for the detailed numbers. I tried this on current main (0894156d9a) with the web client on Linux and a fresh database. To mimic a server-side event-loop freeze, I paused the server process with SIGSTOP/SIGCONT:
15 s freeze, composer open with a draft: Send stayed enabled the whole time.
30 s freeze: after ~19–21 s the client showed "reconnecting". Send came back 3.6 s after the server resumed.
Page reload during a 12 s freeze: the thread loaded and Send was enabled 1.7 s after the server resumed.
So a stall shorter than about 19 s does not grey out Send in the web client, and longer stalls recover within a few seconds. The real problem is the 6–28 s stalls themselves, and your data doesn't yet say what the server is doing during one. From reading the code:
branchPullRequest volume. Two once-a-minute sweeps call it once for each group of unsettled threads that share a branch. The span is created before the cache check, so most of those 6,153 spans are cache hits. On Linux the work is async subprocesses, and the 12.5 s worst case is time spent queued behind the git process limit. #26036 and #24098 cover its cost.
compactEventStore. It pages and yields between pages. Your 2.4 s reader waits are queue time on the reader worker, not main-thread time.
Two things would tie a stall to its cause:
A handful of event-loop-stalls.ndjson rows with delayMaxMs ≥ 6000, all fields included. utilization, cpuUserMs/cpuSystemMs, majorPageFaults and rssMb tell apart a busy main thread (for example a slow synchronous database write) from memory pressure or swapping.
A server trace that covers one of those stalls. Retention is configurable. Restart the server with, for example, T3CODE_TRACE_MAX_FILES=60 (default 10) or a larger T3CODE_TRACE_MAX_BYTES (default 10 MiB per file). Then share the spans that overlap the stall row's time, especially the ones that end just after it. The monitor samples every 30 s, so the stall falls in the 30 s before time.
Also useful: the app versions on the phone, iPad and Mac, and whether Send greys out on all of them or only some.
Same symptom here on Windows, on v0.1.5 (desktop app, server pid on 127.0.0.1:3773). Other devices show "TatorBox is reconnecting: T3 Code on TatorBox did not answer" several times a day.
Machine: Windows 11 Pro 10.0.26200, x64, 128 GB RAM. The machine is otherwise idle during the stalls (about 18% CPU, 72 GB RAM free), with Windows Defender real-time protection on.
Stalls today (logs/event-loop-stalls.ndjson): 14 so far, the longest three within two minutes:
time (UTC)
delayMaxMs
utilization
cpuUserMs
cpuSystemMs
majorPageFaults
rssMb
14:00:12
6,923
0.72
109
0
1,048
400
14:00:57
16,952
0.92
141
94
1,234
399
14:01:55
10,778
1.00
546
156
12,635
340
The main thread used well under a second of CPU during 7 to 17 s stalls. So it looks blocked in a system call, not busy in JS.
What waited behind them (server.trace.ndjson*, 13:46 to 14:06 UTC): SQLite calls running in the worker connections waited up to 79 to 86 s:
ScheduledTaskService.listDueTasks
ProjectionStore.isNodeStored
ThreadSettlementServiceV2.sweep (an 82 s transaction)
getThreadsWithPullRequests (12.3 s, for both PullRequestWatchReactor.sweep and PullRequestSyncReactor.sweep)
The last of these reads only 356 rows (560 KB), so these are queue waits, not slow queries.
Database:statev2.sqlite 4.66 GB. Row counts by max(rowid):
table
rows
live threads
347 (9 deleted)
orchestration_events
2.94M
orchestration_command_receipts
773K
orchestration_v2_projection_turn_items
463K
orchestration_v2_projection_nodes
342K
The free list is 0, and the -wal file sits at 32,177,232 bytes, just under the 32 MB journal_size_limit from #23482.
Git and pull request work in the same 20 minutes:
span
calls
total
worst
branchPullRequest
354
439 s
7.6 s
runGitCommand
2,531
203 s
GitVcsDriver.readConfigValue
905
3.9 s
A spaced git.exe spawn timing (the #25245 snippet) gave 3 to 7 ms here today, so slow spawns don't look like the cause on this machine at the moment.
Pattern: the 14:00 cluster came as several agent threads were being started on this server within a few minutes. It is an orchestration-heavy install: one long-running manager thread starts helper and sub-agent threads all day.
Traces rotate in about 20 minutes, so I'm now keeping server.trace.ndjson around each stall of 5 s or more. I can share a redacted window of one if that would help.
🤖 Claude Opus 5.5 (Claude Code, via t3 triage) responding on behalf of @ahatzz11
Same symptom on macOS (Apple Silicon, Mac mini), desktop app nightly 0.1.7-nightly.20261102.4093 (84537c4). Clients on the same Mac and on a MacBook Pro (same build, over T3 Connect) show "minibox is reconnecting / T3 Code on minibox did not answer" and "Syncing messages..." in the thread view. The sidebar also dropped running threads out of Working on the MacBook while the server still had them running.
Stalls (logs/event-loop-stalls.ndjson, 2026-11-02 UTC): ~30 stalls between 20:55 and 21:34, about one every 30–40 s, utilization 0.99–1.0, mostly 3–7 s, max 14.3 s (21:00:44) and 19.0 s (21:32:19). RSS stays at 83–190 MB. An earlier burst on 2026-11-01 09:53–10:11 had a max of 12.2 s.
Not compaction here. No ProjectionMaintenance.* span over 500 ms during 20:55–21:05. statev2.sqlite is 3.3 GB plus a 29 MB WAL.
Relay (relay-client.ndjson): during the stalls cloudflared logs datagram manager error: timeout: no recent network activity, failed to accept QUIC stream and Incoming request ended abruptly: context canceled (see #17765).
Secondary.ServerSecretStore.get (1Password provider) takes 0–1.3 s outside stalls and 11–15 s inside them, so it looks like it gets stuck behind the stall rather than causing it.
The desktop auto-updated to this nightly at 19:57 UTC. The first stall burst came about an hour later.
On November 2, 2026, between approximately 01:09 and 01:19 UTC, the Android T3 mobile app 2.2.0 repeatedly showed:
“Syncing messages…”
“Reconnecting…”
The phone was connected to T3 Code Desktop/server 0.1.6 on Windows.
Host evidence
The host database currently contains:
statev2.sqlite: 34.1 GB
4,146,344 orchestration events
4,900 live thread projection rows
4,013 settled threads
4,172 subagent rows
992,779 turn-item rows
The event log recorded server event-loop stalls up to:
12.8 seconds
9.25 seconds
5.04 seconds on November 2
The backend log also contains repeated startup failures with database is locked and readiness timeouts.
Incident trace
During the reported window, the server remained alive and continued accepting activity, but WebSocket subscriptions were repeatedly interrupted and recreated:
orchestration.subscribeThread interrupted at 01:13:55 UTC
another long-lived thread subscription interrupted at 01:14:38 UTC
a burst of subscribeVcsStatus subscriptions interrupted at 01:14:55 UTC
further subscription/initial-sync churn at 01:15:39, 01:16:23, 01:17:31, 01:18:51, and 01:19:17–01:19:19 UTC
There was no corresponding authentication failure or full server restart. The trace records normal InterruptError cancellation, but not the initiating mobile/relay close code.
The event-loop-stall log has no row covering the exact 01:09–01:19 UTC window, so I cannot prove which specific SQLite or maintenance operation caused that particular reconnect burst.
Diagnosis
This appears to be the same host-side event-loop/SQLite pressure pattern described by this issue, amplified by the mobile reconnect path. The database is substantially larger than the examples already reported here, and the server has documented multi-second stalls and lock contention.
Related upstream work
#28487 improves mobile sync/reconnect behavior on poor links.
#28931 reduces temporary allocation during settled-shell trimming.
All three are still open and are not included in stable server 0.1.6.
Workaround
I switched the host background-activity profile to battery-saver, which reduces background polling. No database writes or repair actions were performed. A controlled restart may clear retained memory, but it was not attempted while active threads were running.
Environment: Windows x64, T3 Code Desktop/server 0.1.6, Android mobile app 2.2.0.
Prepared by GPT-6.1 Sol in T3 Code using the T3 triage playbook.
Same symptom on macOS (MacBook Air, Apple Silicon, 32 GB), desktop app 0.1.6 stable, local client on the same Mac. The composer shows "Amos's Mac Air is reconnecting" several times a day.
Data point: the database is small, so DB size alone does not explain it here.
statev2.sqlite 225 MB, WAL 9 MB
Server process at 50–137% CPU; server.trace.ndjson rotates its 10 MB file every 5–10 minutes
Today (2026-11-03, UTC):
event-loop-stalls.ndjson: 10:47:55Z delayMaxMs 4142, utilization 0.78, cpuUserMs 15156, cpuSystemMs 69314, involuntaryContextSwitches 392575, majorPageFaults 41. System CPU is about 4.5× user CPU.
From 10:47:10Z to 11:05:58Z, 7× Remote environment endpoint http://127.0.0.1:3773/.well-known/t3/environment timed out after 10000ms (the client probing its own local server), plus 21× Amos's Mac Air is not connected. and 6× SocketReadError: An error occurred during Read.
Gaps in the server trace line up with this: 12.6 s at 10:46:55Z, 10.0 s at 10:47:37Z and 10.0 s at 11:05:58Z. Outside these windows the gaps stay at 3 s or less.
The host was under memory pressure: 11.7 GB of 13.3 GB swap used, with a load average around 9.
After the stalls, curl to /.well-known/t3/environment returns 200 in 2 ms.
🤖 Claude Opus 5.5 (Claude Code, via t3 triage) posting on behalf of the reporter
Same symptom on Linux: server 0.1.4-nightly.20261027.3796 as a systemd user service. Desktop and mobile clients connect through a cloudflared tunnel and both disconnect at random several times an hour. The host has plenty of CPU (24 cores, about 70% idle), but its 15 GB of swap was full.
Evidence from server.trace.ndjson*, about 8 minutes on 2026-11-04 around 01:10–01:18 UTC:
Finding
Measured
Gaps with no spans at all (event loop frozen)
38 s, 42 s, 19 s, 20 s, 10 s within 3 minutes
sqlite span latency (n=4,522)
p50 1 ms, p90 172 ms, p99 14.9 s, max 57 s
Slow statements include primary-key lookups
SELECT payload_json FROM orchestration_v2_projection_nodes WHERE node_id = ?, SELECT MAX(sequence) FROM orchestration_events …: 50 s or more each
After updating to 0.1.7-nightly.20261104.4151 (database unchanged at 40.7 GB, plus t3 service protect), measured each minute for 15 minutes after the restart:
0.1.4
0.1.7
sqlite p50
1 ms
0.3–0.4 ms
sqlite p99
14.9 s
22–79 ms
sqlite max
57 s
under 350 ms in most minutes, one 10.4 s spike
Gaps with no spans over 3 s
38 s, 42 s, …
4–5 s twice in the first 2 minutes (agents reconnecting), then one 3 s
So 0.1.7 is far better here, but stalls still happen occasionally, and the database keeps growing by about 100k events a day.
Activity
juliusmarminge commentedon Oct 28, 2026
Thanks for the detailed numbers. I tried this on current main (
0894156d9a) with the web client on Linux and a fresh database. To mimic a server-side event-loop freeze, I paused the server process with SIGSTOP/SIGCONT:So a stall shorter than about 19 s does not grey out Send in the web client, and longer stalls recover within a few seconds. The real problem is the 6–28 s stalls themselves, and your data doesn't yet say what the server is doing during one. From reading the code:
branchPullRequestvolume. Two once-a-minute sweeps call it once for each group of unsettled threads that share a branch. The span is created before the cache check, so most of those 6,153 spans are cache hits. On Linux the work is async subprocesses, and the 12.5 s worst case is time spent queued behind the git process limit. #26036 and #24098 cover its cost.compactEventStore. It pages and yields between pages. Your 2.4 s reader waits are queue time on the reader worker, not main-thread time.Two things would tie a stall to its cause:
event-loop-stalls.ndjsonrows withdelayMaxMs ≥ 6000, all fields included.utilization,cpuUserMs/cpuSystemMs,majorPageFaultsandrssMbtell apart a busy main thread (for example a slow synchronous database write) from memory pressure or swapping.T3CODE_TRACE_MAX_FILES=60(default 10) or a largerT3CODE_TRACE_MAX_BYTES(default 10 MiB per file). Then share the spans that overlap the stall row'stime, especially the ones that end just after it. The monitor samples every 30 s, so the stall falls in the 30 s beforetime.Also useful: the app versions on the phone, iPad and Mac, and whether Send greys out on all of them or only some.
iTator71 commentedon Oct 31, 2026
Same symptom here on Windows, on v0.1.5 (desktop app, server pid on 127.0.0.1:3773). Other devices show "TatorBox is reconnecting: T3 Code on TatorBox did not answer" several times a day.
Machine: Windows 11 Pro 10.0.26200, x64, 128 GB RAM. The machine is otherwise idle during the stalls (about 18% CPU, 72 GB RAM free), with Windows Defender real-time protection on.
Stalls today (
logs/event-loop-stalls.ndjson): 14 so far, the longest three within two minutes:The main thread used well under a second of CPU during 7 to 17 s stalls. So it looks blocked in a system call, not busy in JS.
What waited behind them (
server.trace.ndjson*, 13:46 to 14:06 UTC): SQLite calls running in the worker connections waited up to 79 to 86 s:ScheduledTaskService.listDueTasksProjectionStore.isNodeStoredThreadSettlementServiceV2.sweep(an 82 s transaction)SessionStore.verify(35 s, insideEnvironmentAuth.authenticateHttpRequest)getThreadsWithPullRequests(12.3 s, for bothPullRequestWatchReactor.sweepandPullRequestSyncReactor.sweep)The last of these reads only 356 rows (560 KB), so these are queue waits, not slow queries.
Database:
statev2.sqlite4.66 GB. Row counts by max(rowid):orchestration_eventsorchestration_command_receiptsorchestration_v2_projection_turn_itemsorchestration_v2_projection_nodesThe free list is 0, and the
-walfile sits at 32,177,232 bytes, just under the 32 MBjournal_size_limitfrom #23482.Git and pull request work in the same 20 minutes:
branchPullRequestrunGitCommandGitVcsDriver.readConfigValueA spaced
git.exespawn timing (the #25245 snippet) gave 3 to 7 ms here today, so slow spawns don't look like the cause on this machine at the moment.Pattern: the 14:00 cluster came as several agent threads were being started on this server within a few minutes. It is an orchestration-heavy install: one long-running manager thread starts helper and sub-agent threads all day.
Traces rotate in about 20 minutes, so I'm now keeping
server.trace.ndjsonaround each stall of 5 s or more. I can share a redacted window of one if that would help.Related: #23482, #25245, #19657, #24221.
Written with Claude Code (Claude Opus 5.5), following the t3 triage playbook.
ahatzz11 commentedon Nov 2, 2026
Note
🤖 Claude Opus 5.5 (Claude Code, via
t3 triage) responding on behalf of @ahatzz11Same symptom on macOS (Apple Silicon, Mac mini), desktop app nightly
0.1.7-nightly.20261102.4093(84537c4). Clients on the same Mac and on a MacBook Pro (same build, over T3 Connect) show "minibox is reconnecting / T3 Code on minibox did not answer" and "Syncing messages..." in the thread view. The sidebar also dropped running threads out of Working on the MacBook while the server still had them running.Stalls (
logs/event-loop-stalls.ndjson, 2026-11-02 UTC): ~30 stalls between 20:55 and 21:34, about one every 30–40 s, utilization 0.99–1.0, mostly 3–7 s, max 14.3 s (21:00:44) and 19.0 s (21:32:19). RSS stays at 83–190 MB. An earlier burst on 2026-11-01 09:53–10:11 had a max of 12.2 s.Not compaction here. No
ProjectionMaintenance.*span over 500 ms during 20:55–21:05.statev2.sqliteis 3.3 GB plus a 29 MB WAL.Relay (
relay-client.ndjson): during the stalls cloudflared logsdatagram manager error: timeout: no recent network activity,failed to accept QUIC streamandIncoming request ended abruptly: context canceled(see #17765).Secondary.
ServerSecretStore.get(1Password provider) takes 0–1.3 s outside stalls and 11–15 s inside them, so it looks like it gets stuck behind the stall rather than causing it.The desktop auto-updated to this nightly at 19:57 UTC. The first stall burst came about an hour later.
ShoT-UPfps commentedon Nov 3, 2026
Additional evidence from a Windows reproduction.
What happened
On November 2, 2026, between approximately 01:09 and 01:19 UTC, the Android T3 mobile app 2.2.0 repeatedly showed:
The phone was connected to T3 Code Desktop/server 0.1.6 on Windows.
Host evidence
The host database currently contains:
statev2.sqlite: 34.1 GBThe event log recorded server event-loop stalls up to:
The backend log also contains repeated startup failures with
database is lockedand readiness timeouts.Incident trace
During the reported window, the server remained alive and continued accepting activity, but WebSocket subscriptions were repeatedly interrupted and recreated:
orchestration.subscribeThreadinterrupted at 01:13:55 UTCsubscribeVcsStatussubscriptions interrupted at 01:14:55 UTCThere was no corresponding authentication failure or full server restart. The trace records normal
InterruptErrorcancellation, but not the initiating mobile/relay close code.The event-loop-stall log has no row covering the exact 01:09–01:19 UTC window, so I cannot prove which specific SQLite or maintenance operation caused that particular reconnect burst.
Diagnosis
This appears to be the same host-side event-loop/SQLite pressure pattern described by this issue, amplified by the mobile reconnect path. The database is substantially larger than the examples already reported here, and the server has documented multi-second stalls and lock contention.
Related upstream work
All three are still open and are not included in stable server 0.1.6.
Workaround
I switched the host background-activity profile to battery-saver, which reduces background polling. No database writes or repair actions were performed. A controlled restart may clear retained memory, but it was not attempted while active threads were running.
Environment: Windows x64, T3 Code Desktop/server 0.1.6, Android mobile app 2.2.0.
Prepared by GPT-6.1 Sol in T3 Code using the T3 triage playbook.
amoskueez commentedon Nov 3, 2026
Same symptom on macOS (MacBook Air, Apple Silicon, 32 GB), desktop app 0.1.6 stable, local client on the same Mac. The composer shows "Amos's Mac Air is reconnecting" several times a day.
Data point: the database is small, so DB size alone does not explain it here.
statev2.sqlite225 MB, WAL 9 MBserver.trace.ndjsonrotates its 10 MB file every 5–10 minutesToday (2026-11-03, UTC):
event-loop-stalls.ndjson:10:47:55Z delayMaxMs 4142, utilization 0.78, cpuUserMs 15156, cpuSystemMs 69314, involuntaryContextSwitches 392575, majorPageFaults 41. System CPU is about 4.5× user CPU.Remote environment endpoint http://127.0.0.1:3773/.well-known/t3/environment timed out after 10000ms(the client probing its own local server), plus 21×Amos's Mac Air is not connected.and 6×SocketReadError: An error occurred during Read.curlto/.well-known/t3/environmentreturns 200 in 2 ms.nick-potts commentedon Nov 4, 2026
Note
🤖 Claude Opus 5.5 (Claude Code, via
t3 triage) posting on behalf of the reporterSame symptom on Linux: server
0.1.4-nightly.20261027.3796as a systemd user service. Desktop and mobile clients connect through a cloudflared tunnel and both disconnect at random several times an hour. The host has plenty of CPU (24 cores, about 70% idle), but its 15 GB of swap was full.Evidence from
server.trace.ndjson*, about 8 minutes on 2026-11-04 around 01:10–01:18 UTC:sqlitespan latency (n=4,522)SELECT payload_json FROM orchestration_v2_projection_nodes WHERE node_id = ?,SELECT MAX(sequence) FROM orchestration_events …: 50 s or more eachbranchPullRequest/lookupBranchPullRequestGitVcsDriver.readConfigValueserver.trace.ndjsonrotationContext:
statev2.sqliteis 40.7 GB (9.94M pages of 4 KiB), withfreelist_count0 andauto_vacuum0. Details are in statev2.sqlite grows without bound (33 GB in 7 weeks): retention/compaction for orchestration events and turn items #28903.boot-service.logcontainsWARN PR cache disabled after clearing failed64,926 times, several times a minute.sqlite3dbstatscan was running against the live database during this window, the situation Any read transaction left open on statev2.sqlite freezes every server write once the WAL passes 32 MB #23482 describes. The freezes predate it, though:event-loop-stalls.ndjsonhas 935 entries between 10-19 and 10-30, up to 6.5 s.After updating to
0.1.7-nightly.20261104.4151(database unchanged at 40.7 GB, plust3 service protect), measured each minute for 15 minutes after the restart:sqlitep50sqlitep99sqlitemaxSo 0.1.7 is far better here, but stalls still happen occasionally, and the database keeps growing by about 100k events a day.
juliusmarminge commentedon Nov 12, 2026
This is the same problem as #30065, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.