Repository navigation
Conversation
The test fails on main. The completion run starts on the selection copied when it was queued, and the start writes that copy back to the thread.
A delegated-task completion is queued with no selection of its own, so its run stores a copy of the thread's selection. Starting on that copy reverted a model change made while the notice waited. Queued delegated completions now follow the thread's current selection and conversation, as queued PR-watch updates do since pingdotgg#21314.
f4llenz
force-pushed
the
fix/queued-run-keeps-thread-model-selection
branch
from
October 21, 2026 06:36
6febf86 to
282206f
Compare
f4llenz
marked this pull request as ready for review
October 21, 2026 06:37
Contributor
This branch has not been deployed
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
A delegated-task completion notice that waits in the queue reverts the thread's model when it starts. If the model changes while the notice waits, with the picker or
t3_thread_configure, the notice's turn and the turns after it run on the old model. The expected behavior is that the notice starts on the thread's current model and leaves it unchanged.Change
ProviderContinuationServicequeues the notice with nomodelSelection, somessage.dispatchstores a copy of the thread's selection on the run. At start,queuedRunModelSelectionreturned that copy, and the start wrote it back to the thread. A queued delegated completion now starts on the thread's current selection and conversation. #21314 gave queued PR-watch updates the same rule. The change adds one condition tofollowsCurrentConversationand drops a comment that named only monitor updates.Queued messages that a user sends carry the composer's selection and keep it, as #19376 intends.
The late-steer follow-up in
EffectWorkerpasses its run's selection when it dispatches. If that follow-up waits in the queue, it now also starts on the thread's current selection. If it starts at once, it uses its run's selection as before. The two selections differ only when the model changed while the steered run was active.Scope and approval
Fixes #22577, which has the diagnosis and the reproduction steps and is awaiting triage. The change also qualifies as a small, focused fix for an obvious bug. A notice that the app created reverted a model that a user or an agent had chosen. The fix applies #21314's rule to one more kind of app-owned queued update. It changes no contract, client, provider adapter or user-message behavior.
Verification
thread.model-selection-updatedevent with no command. Each event restored the enqueue-time selection over at3_thread_configurechange from about a minute earlier. A queued delegated-task completion reverts a model change made while it waited #22577 has the event log.runtimeLayer.test.ts, "starts a queued delegated completion on a selection set while it waited", queues a notice shaped likeProviderContinuationService's delivery. It then changes the thread's model, completes the active run and starts the queue. It has two cases, a model change on the same provider instance and a switch to another instance.main(4f651cb), both cases fail. The run starts ongpt-5.4instead ofgpt-5.5, andthread.modelSelectionreverts togpt-5.4.vp test runpasses 177 of 177 tests in the 8 related files:runtimeLayer,DelegatedCompletionDelivery,SteeringCompletion.integration,ProviderContinuationService,QueuedRunOrder,testkit/ProviderSwitch.integration,ClaudeAutomaticDelivery.integrationandEffectWorker.vp fmt --checkandvp lintpass on the changed files, apart from one existing warning on an untouched line.delegate_taskchild.Created with Claude Opus 5.5 in Claude Code (T3 Code).