Skip to content

Add native Codex speed controls and BB 0.46 compatibility - #215

Merged
koenvg merged 6 commits into
mainfrom
bb/add-fast-and-ultrafast-options-for-openai-models-thr_wmheh36xv4
Oct 13, 2026
Merged

koenvg merged 6 commits into
mainfrom
bb/add-fast-and-ultrafast-options-for-openai-models-thr_wmheh36xv4

Conversation

@koenvg

@koenvg koenvg commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Current revision: native Codex speed controls

Restore Default and account/model-confirmed Fast in BB's existing model picker, alongside reasoning. This revision changes only Pi with subagents. BB core and bundled/default Pi are unchanged. The earlier repository-wide BB 0.46 / SDK 0.6.37 compatibility migration remains part of this branch.

  • Native BB service-tier settings own speed. Existing private .bb-codex-speed.json files are ignored and preserved, with no migration or deletion.
  • Fast uses service_tier: priority only with current subscription openai-codex account/model confirmation. Unverified Ultrafast, API-key routes and other providers remain excluded. Failed non-default validation blocks dispatch, with no automatic refusal retry or downgrade.
  • Keep speed separate from model/reasoning. Running turns and tool continuations keep captured speed. Changes apply to later turns. Preserve separate-session settings, resume and compaction propagation.
  • Support only /speed refresh. Other controls fail privately with native-selector guidance. Classify controls before execution reconciliation, skill expansion or attachment reads. Controls do not replace a held child or send model prompts. Keep processing-generation settlement guards.
  • Remove the now-unused private startup publication/reopen path. Pi owns native history publication and its writer. Speed initialization does not call switch_session.
  • Preserve main's channel lifecycle and random UUID tool IDs. Repair the isolated lifecycle VM fixture by checking and removing only the exact embedded ESM prelude. Real Pi lifecycle cases still execute the full generated extension, with existing assertions intact.

The user explicitly accepts BBP-201. After failed or revoked discovery, BB can display saved Fast as fallback Default; a model/reasoning edit can submit that fallback as explicit and overwrite Fast. This known limitation does not relax entitlement or payload checks. The superseded private-command and thread-header designs are no longer used. Closed upstream core PR #5379 is historical work, not a dependency of this accepted design.

Source validation and review

Published restoration commit: 89c7f4429ad5053769756ed7c8794298103c997e. The five existing feature commits were rebased onto main 660bcc033c7ce3a0e6ddff0b3caa60351e6ca48d before this publication. Bun migration and native archive/delete safeguards are retained.

One fresh read-only deep review approved the complete 19-file pending source change against f8023d727b55914d3b8e72ef34af185d61fd1182, with no blocking correctness or structural finding. It independently passed:

  • 35 targeted speed and lifecycle cases.
  • All 548 package tests in 54 files, including isolated production-only install/build/load and credential-free real Pi lifecycle checks.
  • Typecheck, generated-source consistency and whitespace checks.

The sole finding was P3 stale installation text. The parent corrected it in README, compatibility, verification and task notes. Formatting, strict OpenSpec change validation and whitespace checks passed after correction. No second reviewer was launched. Earlier private/core request-changes and block verdicts remain unchanged. Earlier root quality, SDK and isolated build results are separate evidence, not independent current-review results.

The lifecycle regression failed before repair with 3 passes and 1 import.meta VM failure. After repair, the targeted and full suites above passed. The fixture fix has no runtime or dependency changes. BBP-210 records the failure, repair and review outcome.

See verification, Pi compatibility and repository compatibility evidence. All 15 CI checks passed for the published head 89c7f4429ad5053769756ed7c8794298103c997e. These checks do not establish installed/live acceptance.

Installation state and remaining gates

Ready for review at the user's request. Source approval is not installed/live or joint acceptance. Readiness does not authorize merge, reload or live testing.

The user approved installing the pre-rebase native restoration from this worktree. Activation confirmed Default/Fast provider support. Its retained host digest remains 9d527872118587b9ceb99ffad09a690ceb5c254f8793f7830082410c24609f9e. The later main lifecycle integration and fixture repair have not been reloaded. This publication did not rebuild, reinstall or reload the provider, change other plugins, start threads or make model requests.

The historical private-command installed attempt failed at startup with a stale extension context and zero model requests, recorded as BBP-208. Removing its speed-initialization session replacement and passing current-source lifecycle tests do not establish live resolution.

Installed native-picker behavior, real entitlement/payload delivery, active-turn isolation, resume, compaction and standalone/global isolation remain unaccepted for the restored source. Upstream compatibility remains inconclusive. Backend scheduling, billing, latency and Ultrafast support remain unverified. All OpenSpec checkboxes stay closed at the user's request, including administrative closures; they do not establish acceptance. Nothing is merged or deployed. Publication grants no further installation, reload or live-testing permission.

Previous PR description, retained as historical evidence

The description below records earlier designs, reviews and validation stages. Its private-command interface, host prerequisites, installation states and acceptance claims do not replace the current native design and limits above. Original historical verdicts and failure evidence are preserved.

Current revision: private speed commands

This revision changes only Pi with subagents. BB core and its bundled/default Pi provider stay unchanged.

  • Hide the native speed selector. Use /speed, /speed fast, /speed default, and /speed refresh.
  • Store speed independently of BB execution settings. A reasoning-only edit or BB fallback Default cannot replace privately selected Fast.
  • Consume structured controls before execution reconciliation, skill expansion, or attachment reads. Invalid controls stay private; attachments are rejected in either order. No control sends a model prompt.
  • Preserve active-turn speed; new selections apply to later turns. Validate saved non-default choices against the active account/model before dispatch.
  • Keep native identity and the live writer consistent through Pi's public startup switch_session RPC. Existing history is protected; no private writer fields or synthetic model messages are used.
  • Keep the reviewed shared archive and final-payload/account guards. Fast maps to verified priority; unverified Ultrafast and API-key routes remain excluded.

The BB 0.46 / SDK 0.6.37 migration for all 11 packages remains included. Main's Bun migration and native archive/delete safeguards remain intact.

Validation and review

Current revision: 558bc7027a488c283b1956d7e6dd5d3ac5bab93a.

  • 547 tests pass in 53 files, including isolated production install/build/load.
  • Typecheck, SDK 0.6.37, generated-source, root quality, strict OpenSpec, formatting, and whitespace checks pass. Root lint warnings are non-failing.
  • The one fresh independent review returned request changes for native writer ownership and late command routing. Both findings were corrected by the parent after failing regressions; affected and full checks passed afterward. The original verdict is preserved. No independent post-fix approval is claimed.
  • Regression evidence covers the first native user message and resume identity, attachment order, valid/invalid controls with changed model/reasoning during a held turn, private persistence, failed writes, corrupt state, stale selections, and separate sessions.
  • Repository evidence: verification.

Remaining gates

Keep this PR draft. Installed private-command/hidden-selector acceptance remains incomplete. Upstream compatibility remains inconclusive. Backend scheduling, billing, latency and Ultrafast support remain unverified.

BBP-201 was the prerequisite for the superseded native-selector design. The approved private-command interface avoids that path and does not require a BB host update. Closed upstream core PR #5379 is historical work, not a dependency of this revision.

No installation, reload, merge, deployment, or new live model request occurred for this revision. Publication does not authorize those actions. The prior successful CI run applies to the earlier head; current-head CI must finish separately.

Historical native-selector publication, acceptance, and review evidence

The following records describe the superseded native-selector route. Their host prerequisites and acceptance results do not govern or approve the private-command revision above. Original review verdicts are retained.

Host prerequisite publication

The BB core fix at 348c46e3af627a6a49d062d5f10bc9741869b6b8 is now pushed to koenvg/bb on fix/codex-speed-execution-intent-thr-wmheh36xv4. Upstream PR #5379 was created as draft, then automatically closed by github-actions[bot]: get-bb/bb requires maintainer contributor approval before accepting PRs. The bot directs the contributor to #contributors in Discord; a maintainer must add the contributor to the allow list before the existing PR can be reopened. No approval bypass or reopening was attempted.

This changes publication status only. The host fix is not merged, shipped, installed, or independently approved after the embedded-composer correction. Keep this feature PR draft. BBP-201 remains a release prerequisite. No installation, reload, merge, or deployment occurred. Earlier notes that the core branch was unpublished describe the prior stage.


CI timeout correction

Pushed b8dc25a993509aeaf70ef90859e0fb896fd5765b. The three-session resume regression now has a bounded 15-second test budget and uses returned delta offsets to await each new turn boundary. All assertions remain; runtime limits, retries, and parallelism are unchanged.

  • One fresh routine review approved this CI-only update, with no blockers.
  • Local validation: 14 speed tests and two full default-parallel runs of all 533 Pi tests pass, plus typecheck, build, SDK, root quality, generated-source, and strict OpenSpec checks.
  • The new GitHub CI run passed all 14 checks, including the Pi job, on this exact commit. Earlier failure evidence is retained.
  • Keep this PR draft. BBP-201 still blocks feature merge/deployment. No installation, reload, BB core publication, or feature release is approved or performed by this correction. Earlier feature/core review verdicts remain unchanged.

Latest rebase

Rebased onto b4a5511ed0642f752e28e165adc2823e1367fecf and pushed 7aeb29147de92a3886e94fce3750663545ca3e80 with an exact force-with-lease. Main's Bun 1.4.3 migration and newer GitHub Insight/cleanup changes are retained. npm locks stay deleted; Bun locks retain SDK 0.6.37 and the reviewed local speed archive.

  • All 11 frozen installs, SDK gates, typechecks, and builds pass. Settled test matrix: 5,343 passing tests. Code Cleanup uses the direct BB build command because main has no build script.
  • A later parallel Pi rerun had one unchanged 5-second resume-test timeout, with 532 passes. Final full Pi validation with file parallelism off passed all 533 tests. The timing failure is retained, not treated as resolved parallel reliability.
  • One fresh strict review found no new rebase integration or maintainability blocker and accepted the authorized draft push. It independently passed 20 speed tests and 3 native-action tests. The embedded controller body and archive are unchanged.
  • Keep this PR draft. Merge and deployment remain blocked by BBP-201: installed BB 0.46.0 can silently replace saved Fast with Default after failed discovery and a reasoning-only edit. The required core fix remains local and unpublished; this rebase does not approve it or establish installed acceptance. Earlier review verdicts remain unchanged.
  • No plugin/core installation, reload, merge, or marketplace publication accompanied this rebase. The BB core branch was not pushed.

Current evidence and limits: compatibility report, speed verification.


Initial implementation report

Summary

  • Add account- and model-gated Codex speed controls to Pi with subagents, using the native BB service-tier selector. Fast uses the verified priority wire value; Ultrafast is not exposed by the actual controller.
  • Embed the reviewed @koenvg/[email protected] archive with a pinned hash. Keep discovery, credentials, guarded native transport, and turn snapshots inside Pi. Carry saved speed separately from model and reasoning through prompt, steer, queued follow-ups, and resume.
  • Upgrade all 11 repository plugins to BB 0.46 / SDK 0.6.37, with matching Pi runtime alias/build pins and updated lockfiles.
  • Replace removed PR thread-list sidebar APIs with public navigation and row-bound native actions. Preserve host archive/delete safeguards and existing controls/styles.
  • Fix reviewed refresh-settlement and recovery-text defects. BB generation specializes only the shared SpeedError recovery message before native Pi converts it to strings; guard logic and the shared archive are unchanged.

Verification

  • 5,101 passing tests across all 11 plugins; Pi has 53 files / 533 tests.
  • All 11 SDK gates (bb plugin types <path> --check), typechecks, and builds pass.
  • Repository lint/formatting, whitespace, generated-source consistency, and strict OpenSpec validation pass.
  • Pi's full suite includes public-import checks and isolated production-only install/build/load at BB 0.46.0 / SDK 0.6.37.
  • Native-stream regressions use Pi 1.1.0's real transport with synthetic accounts and mocked HTTP. They confirm late account-change failures use BB selector instructions in provider errors and failed-turn settlement, make zero network dispatches, and do not rewrite unrelated provider errors.
  • Independent strict migration review found one P2 recovery-text defect and no SDK/native-action structural blocker. The defect is fixed and parent-verified. The original request-changes verdict is preserved; no follow-up review was run.

Why this is a draft

  • Installed selector/layout/loading, live account requests, installed resume, and bundled-provider isolation remain unverified. OpenSpec tasks 3.3 and 4.3 and group 5 are not marked complete.
  • Native BB normalizes unavailable effective tiers to Default. Whether execution-source handling preserves saved Fast in every case is not yet established. Test revoked/failed discovery through the actual composer and bridge before speed acceptance.
  • The bounded upstream checker is inconclusive; Ultrafast entitlement and wire behavior remain unverified.
  • No plugin installation, reload, publishing, credential change, provider-default change, or session-history change was performed.
  • The standalone Pi implementation stays separate in its owning project/branch; it is not included in this PR.

Integration note

The reviewed branch starts at d0f28467b0975ce36b859e26eb2229316b1530b3. Main has since received the Pi SDK migration in #209 and four other commits. This PR does not revert or integrate those main-only changes; the overlapping Pi migration and documentation must be reconciled before merging. GitHub reports this draft as conflicting with main; those conflicts are not resolved in this PR creation step.

Records

  • BB-0.46-COMPATIBILITY.md
  • bb-plugin-pi-subagents-provider/COMPATIBILITY.md
  • openspec/changes/openai-codex-speed-options/verification.md
  • Source task: BBP-197 (Pi compatibility); broader plugin upgrades were directly authorized.

@koenvg
koenvg force-pushed the bb/add-fast-and-ultrafast-options-for-openai-models-thr_wmheh36xv4 branch from eac16da to 7aeb291 Compare October 12, 2026 14:40
@koenvg koenvg changed the title Add account-gated Codex speed controls and BB 0.46 compatibility Add private Codex speed commands and BB 0.46 compatibility Oct 12, 2026
@koenvg
koenvg force-pushed the bb/add-fast-and-ultrafast-options-for-openai-models-thr_wmheh36xv4 branch from 558bc70 to 830984a Compare October 12, 2026 21:09
@koenvg
koenvg force-pushed the bb/add-fast-and-ultrafast-options-for-openai-models-thr_wmheh36xv4 branch from 830984a to 89c7f44 Compare October 13, 2026 14:04
@koenvg koenvg changed the title Add private Codex speed commands and BB 0.46 compatibility Add native Codex speed controls and BB 0.46 compatibility Oct 13, 2026
@koenvg
koenvg marked this pull request as ready for review October 13, 2026 14:13
@koenvg
koenvg merged commit cace8be into main Oct 13, 2026
15 checks passed
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