Repository navigation
Description
Summary
A plugin that ships its own Claude Code binary and hands it to bb through bb.providers.experimental_contributeEnv("claude-code", …) (BB_CLAUDE_CODE_EXECUTABLE) gets working threads, but on a machine with no claude on PATH or in the well-known paths the new-thread composer stays blocked with "Claude Code not installed". The installation status and provider health only look at the bridge process environment, so they never see the plugin's executable. Expected: the provider counts as installed on that host, the same way #7401 made model/list honour the plugin env.
Versions and environment
- bb 0.48.1 (
npx bb-app), macOS 26.4.1 arm64. Code paths below are unchanged in 0.49.0 and onmainatda3e60b81d560e114a2bec724bb59c997aaaae7f. - Plugin SDK 0.6.104. Claude Code 2.1.301 and 2.1.325 (the plugin's own copy, outside PATH).
- Plugin: vlasovsmm/claude-russia-bb. It downloads Claude Code into
~/.claude-russia/bb/programma/and contributesBB_CLAUDE_CODE_EXECUTABLE(plus its own config dir) for threads on the primary host.
Steps to reproduce
- Machine where
command -v claudeis empty and~/.local/bin/claude,~/.claude/local/claude,/opt/homebrew/bin/claude,/usr/local/bin/claudedo not exist. - A plugin with
bb.providers.experimental_contributeEnv("claude-code", () => [{ name: "BB_CLAUDE_CODE_EXECUTABLE", value: "/abs/path/to/claude", reason: "plugin ships Claude Code" }]), where the path is an executable Claude Code outside PATH. - Open bb, click New thread, choose the Claude tab in the model picker.
bb machine provider-cli status <host> --jsonandbb thread spawn --provider claude-code --prompt "hi"(no--model).
Observed with the plugin above on 0.48.1 in a clean HOME. The minimal snippet in step 2 is the same call reduced to one entry; I did not run it as a separate plugin.
Expected vs actual
Expected: Claude Code counts as installed on that host, the composer is enabled, the default model resolves.
Actual:
- Composer: "Claude Code not installed", send blocked with "Install Claude Code before starting a thread."
- Model picker (0.48.1 / 0.49.0): "Could not load models for Claude Code. CLI not found". Fixed for
model/listby List pooled accounts' Claude models in the Claude Code picker #7401, not released yet. bb machine provider-cli status:"installed": false, "installSource": "notInstalled".bb thread spawnwithout--model:HTTP 503: Unable to load claude-code models to resolve the default.- Threads spawned with an explicit
--modelrun fine through the plugin's binary, because thread launch does receive the contributed env.
Evidence (code on main)
claudeExecutable()reads only the bridge's ownprocess.env.BB_CLAUDE_CODE_EXECUTABLE, then PATH: provider-maintenance.ts#L41-L45. BothgetClaudeProviderInstallationStatus(#L118-L131) andgetClaudeProviderHealth(#L316-L320) use it.- The daemon commands
provider.healthandprovider.installation.statuscarry nocontributedEnv, whileprovider.list_modelsdoes: commands.ts#L917-L950. - The app keeps the host CLI status with
SESSION_STATIC_QUERY_POLICY(system-queries.ts#L631-L649) and refreshes it only after an install or update run through bb. So even when the status changes server-side (for example after a machine env change), an open window keeps "Claude Code not installed" until a page reload. Measured on 0.48.1: still shown 94 s after the change and after a focus event, gone after reload.
What we ruled out
- Not a duplicate of List pooled accounts' Claude models in the Claude Code picker #7401: that PR passes the contributed env to
model/listonly; installation status and health still use the bridge env (checked in nightly0.49.1-nightly.43741685410.1and onmain). - Related to Plugin SDK: per-machine environment control for machine providers (sandbox credential isolation) #4405 (per-machine env for plugins) and Codex provider: contributed env never reaches the app-server process, so CODEX_HOME and BB_CODEX_BRIDGE_APP_SERVER_COMMAND cannot be set per thread #7179 (Codex contributed env), different provider and code path.
- Restarting bb does not help: the bridge never gets the variable.
- Workaround that works on 0.48.1: the plugin writes
BB_CLAUDE_CODE_EXECUTABLEinto the machine environment viabb.sdk.system.setMachineEnvironmentVariable. A new bridge picks it up through the passthrough list, status flips to installed after the old bridge idles out (about 60 s), and the window needs a reload. Downsides: the machine environment is global across hosts, so it breaks Claude Code on a second host where the path does not exist, and it lands in every thread and terminal.
Suggested priority and effort
Hits every plugin that provides its own Claude Code binary on machines without a separate Claude Code install; the workaround above exists but is global. A fix could follow #7401: resolve the plugin env for provider.installation.status and provider.health with the host id and pass it to the bridge, and refresh the cached host CLI status when that env or the machine environment changes.
AGENT GENERATED
Activity
bb-slop-cop commentedon Nov 16, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders,provider-claude-code, andpartial-repro; no existing classifications were replaced.Build every provider CLI's environment with one builder
Recheck provider CLI status after env changes and when a blocked comp…
Build every provider CLI's environment with one builder (get-bb#7722)