Skip to content

Fix Codex Fast reset and stale defaults after queued dispatch - #3472

Merged
ymichael merged 2 commits into
mainfrom
bb/fix-issue-3403-fast-mode-persistence-thr_6us9zrktfs
Sep 11, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/fix-issue-3403-fast-mode-persistence-thr_6us9zrktfs

Conversation

@ymichael

@ymichael ymichael commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

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

@ymichael
ymichael merged commit 83f68de into main Sep 11, 2026
16 checks passed
@ymichael
ymichael deleted the bb/fix-issue-3403-fast-mode-persistence-thr_6us9zrktfs branch September 11, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex Fast mode toggle is not saved without sending a message

1 participant