Repository navigation
Persist follow-up reasoning through the model override path - #3267
Merged
Merged
Conversation
ymichael
added a commit
that referenced
this pull request
Sep 11, 2026
## Human comments ## What was wrong After a Fast Codex turn, disabling Fast and sending another message saved `default` in BB but omitted `serviceTier` from Codex's request. Omission leaves the provider's existing tier unchanged. Separately, dispatching a queued message did not invalidate execution defaults, so an untouched picker could keep showing Fast after a default-tier message started. ## What changed - Serialize explicit `default` as `null` on Codex's downstream JSON-RPC wire; retain `fast` and preserve omission when no tier is supplied. - Refresh execution defaults on `client/turn/requested`, cancel older reads, and prevent canceled responses from overwriting the last-known cache. - Preserve local unsent choices, queued execution snapshots, queue ordering, and existing failure/retry behavior. Unlike the selection-time save proposed in #3403, this follows the lifecycle established by #3267: picker changes remain local until submission/dispatch. Switching threads without sending still restores the last recorded defaults. No new persistent override, database migration, SDK/CLI surface, or server/daemon wire change; no `HOST_DAEMON_PROTOCOL_VERSION` bump is needed. The accepted-turn cache work shares one handler with prompt-history invalidation. The raw boot budget increases deliberately by 128 bytes (1,723,617 → 1,723,745): pristine main measures exactly 1,723,617 bytes, and the simplified fix measures 1,723,707 (+90). This accommodates the measured eager cache logic; compressed and dependency budgets are unchanged. ## How you verified Reproduced on pristine `origin/main` at `b04091eca67bb463cce16b9bfa318660bd20ab69` using dev-browser, a fresh isolated database, and `pnpm start:worktree` in a persistent BB terminal. The exact unsent-toggle/navigation behavior reproduces, while direct-send BB persistence already works. Recorded real Codex 0.153.3 JSON-RPC traffic from browser-submitted turns: | Step | Before | After | | --- | --- | --- | | Fast turn | `turn/start` sends `serviceTier: "fast"`; Codex reports `"priority"` | Same | | Disable Fast and send | `turn/start` omits `serviceTier`; last reported setting remains `"priority"` | Sends `serviceTier: null`; Codex emits `thread/settings/updated` with `serviceTier: "default"` | This verifies provider configuration, not billing or measured latency. Raw recordings and screenshots remain local because they include machine and model-catalog details. The real queued lifecycle also passed: queue default during Fast work, reload while waiting, leave the picker untouched, then observe it switch off when the queued message automatically dispatches. Before the cache fix it stayed on despite the server reporting default. Codex→Pi→Codex selection hides Fast for the unsupported provider. - Five provider regressions failed against the original converter; the same focused suite passes 42 tests after the fix. Full Codex suite: 272 passed. - Two cache regressions failed before and pass after: accepted-turn refresh and canceled-response persistence. Selected app suites: 155 distinct tests passed, including preservation of unsent selections. - Adjacent server suites: 60 passed, including direct/busy sends, queued snapshots, dispatch, errors, retries, and override recovery. Final dispatch suite: 26 passed. - Turbo app/server/provider typechecks, applicable builds and lint passed. Changed-file formatting, lint, and `git diff --check` passed. App lint retains 190 existing warnings; builds retain chunk-size/timing warnings. - Native Electron and iOS Safari were not tested. Bridge tests cover start/resume/fork reset; live provider proof covers subsequent turns. CI follow-up: reproduced the raw bundle-budget failure locally, consolidated duplicate accepted-turn handlers, and compared a pristine-main build. The correction passed 110 focused cache/selection/bundle-budget tests; the explicit bundle checker, app build/typecheck/lint, formatting, and diff checks were rerun. Fixes #3403 > AGENT GENERATED
2 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.
Human comments
What was wrong
After selecting High reasoning and sending a follow-up in a thread with a saved Max override, the turn used High but reload could restore Max. Explicit sends already repaired stale model overrides; reasoning overrides were left unchanged. See #3257.
What changed
Extend the existing model override recovery path to reasoning in direct sends and queued dispatch. Picker changes remain local until submission; queue timing and retry behavior are unchanged. This replaces the previous save-on-selection approach. No client, wire, protocol, schema, or CLI changes are needed.
The final diff is 6 files, 48 additions and 11 deletions. Tests extend existing fixtures without renaming files.
How you verified
@bb/appand@bb/server, formatting, and diff checks passed. App lint has existing warnings; server has no lint task.Fixes #3257