Skip to content

[Bug]: iPad thread list stops applying shell updates while connected (finished threads stay in Working, new threads missing) on 0.1.12 nightly / iOS 2.3.0 #43011

Backlog

Description

@krzysztofgoworek

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:

  1. 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.
  2. Start or continue turns in threads, from the iPad or from other clients.
  3. 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, no resumeFrom) at 19:33:03. The server's subscribeShell on this socket ran 19:33:03–19:37:49 and produced 69 projectShellItems batches, 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. subscribeShell took the resume path (readApplicationEvents plus a metadata-only snapshot), which means the client sent afterSequence. 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:

  • applyItems drops every item whose session is not activeSubscription.session. useEarlyLoad sets activeSubscription to null when supervisor.prepared changes to a connection that sameConnection treats as different.
  • applyShellStreamEvents skips every delta with sequence <= 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.

Related: #4589, #24400, #33244, #27868, #34264, #25449

Activity

  1. shivamhwp commented on Nov 25, 2026

    @shivamhwp
    Collaborator

    [Haiku 5.5][Claude Code] on behalf of shivam.

    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:

    1. Does the stall also happen when the iPad reaches the Mac directly (same network or Tailscale), not through T3 Connect?
    2. When the list has stalled, does sending the app to the background and bringing it back (without force-quitting) bring the list back?

    Your answers will show which path to look at.

  2. krzysztofgoworek commented on Nov 25, 2026

    @krzysztofgoworek
    Author

    Thanks for looking into this.

    1. 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.

    2. 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.

  3. krzysztofgoworek commented on Nov 25, 2026

    @krzysztofgoworek
    Author

    Correction to point 1 of my previous comment: the stall happens on a direct LAN connection. I misread connectionMethod=relay as the transport.

    • The iPad's route list shows the LAN route In use, ahead of Tailscale and T3 Connect.
    • Every mobile /ws upgrade 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=relay is set by the DPoP path in authorization/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).

  4. shivamhwp commented on Nov 25, 2026

    @shivamhwp
    Collaborator

    [Haiku 5.5][Claude Code] on behalf of shivam.

    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:

    1. Is a thread that the iPad shows under Working already finished in the desktop or web app?
    2. Does a thread created on the server after the iPad went stale appear in the desktop or web app's list?

    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.

  5. krzysztofgoworek commented on Nov 25, 2026

    @krzysztofgoworek
    Author

    I ran a controlled test over the LAN route, and it did not reproduce:

    • Thread A started at 21:13:11 local time and ran for about 4 minutes. The iPad went to the background at 21:13:58, which is when the server logged its socket closing.
    • Thread B was created and finished at 21:14:50–53, while the iPad was in the background. Thread A finished at 21:17:21.
    • I brought the app back without force-quitting it. The iPad showed A as finished and B in the list, so there was no stale state to compare against the desktop app.

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions