Repository navigation
feat(delivery): a team conversation swaps a usage-limited seat to a free favorite - #190
Merged
Merged
Conversation
The orchestrator lineup footer gains "When a seat is limited" beside Critique round and Participants' access, on the same Select: Swap automatically (the default), Ask me, Leave it out. It is saved on the conversation's lineup, so it is read at the start of each turn and applies from the next message. A new conversation starts from the team profile's whenSeatLimited when the engine serves one. A board task's conversation does not show the control: its team's own setting decides there. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Provider settings gain a Favorites order list: the starred models across providers, first choice first, moved by drag or by the step buttons, on the pattern of the microphone order list. The order is what a limited seat's swap follows. Only the order is sent (setModelFavoriteOrder), so a favorite another client starred meanwhile is kept and a removed one is not revived. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…avorite NativeTeamChat's seat admission now treats a usage-limited model as unavailable. The signal is T3's own: the provider status windows, and the usage_limit failures of the conversation's seats and fork parents. What happens next is the conversation's setting: - Swap automatically: the seat's child thread starts on the first Favorite that is available, not limited, not on the limited model's account or provider family, not run by another seat or the lead, and, for a QA seat, not a builder seat's model. A note on the turn says which model stands in and why, and the seat's record carries substituteFor. - Ask me, or a model chosen by hand: the seat sits out with a notice naming the free favorite; a substitute the person agreed to is used. - Leave it out: the seat sits out. A seat is swapped once a turn: the critique round keeps the stand-in or the seat sits out. With no favorite free the seat waits with a notice. A board task's conversation is left to its team's own setting. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…avorite When a team conversation's lead fails a turn on a usage limit and the conversation swaps automatically, the server hands the work on: the old thread's limit-recovery resume is disarmed, the thread is forked from the failed run through the existing fork path, and the fork's first turn starts on the first free favorite. A fork onto another provider already carries the ContextHandoffService summary under its token budget, so nothing new summarizes. The fork keeps the team binding and the lineup. Every id follows from the failed run, so a repeat makes one thread. delivery.limitedSeats reports which seats and lead are limited and what could stand in; delivery.swapLimitedSeat is the one click, for a seat (it records the substitute the person agreed to) and for the lead (the hand-off). Both are refused for a model that is not a free favorite. An orchestrator test runs the hand-off commands twice against a real failed usage-limit run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Beside the usage limit banner, a team conversation now says which of its seats or its lead has reached a limit and what T3 can do about it. Under Ask me, or for a model chosen by hand, the notice names the first free favorite and swaps to it in one click, built like the provider Fix button: off while it runs, hidden where threads cannot be run, and backed by a command that is safe to repeat, so a second press makes no second thread. With no favorite free the notice says the seat or the conversation waits. A lead that was handed on links to the thread it continues in. Mobile shows the same notices from the same wording and follows the thread's setting; the setting itself is chosen on the desktop or web. A seat's card in the timeline says when a substitute ran in its place. The notices are read from delivery.limitedSeats and follow the thread's latest run through the query's refresh trigger. New strings are in every web and mobile catalog, machine-translated. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…m; document the setting A run's failure and its usage-limit error are separate events and may land in either order, so the hand-off worker now reacts to both. The hand-off is safe to repeat, so the second event changes nothing. The composer guide gains a paragraph on When a seat is limited and Favorites order. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ces stay current A limited lead handed on to a linked thread could still be re-armed from the old thread's recovery banner, so the same work would run in two threads. The orchestrator now refuses to arm a resume for a run that continues in a linked thread, records the worker's own arming of one as disarmed, and starts no resume for it. The web banner and the mobile card offer no resume or snooze once the continued thread exists. The limited-seats read now refreshes when the lineup or its setting, Favorites or a provider's status changes, and when the continued thread appears or starts, on web and mobile. After an automatic hand-off the old thread named the limited model, because the fork carries its source's model until its first turn lands. The status now names the model the hand-off started. A retried hand-off also no longer sends its first turn on the limited model, and the old thread drops its seat offers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…width Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…, and say who stood in The notes wrote model ids and raw ISO times. They now use the provider's display names and a readable reset time with its zone. A seat's contribution also says which model it stood in for, so the lead can attribute it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…in on The notice and the swap built a seat's pool without what other seats run on, so a model one seat already stood in on by agreement was offered to a second seat, the swap was accepted, and the next turn left that seat out. The notice, the swap and the turn now read another limited seat through one helper, agreedStandIn, and count its agreed substitute as in use. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s no message The composer of a handed-on thread still read Resume thread, and one press ran the limited run again beside its linked thread. The orchestrator now refuses every message sent to a thread whose latest limited run continues in a linked thread, from a person, the CLI or a tool, with one sentence; its own follow-ups settle quietly there and start nothing. Deleting the linked thread reopens it. The web and mobile composers show a notice with a way to the linked thread, disable the send and offer no resume. The notice is translated by the model in the ten catalogs; no native speaker has read it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…m its queue A queued run starts through startNextQueuedRunOnce, which the message guard never saw. It now starts none while the thread's latest limited run continues in a linked thread, for every caller: queue.resume, queued-run.start, a runtime mode change, recovery, wakes and run-end handlers. The two explicit commands are refused with the sentence the message refusal uses. A delegated task's result for a run that was handed on is disposed, as on an archived parent: no wake, no run, no error on the delivery. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
# Conflicts: # apps/server/src/ws.ts # packages/contracts/src/delivery.ts
14 tasks done
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.
The problem
When a model in a team conversation reaches its usage limit, the seat's turn simply fails, and a limited orchestrator stops until its window resets. This is the plain-chat half of board revamp slice 4: a conversation setting for what a limited seat does, and the swap behind it.
The setting and its scope
When a seat is limited is a thread-level setting with three options: Swap automatically (the default), Ask me, Leave it out.
Select.DeliveryOrchestrationConfig.limitedSeat), which the server reads at the start of each turn, so it applies from the next message. Absent means swap automatically.whenSeatLimitedwhen the engine serves one (see gaps).picked) and is never swapped without asking, whatever the setting; its notice still appears.isServerOwnedThreadLineage).The pool rule, as implemented
One pure function,
limitedSeatCandidatesinpackages/shared/src/limitedSeat.ts, used by the server for the swap and for the notices.A seat is limited when the provider's status shows an exhausted usage window for its model (
exhaustedUsageWindow), or when a turn of this conversation failed on it withlastErrorClass: "usage_limit"and ausageLimitResetAtstill ahead. Those failed turns are the conversation's own seats and its fork parents.The substitute is the first Favorite, in the person's order, that is none of:
unavailablelimitedsame-accountin-usenot-independentNothing outside Favorites is ever picked. With none free the result is a visible notice and the seat waits.
What each option does
teamChat.substituteFor. A limited lead is handed on: see below.One swap a turn, never a loop: the critique round keeps the stand-in chosen for the contribution round, or the seat sits out if that one is limited too. A mid-turn limit fails the turn as today.
The lead hand-off.
leadHandoffCommands(inapps/server/src/delivery/LimitedSeatSwap.ts) issues, in order: the old thread's limit recovery is disarmed (autoResume: false), the thread is forked from the failed run, and the fork's first turn starts on the substitute with "Continue where you left off.". The fork is bound to the same team and carries the lineup. The old thread stays readable and links to the new one. Every id follows from the failed run, so a double click, or the worker and a click together, make one thread. Under Swap automatically a worker does this as soon as the turn fails.Favorites order
Favorites could not be reordered across providers. Settings, Providers now has a Favorites order list (drag, or the step buttons), on the pattern of the microphone order list. It sends only an order (
setModelFavoriteOrder), so a favorite another client starred meanwhile is kept and a removed one is not revived. No new page and no new catalog.T3 pieces reused
Select: the dropdown is a third instance of the one Critique round and Participants' access use.size="xs" variant="outline", off while it works, hidden without the operate scope, a toast on failure.ComposerBannerStackItems placed directly after the usage limit banner. On mobile the card sits underUsageLimitRecoveryCardand borrows its layout.thread.forkfrom the failed run.create_with_handoffpath: a fork whose first turn runs on another provider already gets the portable handoff summary under its token budget; nothing new summarizes.thread.metadata.updatelimitRecoverycommand, and the test uses its ownlimitRecoveryCommandto prove no resume follows.whenSeatLimited).exhaustedUsageWindow,isProviderAvailable,resolveProjectProviderInstanceEnabled, and the thread shell'slastErrorClassandusageLimitResetAt.MicrophoneOrderList: the pattern for the Favorites order list.Nothing fitted for provider family across harnesses: the web's
modelFamilyonly picks logos, somodelAccountFamilyin shared is new.What was verified, and how
Targeted tests and typecheck only, per the brief.
packages/shared/src/limitedSeat.test.ts, 11 tests): each exclusion on its own row, the order, none free, both limit signals.NativeTeamChat.test.ts, 8 new): the swap and its note, one per turn (stand-in limited before critique; stand-in kept while free), none free, manual pick stays, Ask me and the agreed substitute, the setting read each turn and its default, board-owned left alone.LimitedSeatSwap.test.ts, 9): order of the hand-off, the recovery disarm (asserted with the recovery worker's ownlimitRecoveryCommand), one thread for repeated swaps, none free, a non-favorite refused, the unbound conversation, the seat swap, and the two ungoverned cases.runtimeLayer.test.ts, 1 new): a thread failed on a usage limit; the hand-off commands dispatched twice; the result is one forked thread with fork lineage from the failed run and one run on the other provider instance, and the old thread no longer resumes.serverSettings.test.ts, 1 new): reorder without dropping or reviving a favorite.orchestratorChat.test.ts3 new;OrchestratorLineup.browser.test.tsx1 new;LimitedSeatNotices.browser.test.tsx3;limitedSeatNotices.test.ts4): the default and the profile default, the footer dropdown saving and hidden on a board task, the notice naming the favorite, one command for two presses, the no-free notice, the hand-off link.node scripts/i18n-check.ts: catalogs match in web, mobile and desktop.vp run check:changed(it ran the wide set, because two package manifests changed): format, lint, knip, GraphQL, typecheck of 43 packages and the React compiler check pass. Tests: 752 of 755 passed. The three that did not are timeouts, none in code this PR adds:apps/web/src/state/delivery.test.ts, two cases, timed out at their module load during the wide run and pass when the file runs alone (41 of 41).ChatView.browser.test.tsx"a shortcut conditioned on rightPanelOpen sees the thread's open right panel" fails when its whole file runs and passes alone. It fails the same way on untouchedorigin/master(360306b), checked in a temporary worktree.Not verified:
Capability gaps
whenSeatLimited(swap,ask,skip) from the team it is given and ignores anything else, so the default is Swap automatically until the engine half adds the field. The field name is this PR's guess and is a one-line change if the engine chooses another.duty. A conversation with no team has no QA seat, so the QA rule does not apply there.Deferred
lead-pickroute, account limit records, and the team setting itself.boardThread. This PR does not touchdelivery/BoardTaskThreads*,boardThread*,taskConversationor the archive door, and is based on master, not on feat: a started board task gets its own conversation, bound to the engine's link #189.Built by Claude Fable 5.2 in Claude Code.
🤖 Generated with Claude Code
QA: independent pass, 2026-11-22 (head a777e75)
Independent QA on a separate model from the builder. No product code changed, nothing pushed or merged. Run in a worktree at the head with one web dev server (seeded sandbox
.t3, delivery turned on and pointed at a dead engine URL so no real engine was contacted), then the PR's test files one at a time with the server stopped. The Mac's swap was near full the whole time; the server logged event-loop stalls of up to 20s but nothing crashed.How the limits were reached. No seeding was needed. The sandbox's Codex account really is at its weekly limit (resets 2026-11-23 02:00 UTC), so a Codex seat is limited through the provider's own usage window, and a Codex lead's run really fails with a usage limit. That let me exercise the automatic lead hand-off from a real failing run, not only through the button. Substitutes were a local "Replay (dev)" provider (free) plus Claude Haiku 5.5 for the lead and one seat. Only Codex and Claude can be team seats in this sandbox, so all conversations are teamless (no engine, so no teams).
Verdict: pass with findings, 0 blocking
Results by plan item
limitedSeat: "ask"on the lineup and survived a reload. Ordinary chat: no control or notice seen, but only checked before delivery was on. Board task conversation: not reachable without an engine (browser test only).limited-lead:run:thread:7bf8e41d...:ordinal:1on showcase with one "Continue where you left off." message; the client opened it; the old thread'slimitRecovery.autoResumeisfalse.daadbcad...intolimited-lead:...:ordinal:1: "Forked from conversation", context handoff "6 Astra to Showcase", first turn ran on Showcase, the lineup came along, the old thread shows "Continued on Showcase" with Open thread and its recovery is disarmed. See finding 2 for a wrong model name on first render.substitute: devReplay/showcase(one write for a fast double-click), the notice reads "custom-1 runs on Showcase", and the next message ran custom-1 on showcase in both rounds with the note "custom-1 runs on showcase this turn: gpt-6-astra has reached its usage limit until ...". The seat record carriesteamChat.substituteFor(checked in the projection).NativeTeamChat.test.ts. The order half was checked live through the offer: after moving "Plan and reads" above "Showcase" in Settings, the seat notices offered "Plan and reads".limitedSeat.test.ts11/11,limitedSeatNotices.test.ts4/4,orchestratorChat.test.ts14/14,LimitedSeatSwap.test.ts9/9,NativeTeamChat.test.ts34/34,LimitedSeatNotices.browser.test.tsx3/3,OrchestratorLineup.browser.test.tsx8/8. AlsoruntimeLayer.test.ts -t "hands a limited lead on"1/1.Findings, most severe first (none blocking)
limitedSeatsquery's refresh trigger is only the lead thread's latest run (packages/client-runtime/src/state/delivery.ts), and nothing else invalidates it. Repro: in a conversation showing "Swap to Showcase" for a seat, change "When a seat is limited" to Leave it out; after 7s the Swap button is still offered (the lineup file already saysskip); it disappears only on reload. The reverse, Leave it out to Ask me, shows no notice until reload or the next message, so the person sends, the seat sits out, and only then sees the button. Same after reordering Favorites or disabling a provider: I reloaded each time to see the new offer. Fix idea: refresh the query on lineup change and on settings or provider status change.statusreportscontinued.modelSelection, which the fork inherits from its source until its first turn updates it, and the client does not read again after that. Self-corrects on reload or the next run, but names the wrong model in the very notice meant to explain the swap.DELIVERY_HARNESS_BY_DRIVER). Here Replay (dev), anacpRegistryprovider, was offered and ran both a seat and a handed-on lead. It worked natively, so this is a consistency question: either the pool should share the pickers' filter, or the pickers are stricter than they need to be. Owner's call.Could not verify
OrchestratorLineup.browser.test.tsx.substituteFor, but the rows I could hover after the turn were in the lineage panel, which does not show it.Screenshots
/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws2fwgx-231ebb15.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws2gdje-eb60f501.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws2j2w0-86a577b1.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws2m9u7-51683466.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws2t92k-54ed6d17.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws2up4q-74cf3a34.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws2wh0s-33cfebda.pngQA by Claude Opus 5.5 in Claude Code.
Fix round 1, 2026-11-22 (on top of a777e75)
Three commits, pushed on top of the QA head. Finding numbers are QA's; letters are the fix round's.
e3289adb13thread.metadata.updatethat would arm a resume for a run that continues in a linked thread ("This conversation continues in a linked thread. Open that thread instead of resuming this one."), records the recovery worker's own arming of such a run as disarmed, and starts no run for a resume that still reaches it. (Corrected in fix round 2: this held only for the automatic resume at reset. A manual resume from the composer still started a second run on the old thread; see fix round 2.) Clients: the web recovery banner and the mobile recovery card offer no Resume and no Snooze once the continued thread exists. Detection is the hand-off's own: the threadlimited-lead:<runId>(limitedLeadHandoffThreadId, moved to@t3tools/shared/limitedSeatso the server and both clients share it). No new state field. A deleted continued thread does not block the old thread's resume, which is then the way on.e3289adb13threadBinding,serverEnvironment.settingsValueAtom,providersValueAtom). A usage window merely filling does not refetch.e3289adb137bd2568dd4e3289adb13,56a57e0417Nits
e3289adb13). The old thread runs no more turns, so once its lead is handed on its status carries only the "Continued on" notice. On the new thread the seats are still read against their own limits (and the parent's), so a seat that is limited there keeps its offer.56a57e0417). Notes use the provider's display names. The reset is written as a short date and time with its zone, in the server's zone: the server cannot know each reader's clock or time-format setting, so it names the zone instead of guessing.56a57e0417). A seat's contribution header now reads<instance>/<model>, standing in for <limited model>, which reached its usage limit, where the lead and the critique round read it.Ruling, no change (F)
QA finding 3: a favorite that cannot be picked as a team seat (the Replay dev provider) can still become a substitute. The owner ruled that the swap pool is the person's Favorites and nothing else, so the pool is unchanged.
Coverage for what QA could not verify live (G)
No new tests were needed; each is already covered:
OrchestratorLineup.browser.test.tsx(boardOwned), and the server does not govern it (LimitedSeatSwap.test.ts, "does not govern a board task's conversation").policy: nullfor it (LimitedSeatSwap.test.ts, "does not govern an ordinary chat") and the client shows nothing for that answer (limitedSeatNotices.test.ts). The control itself lives only in the lineup panel, which an ordinary chat does not have.NativeTeamChat.test.ts(the default-setting swap test, now also checking the stand-in attribution).limitedSeat.test.ts, "keeps a QA seat off the builder's model, on any account".Tests added
runtimeLayer.test.ts(re-arm refused, snooze still allowed, a resume starts no run; the worker's arming recorded disarmed),LimitedSeatSwap.test.ts(substitute named from the dispatched turn, and while the fork has no turn; old thread drops seat offers).state/delivery.test.ts(one case per refresh trigger, a real refetch on lineup, Favorites, provider and hand-off changes, and the hand-off detection).UsageLimitRecoveryBanner.test.tsx(no actions once handed on),OrchestratorLineup.browser.test.tsx(footer fit).UsageLimitRecoveryCard.test.tsx(no Resume or Snooze once handed on).Checks run
Targeted only, one batch at a time, no dev server. Every test file importing a changed module:
TypeError: statement.stat is not a function(Orchestrator.control-reads.test.tstwice,ProjectionStore.test.tsonce): anode:sqlitecall this machine's Node (v24.21.0) does not have, in tests this round did not touch. Not checked on another Node.ChatView.browser.test.tsx, "a shortcut conditioned on rightPanelOpen sees the thread's open right panel", times out when the whole file runs. It fails the same way with the QA head'sChatView.tsxandstate/delivery.tsput back, and passes alone with or without this round's change, so it is not from this round.limitedSeat.test.ts(11), mobileUsageLimitRecoveryCard.test.tsx(8): all pass.Not verified
Fix round by Claude Fable 5.2 in Claude Code.
QA spot check of fix round 1, 2026-11-22 (head 56a57e0)
Independent QA, a separate model from the builder. This covers only what the fix round changed; the earlier QA pass stands for the rest. No product code changed, nothing pushed or merged. Same setup as before: worktree at the head, one web dev server on the seeded sandbox, delivery on and pointed at a dead engine URL, no engine. Codex was still at its weekly limit (resets 2026-11-23 02:00 UTC), so it was the real limited provider again. Substitutes were the free Replay (dev) models.
Verdict: fail, 1 blocking
Results
daadbcadand7bf8e41d).devReplay/todo-list(Plan and reads). No reload.Findings
daadbcad(handed on tolimited-lead:run:thread:daadbcad-...:ordinal:1), with an empty draft the send button is labelled "Resume thread" (ComposerPrimaryActions.tsx:390,ChatComposer.tsx:1336; Enter does the same). One press dispatched a turn withmanualContinuationOfRunId= run 1, and the server accepted it: run...daadbcad...:ordinal:2started on Codex GPT-6-Astra, hit the limit again, and the automatic hand-off fired again into a second linked thread,limited-lead:run:thread:daadbcad-...:ordinal:2, which completed on Plan and reads. So the old thread no longer has exactly its original run, and the conversation was continued twice in two linked threads. Cause:runHandedOnguards the recovery update andusageLimitContinuationOfRunIdbut not themanualContinuationOfRunIdcheck (apps/server/src/orchestration-v2/Orchestrator.ts:7255). The client gates only the banner (handedOninUsageLimitRecoveryBanner), not the composer'scanResume. Fix idea: refuse a manual continuation of a handed-on run with the same message, and drop the composer's resume whilelimitedLeadHandedOnis true. The same "Resume thread" button is also on the other old thread,7bf8e41d(not pressed). Here the provider was still limited, so the duplicate ended in a second hand-off; with a provider that had recovered, the old thread would have done the work itself alongside the linked thread.limitedSeatPoolwithoutrunsOn(apps/server/src/delivery/LimitedSeatSwap.ts:238and:362), so a substitute already covering another seat is not counted as in use; the turn path passes it (NativeTeamChat.ts:350). I missed this in the first pass.Could not verify
thread.metadata.updatewithlimitRecovery.autoResume: true: there is no CLI for it and I did not hand-craft a WebSocket command. Covered by the round'sruntimeLayer.test.tsonly. The banner offers no route to it.usageLimitContinuationOfRunId): needs the reset to pass; tests only.Screenshots
/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws4ub0e-780ad59d.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws4v9mx-8c6a5047.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws4wl4v-c3ce2b62.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws4z4ud-bf6a53ef.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws518lw-33bd68ae.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws52qok-2e305307.pngSandbox state left behind: the extra run on
daadbcad, the deleted second linked thread, and three spot-check turns onlimited-lead:run:thread:7bf8e41d-...:ordinal:1, whose seats now both carry Plan and reads as their substitute. Favorites order and Replay (dev) were restored.QA spot check by Claude Opus 5.5 in Claude Code.
Fix round 2, 2026-11-22 (on top of 56a57e0)
Two commits, pushed on top of the spot-check head. QA's blocking finding 1 and its non-blocking finding 2.
37dfbec076message.dispatchto it (a typed message, the composer's Resume thread, the CLI, MCP tools, a steer, a scheduled task, a queued continuation from a metadata update) withOrchestratorThreadHandedOnError: "This conversation continues in a linked thread. Open that thread instead of resuming this one." It is the sibling of #187'sOrchestratorThreadArchivedError, sits indispatchMessagewhere the thread's runs are already loaded, and is inThreadMessageIntake's not-accepted list, so a refused send keeps its draft and attachments. The server's own follow-ups (a usage-limit or restart continuation, a steer follow-up, a notification, an idle compaction) are not refused: each settles quietly on such a thread and starts no run. The key isrunHandedOnon the thread's latest executed run when it failed, so deleting the linked thread reopens the old one. Cost on the ordinary path: nothing unless the latest run failed, then one lookup by id. Web: the composer of a handed-on thread shows the notice "This conversation continues in a linked thread" with Open thread, its send is disabled with that reason, andcanResumeis false, so the button no longer reads "Resume thread" and Enter on an empty draft resumes nothing. Mobile: the same notice card with Open thread above the composer, the send blocked with that reason, and no Resume action.bd56252fffagreedStandIninpackages/shared/src/limitedSeat.ts: what a limited seat stands in on by agreement (its agreed substitute, where the seat asks before it swaps). The status read and the swap now pass it tolimitedSeatPoolasrunsOn, so a model another limited seat already agreed to isin-use: it is never offered, and a swap to it is refused with " is no longer free. Choose again from the notice." The turn reads other seats through the same helper, so a seat earlier in the roster is not offered a later seat's agreed substitute either; before, the turn only counted seats it had already started.Earlier claims this corrects
T3 pieces reused
OrchestratorThreadArchivedError,refuseArchivedThreadMessageand itsThreadMessageIntakeentry are the pattern for the server half. The two now share one predicate,isServerFollowUp, for what counts as the server's own follow-up.ComposerArchivedThread(the banner item and the send-disabled reason):ComposerHandedOnThreadis its sibling, placed in the same slot of the composer banner stack and ofsendDisabledReason.Button size="xs" variant="outline", the existing "Open thread" string and the same navigation) for the action; on mobile the limited-seat card'sNoticeActionand its stack push.limitedLeadHandedOnfrom fix round 1 for detection on both clients. No new state field and no new RPC.Tests added
runtimeLayer.test.ts, the existing hand-on case extended): on the old thread a manual resume (manualContinuationOfRunId), a typed message and the send the CLI and tools make are each refused withOrchestratorThreadHandedOnErrorand the sentence; the thread keeps exactly its original run and its one message; afterthread.deleteof the linked thread a message is accepted and starts a second run.ChatView.handedOnSend.browser.test.tsx, mirroringChatView.archivedSend.browser.test.tsx): on a stopped thread that was handed on, the notice is visible, there is no "Resume thread" button, Enter on an empty draft and on a typed draft sends nothing, the send is disabled with the reason, and Open thread opens the linked thread. A stopped thread that was not handed on still shows Resume thread and still sends.LimitedSeatSwap.test.ts): with two limited seats, once the first agrees to a model the second is no longer offered it, and a swap to it is refused as no longer free and writes nothing.NativeTeamChat.test.ts): a seat earlier in the roster is not offered the substitute a later seat agreed to, and the later seat runs on it.Checks run
Targeted only, one batch at a time, no dev server. Every test file importing a changed module:
Orchestrator.control-reads.test.tswithTypeError: statement.stat is not a function, the samenode:sqlitegap on this machine's Node that fix round 1 recorded.ChatView.browser.test.tsx, "a shortcut conditioned on rightPanelOpen sees the thread's open right panel", the timeout already recorded as failing on untouched master.limitedSeat.test.ts(11) and client runtimestate/delivery.test.ts,limitedSeatNotices.test.ts(11): all pass.i18n:checkclean. Format, lint and knip clean on the commit hooks.Not verified
t3binary or throughThreadManagementService.sendToThread, which adds nothing between.gt generaterewrote them.Fix round 2 by Claude Fable 5.2 in Claude Code.
Fix round 3, 2026-11-22 (on top of 37dfbec)
One commit,
b503edd078. The lead's review of fix round 2 found that the message guard covered onlymessage.dispatch.b503edd078startNextQueuedRunOnce, which the message guard never saw. Beside its archived and deleted check it now starts no queued run while the thread's latest executed run is failed and continues in a linked thread. That is the one place every caller passes:queue.resume,queued-run.start, a runtime mode change under a ceiling, recovery at server start, wakes and run-end handlers. The two explicit commands are also refused in their handler withOrchestratorThreadHandedOnErrorand the same sentence, "This conversation continues in a linked thread. Open that thread instead of resuming this one.", so a CLI or tool caller learns why. Automatic callers settle quietly. Deleting the linked thread gives the queue back. One detection,handedOnTo, now serves the message guard, the queue and the two commands.b503edd078message.dispatchinstead of being refused.What the queue gap really was
Reading the code for the test showed the gap is narrower than the review described, and the guard is still right. While the limited run is the thread's latest executed run,
usageLimitHoldsQueuealready holds a queued run on the same provider, for the explicit commands and for the automatic callers, before and after the reset (queue.resumeanswers "Continue the limited thread before resuming its queue."). What was open is a queued run whose provider is not the limited one: nothing held it, so any of those callers started it on the old thread. The test builds exactly that case.Tests added
runtimeLayer.test.ts, "the queue of a handed-on thread"): a message is queued behind the limited run, the hand-off happens, and the queued run is one the limit does not hold.queue.resumeandqueued-run.startare each refused with the error and the sentence; a runtime mode change andresumeQueuedRunsstart nothing; the old thread keeps its failed run and its queued run, still queued. Afterthread.deleteof the linked thread,queue.resumestarts the queued run. Checked both ways: with the choke-point guard removed the mode change starts the run, and with the handler refusal removed the commands are not refused.RemoteDelegatedTask.test.ts): a task whose parent run failed and was handed on completes with its result recorded, its deliverydisposed, no new message, no new run and no offer. Without the fix the delivery isclaimed.Checks run
Orchestrator.ts, 64 files in one batch capped at four workers: 2033 pass, 2 skipped, 2 fail. The 2 failures areOrchestrator.control-reads.test.tswithTypeError: statement.stat is not a function, thenode:sqlitegap on this machine's Node recorded in rounds 1 and 2.Not verified
t3binary; proven by tests only.Orchestrator.control-reads.test.tscannot run on this machine, and one of its two cases ("starts, finishes and follows up a task without reading the parent's history") measures the reads of the path B touches. B was written to add none on a live parent run (it looks up the linked thread only when the spawning run failed), but that test did not confirm it here. CI will.Fix round 3 by Claude Fable 5.2 in Claude Code.
QA re-check of fix rounds 2 and 3, 2026-11-22 (head b503edd)
Independent QA, a separate model from the builder. A focused re-check of my blocking finding and of the paths added since; the earlier QA sections stand for the rest. No product code changed, nothing pushed or merged. Same setup: worktree at
b503edd078, one web dev server on the seeded sandbox, delivery on and pointed at a dead engine URL, no engine. Codex was still really at its weekly limit (resets 2026-11-23 02:00 UTC), so no seeding was needed. Commands the UI does not expose were sent from the page over the client's own WebSocket (orchestration.dispatchCommand,delivery.swapLimitedSeat), with the same payloads the client builds. The server logged event-loop stalls of up to 18s; nothing crashed.Verdict: pass with findings, 0 blocking
My blocking finding is fixed: the handed-on thread has no Resume thread, and every route I could reach to start a run there was refused or started nothing.
Results
7bf8e41dlimited-lead:run:thread:7bf8e41d-...:ordinal:1.t3 thread send(the CLI, through the server'st3_thread_send): "Unable to send to thread ...: This conversation continues in a linked thread. Open that thread instead of resuming this one." Over the socket, refused with the same sentence:message.dispatchwithmanualContinuationOfRunId(the route of my finding), a typed message queued after active, a steer,queue.resumeandqueued-run.start. AusageLimitContinuationOfRunIddispatch was accepted and athread.runtime-mode.setsucceeded; neither started a run, as designed. Afterwards the thread still had exactly 1 run (failed, Codex) and 1 message.daadbcad(reopened earlier) I sent message A on Codex and, before it failed, queued B on Codex and C on Replay (Plan and reads), which is the case fix round 3 closed. A failed on the limit and handed on tolimited-lead:run:thread:daadbcad-...:ordinal:3(completed on Replay). B and C stayed queued and started nothing on their own, including after the run-end handlers and a wait.queue.resume,queued-run.starton B and on C were each refused with the sentence. Two runtime mode changes started nothing. The queued rows' Send now was refused with a toast carrying the sentence (finding 1). After deleting the linked thread, the limited-lead notices and the seat Swap buttons came back;queue.resumethen answered "Continue the limited thread before resuming its queue." because B (Codex) heads the queue, which is the existing limit hold;queued-run.starton C started it and it completed on the old thread.RemoteDelegatedTask.test.tsonly.delivery.swapLimitedSeatof custom-2 to Showcase was refused: "showcase is no longer free. Choose again from the notice." (finding 2).daadbcadtook a typed message from the composer and ran it (run 6, completed). The offer order follows Favorites: Plan and reads is the lead's own model on that thread, so seats were offered Showcase, then Multi turn, the next Favorites in order. I did not reorder Favorites again this round.LimitedSeatSwap.test.tsandNativeTeamChat.test.ts: 47 of 47.ChatView.handedOnSend.browser.test.tsx: 2 of 2.Findings (none blocking)
daadbcadwhile handed on, each queued row showed Send now (and edit and cancel). Pressing it showed "Could not send queued message: This conversation continues in a linked thread. Open that thread instead of resuming this one." and started nothing. That is safe, but the composer hides its resume there, so the queue could hide or disable Send now too.Could not verify
/mcp(it needs an MCP client session). The CLI path coverst3_thread_send;t3_queue resumewas checked only as thequeue.resumecommand it dispatches.Screenshots
/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws7n8uy-3a439be0.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws7np2j-515af93e.pngdaadbcad:/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws7u0pi-8aa3ba74.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws7ua6a-ba8f25d7.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws7w304-d72b3f59.png/Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws7wzpq-a4fcbde0.pngSandbox state left behind: on
daadbcad, runs 3 to 6 and queued B (Codex, still held), the deleted linked thread for run 3, and custom-1 agreed onto Showcase. A one-off bearer session labelledqa-recheck(2h TTL) was issued on the sandbox server and its token file deleted.QA re-check by Claude Opus 5.5 in Claude Code.