Skip to content

fix: preserve per-field intent in existing thread composers - #5379

Closed
koenvg wants to merge 1 commit into
get-bb:mainfrom
koenvg:fix/codex-speed-execution-intent-thr-wmheh36xv4
Closed

koenvg wants to merge 1 commit into
get-bb:mainfrom
koenvg:fix/codex-speed-execution-intent-thr-wmheh36xv4

Conversation

@koenvg

@koenvg koenvg commented Oct 12, 2026

Copy link
Copy Markdown

Human comments

What was wrong

Existing-thread selection logic marked every execution setting explicit when the user changed any execution field. If speed discovery failed, the displayed speed could fall back to Default while the thread still had saved Fast. A reasoning-only edit then made that display fallback an explicit speed override. The server accepted Default and lost the saved Fast preference. Embedded thread composers also omitted the existing per-field source metadata, which caused the server to treat all supplied fields as explicit legacy input.

Source task: BBP-201. This is the host prerequisite for account-gated Codex speed controls in bb-plugins PR #215.

What changed

  • Track explicit intent separately for model, reasoning, speed, and permission settings in selection-state.ts and useThreadCreationOptions.ts. Keep intentional same-value choices observable, including an explicit Default choice when the display already shows Default. Thread reset still clears touched state.
  • Forward executionInputSources through the embedded composer's shared send, queue, programmatic-submit, and steer request fields. Preserve explicit snapshot permissions and editable permission behavior.
  • Add hook, embedded-composer, and existing-thread server-resolution regressions. Untouched speed stays inherited during a reasoning-only edit. Explicit Default remains usable, including combined model/reasoning edits.

No new request field, SDK export, CLI flag, server implementation, provider implementation, or daemon protocol version is introduced. The client forwards the existing metadata contract. The provider remains responsible for rejecting an unconfirmed non-default speed before dispatch.

How you verified

The new hook cases failed before the primary fix. Five embedded boundary cases failed before metadata propagation, then all 23 embedded tests passed. The server regression checks that reasoning-only intent preserves inherited Fast and that intentional Default is accepted.

Local checks used Turbo so upstream dependencies ran first:

  • pnpm exec turbo run test --filter=@bb/app: 5,712 passed, 6 skipped. This full run preceded the final programmatic test fixture argument correction; the affected suites and typechecks were rerun after that correction.
  • Final affected hook, embedded-composer, PluginThreadChat, and provider-context suites: 64 tests passed across four files, via the app Turbo test task.
  • pnpm exec turbo run test --filter=@bb/server -- test/services/threads/thread-execution-plan.test.ts test/services/threads/thread-execution-override.test.ts test/public/public-threads.execution-override.test.ts: 27 passed across three files. The full server suite was not run.
  • pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/server: passed.
  • pnpm exec turbo run build --filter=@bb/app --filter=@bb/server: passed.
  • App Turbo lint task: passed with non-failing warnings. Server has no lint task. Whitespace checks passed.
  • The companion adapter regression preserves restored Fast during a reasoning-only change, rejects unconfirmed Fast without another prompt dispatch, and then accepts explicit Default recovery. The companion package passed all 533 tests and its current GitHub CI checks.

The independent implementation review originally returned block because the embedded composer omitted source metadata. This commit includes the parent's correction and regression tests. That original verdict remains unchanged; no independent post-fix approval is claimed. Keep this PR draft for upstream review.

These are local tests, including public-boundary fixtures. No browser/live failed-discovery acceptance, installation, reload, merge, or deployment was performed. The installed BB 0.46.0 host remains affected. The companion feature stays draft until the required host behavior ships and receives installed verification. This publication does not approve activation or release.

AGENT GENERATED

@github-actions

Copy link
Copy Markdown
Contributor

Thanks @koenvg for the PR. This repo needs approval before a PR. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ) and explain what you want to open a PR for and why. A maintainer then adds you to the allow list. This PR now closes on its own. Reopen it or open a new one after approval.

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.

1 participant