Repository navigation
Description
The workflow
I maintain a sidebar thread-list plugin (a fork of plugins/thread-list) that can organize threads by machine. Each machine group shows a "New thread" action, and I would like it to open BB's root new-thread composer with that machine already selected, the same way the project groups open it with their project selected.
- The sidebar is organized by machine; the user is looking at the
homelabmachine group. - The user clicks "New thread" for that group.
- The plugin opens the root composer.
- The composer should have
homelabselected as the machine. Today it shows the primary host (my Mac Studio), so every thread for another machine needs a manual machine switch.
What happens today
openNewThread accepts projectId, sectionId, environmentId, and focusPrompt, but nothing that selects a machine:
- Contract:
packages/plugin-sdk/src/app-contract.ts#L1440-L1445 - Host implementation:
apps/app/src/lib/plugin-sidebar-hooks.ts#L307-L324. It forwardsprojectIdthroughsetRootComposeProjectIdandsectionId/environmentIdthrough navigation state.
When nothing seeds a machine, the root composer falls back to the primary host (NewThreadComposer.tsx#L720-L741), after the remembered new-thread machine (storedMachineId, L676).
The only way a plugin can steer the machine today is environmentId. That reuses one specific existing environment (the "New thread in environment" affordance from #2842), so it also pins the workspace or worktree. It is not the same as "a new environment on this machine".
What you would expect
An optional hostId on the public navigation API:
actions.openNewThread({
hostId: "host_abc123",
projectId, // optional, as today
focusPrompt: true,
});When supplied (and the host is known and usable), the root composer should open with that machine selected for a new environment, as if the user had picked it in the machine picker. Omitting hostId keeps the current behavior. If environmentId is also given, environmentId should win, since it already implies a machine.
Context and alternatives
- Related: Add optional environmentId to openNewThread #2842 (
environmentIdonopenNewThread). This is the machine-level sibling of that request. - Workaround considered: passing the
environmentIdof a recent thread on the target machine. Rejected, because it reuses that environment instead of creating a new one there. - Also considered:
experimental_NewThreadComposerwith a default machine. As Add optional environmentId to openNewThread #2842 explains, that composer keeps component-local provider and model state and does not follow app-level new-thread customizations, so the root composer is the right target. - Tested against bb 0.43.4 (desktop) with plugin SDK 0.5.9. Code references are permalinks to
mainat98706229. I have not changed bb itself; this comes from the plugin side, whereopenNewThreadhas no host parameter.
AGENT GENERATED
Activity
Preselect new-thread machines from sidebar plugins (get-bb#4331)
bb-slop-cop commentedon Sep 25, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied Type Feature, Priority Low, Effort Medium, and labels
plugins,ui. No existing classification values needed preserving. Verified the final Type is Feature.This adds a plugin SDK capability; manual machine selection remains available. SDK and composer integration warrants Medium effort. Reproduction and fix steps were skipped because this is a feature request; no pull request was opened.
Preserve placement when creating threads from sidebar groups (#4503)
Make plugin surfaces prove they use core's path and delete plugin-onl…