Repository navigation
Description
Problem
Today, changing the provider in an existing thread's follow-up model picker only supports handing off to a new thread. In workflows where a user wants to switch between providers mid-task (for example, moving from Codex to Pi or an ACP agent when a provider hits capacity or a different model/harness is preferred), creating a new thread splits the conversation timeline, changes the thread ID, and separates recent/pinned thread organization.
Proposal
Allow switching providers in place on an idle or failed thread while preserving the thread ID, timeline, and workspace:
- Server / DB (
PATCH /api/v1/threads/:id):- Accept
providerId(optionally combined withmodelandreasoningLevel, and rejected if combined with unrelated metadata/session-option edits). - Guard against switching when the thread is active/starting/stopping, has turn-bound pending interactions, or has queued messages.
- Validate target provider and model/reasoning override against the target provider's catalog before mutating state.
- Stop/release the previous provider session, record a completed
system/operation(provider_switch) event that acts as a provider-session identity boundary, and updateproviderId+ execution overrides atomically. - On the next
thread.start, inject a bounded historical conversation transcript (up to 100,000 characters,visibility: "agent-only") into the fresh provider session, and discard it on context clear.
- Accept
- SDK & CLI:
- Expose
providerIdonthreads.update(...)and--provider <id>onbb thread update.
- Expose
- UI (Follow-up Composer):
- When the user selects another provider in the follow-up model picker (the existing handoff bar), show a Switch in this thread button alongside Handoff to new thread (disabled while the thread is running). Existing new-thread handoff behavior remains unchanged.
Working Prototype
I put together a working prototype on top of main (4d7a9af) with unit/API/UI tests and typechecks passing:
- Compare view: main...daria443:bb:feat/in-thread-provider-switch
Per CONTRIBUTING.md, I am opening this issue first to check if this direction fits BB before opening a pull request. Happy to adjust the design or UI details based on maintainer feedback.
Activity
bb-slop-cop commentedon Dec 2, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotType: Feature · Priority: Medium · Effort: High · Labels:
providers,threadsNo PR opened: this adds a new capability rather than fixing a bug.