Repository navigation
fix(server): child threads no longer flood the mobile thread list - #60
Merged
Merged
Conversation
The store mobile app has no Agents panel, so every child thread spawned through spawn_thread or Prism showed up in its thread list and buried the threads the user started. The server now leaves child threads (sub.<parent>.<suffix>) out of the shell it sends to mobile connections: the WebSocket shell snapshot, replayed and live shell events, the archived shell snapshot, and the HTTP shell snapshot, which looks up the surface the session last connected with. Web and desktop still get child threads for the Agents panel. No mobile build is needed; a phone drops cached children on its next connection because new sessions reload the HTTP snapshot. Until upstream Orchestrator V2 ships, child threads cannot be opened on mobile; they stay reachable from web and desktop. Done by Claude Opus 5.5 in Claude Code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
lukemaj
added a commit
that referenced
this pull request
Sep 28, 2026
Knip flagged three exports only used inside mobileShell.ts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lukemaj
added a commit
that referenced
this pull request
Sep 28, 2026
…63) * feat(server): threads resume on their own after a usage limit resets (#61) When a provider's usage limit stopped a thread, nothing brought it back: the user had to return after the reset and type "continue". Three threads stopped this way on 2026-09-28 alone. When a thread the user started fails while its provider instance has an exhausted usage window with a known reset (the data the Usage panel shows), the threads toolkit sends one "Continue. (Sent automatically after the usage limit reset.)" a minute after the latest reset. Starting another turn or archiving the thread first cancels it. Child threads are skipped: Model Router reroutes or blocks Prism jobs itself, and the planner decides what to do with a blocked job once it resumes. Pending resumes live in memory, so a server restart drops them. Upstream Orchestrator V2 has its own "Resume at reset", so this goes away with the V2 port. Done by Claude Opus 5.5 in Claude Code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs(fork): link #63 to the child-threads feature Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(server): keep the usage-limit settle delay private Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(server): keep mobile shell helpers private (#60 follow-up) Knip flagged three exports only used inside mobileShell.ts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #59.
The store T3 Code mobile app has no Agents panel, so every child thread spawned through
spawn_threador Prism landed in its thread list and buried the threads the user started.The server now leaves child threads (
sub.<parent>.<suffix>) out of the shell it sends to mobile connections (clientSurface=mobile):subscribeShell: snapshot, replayed and live shell events.getArchivedShellSnapshot./api/orchestration/shell, which looks up the surface the session last reported on its WebSocket connect (clients connect the socket before loading the shell over HTTP).Web and desktop still receive child threads for the Agents panel. No mobile build is needed: a phone drops cached children on its next connection, because new sessions reload the HTTP snapshot. The client only dedupes shell events by sequence, so skipped events are safe.
Tradeoff: until upstream Orchestrator V2 (pingdotgg/t3code#2829) ships, child threads cannot be opened on mobile. They stay reachable from web and desktop. V2's mobile app hides subagent threads natively, so this goes away with the V2 port.
Proof
vp test run src/mcp/toolkits/threads/mobileShell.test.ts: 3 passed (stream filtering per surface, session surface lookup against SQLite).vp test run src/server.test.ts -t "hides child threads from mobile": passes; fails with thews.tschange reverted.apps/servertypecheck clean; lint on changed files has no errors;scripts/fork-check.shOK.Done by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code