Repository navigation
Conversation
mwolson
force-pushed
the
contrib/ctm/compatible-active-steering
branch
from
October 1, 2026 12:38
99e5bfe to
9819940
Compare
mwolson
force-pushed
the
contrib/ctm/execution-selection-admission
branch
from
October 1, 2026 12:38
189b969 to
32c37ae
Compare
mwolson
force-pushed
the
contrib/ctm/compatible-active-steering
branch
from
October 1, 2026 14:13
9819940 to
adf7c52
Compare
mwolson
force-pushed
the
contrib/ctm/execution-selection-admission
branch
from
October 1, 2026 14:13
32c37ae to
a2bd3cf
Compare
mwolson
force-pushed
the
contrib/ctm/compatible-active-steering
branch
from
October 3, 2026 20:27
adf7c52 to
70793a4
Compare
mwolson
force-pushed
the
contrib/ctm/execution-selection-admission
branch
from
October 3, 2026 20:27
a2bd3cf to
77bc6cf
Compare
2 of 4 tasks
mwolson
force-pushed
the
contrib/ctm/execution-selection-admission
branch
from
October 4, 2026 03:12
77bc6cf to
aa97afa
Compare
mwolson
force-pushed
the
contrib/ctm/execution-selection-admission
branch
from
October 6, 2026 17:48
aa97afa to
f5e7184
Compare
mwolson
changed the base branch from
contrib/ctm/compatible-active-steering
to
contrib/main/provider-log-thread-files
October 17, 2026 14:24
2 of 4 tasks
mwolson
force-pushed
the
contrib/main/provider-log-thread-files
branch
from
October 17, 2026 14:24
40991f8 to
dcb7888
Compare
mwolson
force-pushed
the
contrib/ctm/execution-selection-admission
branch
from
October 17, 2026 14:24
66a48ef to
ce865e4
Compare
mwolson
force-pushed
the
contrib/main/provider-log-thread-files
branch
from
October 22, 2026 03:11
dcb7888 to
1ce492e
Compare
mwolson
force-pushed
the
contrib/ctm/execution-selection-admission
branch
from
October 22, 2026 03:11
ce865e4 to
1386bac
Compare
mwolson
force-pushed
the
contrib/ctm/execution-selection-admission
branch
2 times, most recently
from
October 24, 2026 00:11
652fa48 to
fcd19df
Compare
mwolson
force-pushed
the
contrib/main/provider-log-thread-files
branch
from
October 24, 2026 16:10
611c9b9 to
886f88f
Compare
mwolson
force-pushed
the
contrib/ctm/execution-selection-admission
branch
from
October 24, 2026 16:10
fcd19df to
878cfc8
Compare
mwolson
force-pushed
the
contrib/main/provider-log-thread-files
branch
from
October 29, 2026 11:33
886f88f to
f5a736f
Compare
mwolson
force-pushed
the
contrib/ctm/execution-selection-admission
branch
from
October 29, 2026 11:33
878cfc8 to
01e8ce1
Compare
Owner
Author
|
Dropped from the stack on 2026-11-15: its assertions fail on current upstream (b732621), but no real Claude, Codex or ACP session reached any of the states, so the bug was not reproduced. |
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.
Problem
When a provider start or a model change fails partway, T3 Code keeps trusting the selection it asked for, even though the provider may never have applied it. The thread's next turn can then run on the wrong model. A later selection change can replace a provider process that still holds output for the thread, so a finished background result is lost or labeled with a selection that did not produce it. A model change steered into a running Claude turn also leaves later wake-ups labeled with the old model.
Change
T3 Code now records, per provider binding, the selection the last acknowledged start actually ran. A failed or interrupted start invalidates that record, and only a trustworthy acknowledgment restores it. Selection changes, message dispatch and queued starts are planned from that record instead of from the thread's requested selection. After a start that failed partway, the next message opens a fresh session for the thread without resending the failed prompt, and other threads on the same provider process keep running.
A change that would replace a binding still holding undelivered output is refused with the existing "deliver it first" message, and a drain is offered, even when the selection that produced the output is unknown. A provider wake is never refused: it reuses its binding and its run is labeled with the selection that produced the buffered output when that is known. When a queued message is refused for undelivered output and a provider wake is already queued behind it, the wake runs first and the message keeps its place, then starts by itself once the wake ends.
Provider details that follow from the same rule:
Upstream now provides several parts this layer used to carry: the Claude boot deadline (pingdotgg#30166 claude-mcp-deadline-after-boot), ignoring Claude's model-switch echo (pingdotgg#34498 claude-set-model-echo), retiring refused wake offers (pingdotgg#28173 failed-claude-wake-dispatch), and the busy and background-work guards on selection changes (pingdotgg#22755 preserve-active-turns-on-switch, pingdotgg#35029 setting-change-keeps-background-work), which still run after this planning, unchanged.
Scope
Bug fix: later turns can run on a model the provider never acknowledged, and buffered output can be lost or mislabeled. No upstream issue describes the whole admission defect yet. Open neighbours cover parts of it: pingdotgg#36397 busy-session-handoff and issue pingdotgg#32296 busy-session-handoff-refusal for busy-session handoff, and pingdotgg#23082 runtime-mode-change-keeps-turn for a mode change. The layer is large (21 files); if offered upstream it would split into execution evidence with switch planning, buffered-output ownership and drains, and ACP forced reconfiguration.
Verification
Run on zbook26 under Node 26.13.1. Focused tests at the layer pass: 1,036 server tests across selection restart, OpenCode 2 integration, the Claude and ACP adapters, control reads, the session manager, the switch service and turn start, plus the provider-core, provider-acp, provider-grok and provider-muse packages. provider-opencode shows two
driver.test.tsfailures that fail the same way on the bare upstream base. The wholeorchestration-v2test directory also passes.With the layer's production files restored to upstream, 11 tests fail, including "plans a selection change from the selection that last ran, not a steered one", "opens a fresh session after a start that failed partway, without resending it", the
idle,queuedandqueued-wakerows of "drains output before changing selection", "refuses a selection change while a rollback-attached binding holds a follow-up", "re-sends the model on the turn after a live selection change fails", "applies a model change sent with a steer to the running turn", "buffers wake output and requests a single continuation run" and "keeps a buffered continuation current when a user turn starts before dispatch".No live provider was driven. The Claude, ACP, Grok, Muse, OpenCode and queue changes are covered by harness and replay tests only.
Known Limitations
stays open, a wake for output produced before the change fails to start with "Provider output
must be delivered first", and later wakes fail the same way.
applied its model, so a later wake can be labeled with that model. No user turn runs on the
wrong model, because each OpenCode 1 prompt carries its own model.
does not wait for the CLI to acknowledge initialization. Sessions with MCP, the normal case, get
upstream's five-minute deadline.
still fails with that message and the rest of the queue is held, as after any failed start. The
output is delivered by the drain that is offered; the user sends the message again.
when it is whole: the root's result is buffered, and nothing follows it except session-task
lifecycle turns that also ended. A partial wake, or one followed by a turn that started and did
not end, still needs a new process, and if that cannot start upstream retires the wake and drops
its frames.
process is gone, unless the buffer also holds its outcome.
selection. Its wake is labeled with the session manager's last acknowledged selection, or the
thread's selection, as for ACP. A wake buffer that already existed when the update failed loses
its label as soon as another frame joins it.
stays unknown until a later model write succeeds. Wakes in that state are labeled with the
session manager's last acknowledged selection, or the thread's selection. A session kept on
defaultorautonever re-establishes it.