Repository navigation
Description
Request
A supported way to disable bb's managed-worktree environment provisioning — per server, per project, or both — so that only unmanaged (existing-path) environments are used.
Use case
I manage my own workspaces outside bb (jj workspaces via a custom tool, one directory per branch under a fixed layout). bb threads work fine in these via unmanaged environments ({ type: "host", workspace: { type: "unmanaged", path } }), and I have a plugin that wires my workspace tool to thread spawning.
What I can't do is stop bb offering/creating managed worktrees. Risk surface: an agent (or I, on autopilot) spawns a thread into a managed git worktree of a jj-colocated repo, work lands somewhere my tooling can't see, and cleanup semantics (bb destroys the worktree when the last thread archives) don't match how I manage those directories.
What I checked (plugin SDK, bb 0.39-ish)
No existing mechanism:
appSettingsSchema— nothing about workspace provisioning.experimentsSchema— only claudeCodeMockCliTraffic, editMessages, newOnboarding, providerSessionReaping.- Backend:
managed-worktreeis a core arm of the environment discriminated union; plugins can't strip it. - Frontend: no slot to replace/hide the native new-thread environment picker.
experimental_newThreadPanelActiononly adds beside it;experimental_NewThreadComposer'sdefaultEnvironmentonly seeds (user-changeable). Replacement slots exist for thread list / file opener / thread header / provider icon — not the environment picker.
Proposal (any of these works for me)
- A setting (server or project level) that disables managed-worktree creation and hides "new worktree" from environment pickers.
- A plugin-replaceable environment-picker slot, so a plugin can present only the options it wants.
- At minimum, a server flag that makes managed-worktree provisioning fail fast with a clear error, so accidental spawns surface immediately instead of creating worktrees.
Happy to elaborate on the jj-workspace setup if useful.
Activity
SawyerHood commentedon Sep 9, 2026
Closing as addressed by the environment-provider implementation in #3227. Managed Git worktrees are now supplied by a plugin, and requests for unavailable environment providers fail explicitly. The maintainer has accepted this implementation as sufficient to close this request. Disabling the plugin and checking the resulting picker/provisioning behavior was not freshly exercised during this audit.