Repository navigation
Send the composer's execution selection with steers - #2149
Merged
Merged
Conversation
The web composer, side chat, and mobile composer kept the model, reasoning,
permission-mode, and service-tier picker editable while a turn ran, but the
Cmd+Enter / long-press steer request posted only {input, mode:
"steer-if-active"}. The server fills omitted execution fields from the
thread's last execution, so the steer was stored and dispatched with the
active turn's tuple while the picker showed the new one.
buildSteerFollowUpRequest now takes the same execution selection as the
auto-send and queue builders and spreads it into the request; every caller
passes it. No server, daemon, or wire change: SendMessageRequest already
accepts these fields for every mode.
Fixes #1860
Co-Authored-By: Claude <[email protected]>
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.
What was wrong
The follow-up composer keeps its model / reasoning / permission-mode picker editable while a turn runs, but the steer gesture (Cmd+Enter on web, long-press on mobile, Cmd+Enter in the side chat) posted only
{input, mode: "steer-if-active"}.buildSteerFollowUpRequestinpackages/client-core/src/prompt/threadDetailPromptSubmission.tswas the only follow-up builder that did not spreadbuildSharedThreadExecutionRequestFields(execution); its siblingsbuildAutoFollowUpRequestandbuildCreateQueuedFollowUpRequestdo. Withmodel/reasoningLevelomitted, the server'sbuildExecutionOptionsresolves them from the thread's last execution, which is the active turn's tuple, so the steer was stored inclient/turn/requestedand dispatched with the previous selection while the picker showed the new one. Issue: #1860. Report: https://get-bb.github.io/reports/issues/1860.htmlWhat changed
packages/client-core/src/prompt/threadDetailPromptSubmission.ts:buildSteerFollowUpRequestandbuildFollowUpShortcutRequesttake the sameexecution: FollowUpExecutionSelectionargument as the other builders and spread it into thesteer-if-activerequest.apps/app/src/views/thread-detail/ThreadDetailPromptArea.tsx:handleModifierSubmitpassesfollowUpExecutionSelection(already computed forhandleSend).apps/app/src/components/thread/embedded-chat/EmbeddedThreadChat.tsx: the side-chat steer spreadsexecutionRequestFieldslike its normal send/queue requests.apps/mobile/src/screens/thread/prompt-area/follow-up-submission.ts: the steer intent passes theexecutionit already receives.No server, host daemon, or wire change:
SendMessageRequestalready accepts these fields for every mode (the queued "Send now" path andbb thread tell --mode steer --model ...already send them), so noHOST_DAEMON_PROTOCOL_VERSIONbump. No CLI or doc surface changes.Provider note (from the report): Claude Code applies model/reasoning changes to a live session on steer. Codex cannot change model inside a running turn, so for Codex the steer is now recorded with the selected tuple and the running turn keeps its model; the selection takes effect at the next
turn/start. Making the picker read-only for such providers is a separate product decision.How you verified
New test
steers with the selected execution optionsinpackages/client-core/test/threadDetailPromptSubmission.test.ts. On origin/main source it fails:With the fix it passes. The mobile
buildFollowUpSubmissionsteer test now also asserts the tuple is present.Commands (run from the committed tree,
git status --porcelainempty):Manual end-to-end on an isolated dev instance (
scripts/bb-dev-app current, real Codex): spawned a thread withgpt-5.6-terra/highrunningsleep 120, switched the picker to5.6-Luna · Lowmid-turn in headless Chromium, typed a steer and pressed Meta+Enter. Awindow.fetchhook captured the body:Stored
client/turn/requestedrows for the thread:The steer joined the running turn (
turn/input/accepted), the agent repliedsteered, and the turn completed without error.Fixes #1860
Independent verification
Verified by a separate agent in its own worktree (branch checked out from
bb/fix-1860-steer-model-changeat 725c36f;origin/mainf6fb434 is an ancestor,mergeable: MERGEABLE).Fail-before / pass-after. Restored the four non-test source files to
origin/main(git checkout origin/main -- apps/app/.../EmbeddedThreadChat.tsx apps/app/.../ThreadDetailPromptArea.tsx apps/mobile/.../follow-up-submission.ts packages/client-core/src/prompt/threadDetailPromptSubmission.ts) and ran the PR's tests:packages/client-core:pnpm exec vitest run test/threadDetailPromptSubmission.test.ts->1 failed | 14 passed. Failing assertion:steers with the selected execution options— received{ id, input, mode: "steer-if-active" }, missingmodel: "gpt-5.6-luna",reasoningLevel: "low",permissionMode: "full",executionInputSources.apps/mobile:pnpm exec vitest run src/screens/thread/prompt-area/follow-up-submission.test.ts->1 failed | 8 passed, same missing fields on thekind: "steer"request.Restored the PR source (
git checkout HEAD -- <same files>,git status --porcelainempty) and re-ran:15 passedand9 passed.Turbo (cache bypassed).
pnpm exec turbo run typecheck test --filter=@bb/client-core --filter=@bb/mobile --filter=@bb/app --force->Tasks: 9 successful, 9 total,Cached: 0 cached. client-core 20 test files, mobile 123, app 409, all passed.Live repro on the fixed branch (own isolated dev instance, real Codex 0.149.0). Spawned a Codex thread and started a turn with
gpt-5.6-terra/highrunningsleep 240. In headless Chromium (doobie) with awindow.fetchhook, switched the composer picker to5.6-Luna · Lowwhile the turn was running, typed a steer, pressed Meta+Enter. Captured body ofPOST /api/v1/threads/thr_cywmjkjaxg/send:Stored
client/turn/requestedrows: seq 63new-turnterra/high, seq 73steerluna/low (on main the report shows the steer stored with the previous turn's tuple). Steer was accepted (turn/input/accepted), agent repliedsteered,turn/completedwith no error or session-replaced event. The bug no longer reproduces.Hostile review. Client-only; fixes the root cause (the steer builder omitted the selection while its sibling send/queue builders spread it). Server already reads
payload.modelfor every mode (recoverThreadModelOverride+buildExecutionOptionsinthread-send.ts), so no server/daemon/wire change and noHOST_DAEMON_PROTOCOL_VERSIONbump needed. All three callers ofbuildFollowUpShortcutRequest(web, mobile) and the side-chat steer now pass the selection; remainingsteer-if-activesenders are plugin-programmatic (workflows/automations/tasks) and out of scope. Checked that the steer path'sreconfigureThreadIfNeededcannot replace a session mid-turn: the singlebridge-protocol-adapteralways classifies settings changes as"live". No casts, no ignored fields, no CLI/doc surface change.CI. All checks pass (Checks, Tests app-1/2/3, integration, packages, server, Package Smoke ubuntu + macOS, version checks); iOS simulator and Node compat smoke skipped as usual.
Residual risk. As the report notes, Codex cannot retarget a running turn, so for Codex the recorded tuple applies at the next turn/start; Claude Code applies it live. Making the picker read-only for such providers is a separate product decision.