Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
This looks like #4589, which was closed on 13 Nov as fixed by #24400 (and #33244). It still happens on current versions, while the app shows the environment as connected, so I'm reporting it again with server-side evidence.
Area
apps/mobile (iPad thread list), possibly packages/client-runtime (shell state)
Steps to reproduce
No deterministic repro yet. It happens several times a day:
- Use the iPad app against a macOS host on the same LAN (route: LAN, signed in with T3 Connect). The app moves between foreground and background normally during the day.
- Start or continue turns in threads, from the iPad or from other clients.
- Look at the thread list.
Expected behavior
The thread list shows threads created on the server and moves finished threads out of Working, within a few seconds, while the environment is connected.
Actual behavior
The thread list stops applying shell updates while the open thread keeps streaming normally. Both of these were visible at the same time:
- A thread whose last run finished on the server at 19:37:06 local time was still listed under Working, with a timer counting from 19:32:00 (that thread's first run start). The thread view on the right, in the same app at the same time, showed the finished turn correctly.
- A thread created on the server at 19:42:20 local time (
thread.created, sequence 1435217) did not appear in the list.
Force-quitting and reopening the app restores the list.
What the server trace shows
All times are local (UTC+1). They come from server.trace.ndjson and the event table on the host.
The stale thread's runs (from orchestration_events):
| Run | Started | Finished |
|---|---|---|
| 1 | 19:32:00 (seq 1434646) | 19:33:32 (seq 1434864) |
| 2 | 19:34:55 | 19:35:06 |
| 3 | 19:36:47 | 19:37:06 (seq 1435016) |
The iPad's connections (each a /ws with clientSurface=mobile, clientDeviceType=tablet, clientAppVersion=2.3.0, connectionMethod=relay; this labels the T3 Connect DPoP credential, and every socket arrived directly from the iPad's LAN address):
- 19:33:02–19:37:49: one socket. The app fetched
/api/orchestration/shell?omitIdleSubagents=1&omitOlderSettled=1(a full snapshot, noresumeFrom) at 19:33:03. The server'ssubscribeShellon this socket ran 19:33:03–19:37:49 and produced 69projectShellItemsbatches, the last at 19:37:35. All three run completions above happened during this connection, and the first one came 30 s after the snapshot. - 19:41:02 onwards: a new socket, still open when the screenshot was taken. There was no HTTP shell fetch.
subscribeShelltook the resume path (readApplicationEventsplus a metadata-only snapshot), which means the client sentafterSequence. The client cancelled that subscription at 19:41:42 and opened a new one on the same socket (presumably the app-active wakeup resubscribe). The second subscription ran 19:41:42–19:42:37 and produced 35 batches, including ones at 19:42:20, 19:42:21 and 19:42:22.
The server was producing shell items on a live subscription at the times both missing updates happened. I can't see from the trace which threads each batch contained, so this does not prove the items reached the app. The list was wrong during a period with no disconnect (19:33–19:37), so this is not only the reconnect or background-resume case covered by #25449, #31829 and #32064.
Root cause
Not established. I read the current code (tag v0.1.12-nightly.20261125.5230): the server's coalesceShellApplicationEvents, bufferLatestLiveStream, skipUnchangedThreadShells and the resume path in subscribeOrchestrationV2Shell, and the client's applyLocked/applyShellStreamEvents in packages/client-runtime/src/state/shell.ts and shellReducer.ts. I found no defect in them. Two client-side places would discard shell items silently, with no error state, if their inputs went wrong:
applyItemsdrops every item whose session is notactiveSubscription.session.useEarlyLoadsetsactiveSubscriptiontonullwhensupervisor.preparedchanges to a connection thatsameConnectiontreats as different.applyShellStreamEventsskips every delta withsequence <= snapshot.snapshotSequence, so a cursor that runs ahead of the deltas freezes the list.
A client-side log of dropped items, or a counter for each of these paths, would show which one fires. I can capture one if a diagnostic build or log setting exists.
Impact
Major degradation or frequent failure. The thread list is the main way to see which agents are still working, and it is wrong several times a day.
Version or commit
- Host: T3 Code Nightly 0.1.12-nightly.20261125.5230 (service), macOS
- iPad app: T3 Code 2.3.0 (248), iOS 27.3, iPad19,2. I don't know which OTA bundle it was running. The runtime version policy is
fingerprint, so build 248 only takes bundles that match its native fingerprint.
Environment
macOS host running T3 as a background service. The iPad connects directly over the LAN, signed in with T3 Connect. An iPhone running 2.3.0 (248) is connected to the same host. Around 1,400 settled threads, and about 10 threads working at a time.
Workaround
Force-quit and reopen the app.
Activity
shivamhwp commentedon Nov 25, 2026
Thanks for the server trace. We haven't found the cause in the code yet, and we haven't been able to reproduce it. Two things only you can tell us:
Your answers will show which path to look at.
krzysztofgoworek commentedon Nov 25, 2026
Thanks for looking into this.
Direct connection: I haven't tested this yet. Every iPad and iPhone socket in today's server traces used
connectionMethod=relay(24 iPad and 11 iPhone sockets). The apps do reach the host's LAN and Tailscale addresses for/.well-known/t3/environment, but they always connected through T3 Connect. I'll move a direct route to the top of the list and report back on whether the stall still happens.Background and foreground: No, that doesn't bring the list back. Only force-quitting does. The trace in the report shows the same thing: the app reconnected on a new socket at 19:41:02 and resubscribed the shell on that socket at 19:41:42. Both subscriptions took the resume path (
afterSequence, no HTTP snapshot), and the list was still stale at 19:42. A force-quit seems to recover because it starts with a full snapshot, while a return from the background resumes from the cursor the app already holds.krzysztofgoworek commentedon Nov 25, 2026
Correction to point 1 of my previous comment: the stall happens on a direct LAN connection. I misread
connectionMethod=relayas the transport./wsupgrade in the server traces (25 from the iPad and 11 from the iPhone, 18:51–20:58 today) came from the device's own LAN address. Relay traffic would arrive from the local tunnel (127.0.0.1).connectionMethod=relayis set by the DPoP path inauthorization/service.ts, so it reflects the T3 Connect sign-in used as the credential. The bytes still travel directly over the LAN.So all the stalls in this report happened on direct LAN sockets. Background and foreground do not recover the list (point 2 still stands).
shivamhwp commentedon Nov 25, 2026
Thanks, the LAN correction matters: it rules out the relay as the cause.
One more question only you can answer, and it splits the cause between the server and the iPad app. While the iPad list is stale on the LAN, does the desktop or web app connected to the same Mac show the same threads as the server? Please check two things:
If both stay correct while the iPad is stale, the problem is in the iPad app's shell state. If they also go stale, it's in the server's shell stream or the code both clients share.
krzysztofgoworek commentedon Nov 25, 2026
I ran a controlled test over the LAN route, and it did not reproduce:
This was one background/resume cycle with a short gap, and the original stall also happened on a socket that stayed connected the whole time. The next time it happens on its own, I'll compare the desktop app before force-quitting and post the result here.