Repository navigation
Description
The workflow
We install claude, codex, and other agent CLIs through a package manager rather than npm or the vendors' install scripts. The manager owns the binaries: each CLI is a symlink in the manager's bin/ pointing into a versioned tree it controls (the same layout Homebrew uses with Cellar), and the manager runs its own updater. We run bb on those machines and open Settings → Updates to see which agent CLIs are current.
What happens today
Each builtin provider's maintenance bridge only understands two ownerships: npm-global or "external". For anything "external" it still consults public npm for the latest version and, for Claude Code, still offers to run the vendor's in-place updater.
Observed on bb 0.42.1 (npx bb-app, macOS 15, Node 24.15.0), with claude resolving to a symlink inside the package manager's bin/ (path redacted):
$ curl -s http://127.0.0.1:38899/api/v1/hosts/<hostId>/provider-clis/status | jq .\"claude-code\"
{
"executablePath": "/Users/me/<pkg-manager>/bin/claude",
"installed": true,
"installSource": "external",
"currentVersion": "2.1.261",
"latestVersion": "2.1.263",
"npmPackageName": "@anthropic-ai/claude-code",
"installAction": { "kind": "update", "label": "Update", "command": "claude update" },
"needsUpdate": true
}
The UI shows "Claude Code 2.1.261 → 2.1.263" with a download button. Clicking it would run claude update, i.e. the Anthropic updater rewriting a binary inside a directory owned by a different package manager. At best it fails verification; at worst the manager's next reconcile silently reverts it, or the user ends up with two divergent installs. The same status call also spawned npm view @anthropic-ai/claude-code dist-tags --json, npm view @openai/codex …, and npm view @earendil-works/pi-coding-agent … — public-registry egress for CLIs that were never installed from npm.
Why Claude reaches "Update": claude doctor prints Running: native for the manager-vended binary, and the maintenance code treats installMethod === "native" as sufficient to run claude update regardless of where the executable lives:
bb/plugins/provider-claude-code/src/bridge/provider-maintenance.ts
Lines 157 to 176 in 6cdb4ba
const installSource = npmGlobalInstallSource({ installed, executablePath: resolvedExecutable, npmBin: npmGlobal.npmBin, }); const nativeFallback = doctor.installMethod === null && installSource === "external" && isDefaultNativeClaudePath(resolvedExecutable); const canRunUpdate = doctor.installMethod === "native" || nativeFallback || (installSource === "npmGlobal" && (doctor.installMethod === null || doctor.installMethod === "npm-global")); const actionKind = !installed ? "install" : needsUpdate && canRunUpdate ? "update" : null; const displayCommand =
Codex/Pi are one step better (installAction: null when not npm-global), but they still fetch npm dist-tags for a version they cannot act on:
npmLatestVersion(CODEX_NPM_PACKAGE), npmLatestVersion(PI_NPM_PACKAGE),
What you would expect
A provider-agnostic notion of "this executable is managed by something bb does not control," applied before any vendor/npm probing:
- Detection. If the resolved executable (after
realpath) lives under a known manager prefix, mark it externally managed. Suggested built-ins: Homebrew ($(brew --prefix)/Cellar,/opt/homebrew,/home/linuxbrew), plus an escape hatchBB_EXTERNALLY_MANAGED_PATHS(colon-separated path list) for any other manager. This is the same shape as Pi provider update hardcodes npm and fails when Pi is installed via bun #3119/Use Bun to update Bun-managed Pi installations #3121, which taught the Pi provider to recognize Bun ownership — just lifted into the shared@get-bb/plugin-sdk/provider-bridgehelpers so every provider gets it. - Status. For externally managed executables:
installSource: "external",installAction: null,latestVersion: null,needsUpdate: false, and skip thenpm view/ vendor lookups entirely. The UI already renders this as "Update in terminal", which is exactly right. - Optional hint. A small map from manager → display command (e.g.
brew upgrade <formula>) so the row can say how to update in the terminal. Nice-to-have; (1)+(2) alone remove the footgun.
Context and alternatives
- Workaround today: for a provider plugin we own, we wrapped its bridge's
handleLineto answerprovider/installation/status|runfrom the package manager's own metadata and only ever offer the manager's update command. That works for a provider we own, but re-wrapping the builtin Claude/Codex/Pi bridges would mean forking their registrations and losing upstream fixes — not reasonable. - Not a duplicate of Pi provider update hardcodes npm and fails when Pi is installed via bun #3119 (Bun-managed Pi): that fix is Pi-specific and still assumes bb should perform the update. This request is the general case where bb must not perform it.
- Not a duplicate of Custom ACP providers report available on hosts that cannot execute them #2320 (custom ACP availability): different surface.
- Affects any user who installs agent CLIs via Homebrew or another package manager; the Claude "Update" button is actively harmful for them.
Checks
- I searched open and closed issues for the same request.
- If an agent wrote this, the body ends with
> AGENT GENERATED.
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 6, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassification: Bug · Priority Medium · Effort Medium · labels
providers,provider-claude-code,provider-codex,provider-pi,confirmed-repro.Report: https://get-bb.github.io/reports/issues/3166.html
Verdict: REPRODUCED · confidence high · reproduction label
confirmed-repro.Root cause: provider bridges query package registries and choose update actions before they can identify manager-owned executable paths.
No pull request was opened: the safe cross-provider fix requires a shared public Plugin SDK/configuration design and more than five files, so it does not qualify as a simple autopilot fix.
SawyerHood commentedon Sep 14, 2026
Consolidating #3611 into this existing externally-managed-executable tracker at the owner's request. It adds a concrete Codex case: a symlink to ChatGPT.app's bundled Codex is classified external, yet BB offers
codex update, which cannot detect its installation method. Preserve this as an acceptance case alongside package-manager-owned binaries: resolve executable ownership, avoid offering an updater that does not own it, and explain where updates are managed. The original report retains exact versions and output. This consolidation does not mean the defect is fixed.Whamp commentedon Oct 7, 2026
Machine-scoped provider CLI update commands
Let users configure a provider's update executable and arguments per machine, through Settings, the BB CLI, and the SDK.
A provider installed through Mise, Bun, vp, distribution packages, or an organization-owned script may need an updater other than BB's default. A command override lets the machine's owner choose that updater without requiring BB to support every package manager.
For example, Codex could use Mise on one machine and BB's default updater on another:
These commands work in a local prototype; they are not available in released BB.
Behavior
This does not detect executable ownership or suppress public-registry probes in #3166. It also does not fix conflicting PATH installations in #4009. An override records the user's choice; it does not establish which manager owns the installation.
Prototype and verification
The local prototype includes Settings, CLI, SDK, server persistence, a generated database migration, and a daemon protocol bump. It adds no provider-specific bridge changes or package-manager dependencies.
Base inspected:
92bce667cfb8f8f3a2797c10bf4156da6ed229e3. The prototype builds on these existing paths:Tests cover machine/provider scope, saving without execution, update-only overrides, validation, reset, literal arguments, home-directory execution, command failures, and host-management authorization.
A browser test ran a harmless Node fixture through the Update button. The command succeeded while the installed version remained behind latest, and BB retained the update warning. No installed provider was changed. Linux was exercised; macOS, Windows, and mobile Safari remain unverified.
The prototype is unpublished, and no PR is open. I can provide a fork link after agreement on scope.
Decisions before a PR
Show one line per machine on the Updates page (#5170)
zom-2018 commentedon Oct 20, 2026
A concrete case of this for Codex, on bb
0.46.2-nightly.39288295552.1, Linux host, Codex installed as a Homebrew cask (/home/linuxbrew/.linuxbrew/bin/codex→Caskroom/codex/0.163.0/bin/codex).When a newer Codex was published, Settings → Updates offered Update and it failed. bb always plans
codex update, and on a cask install that prints:The correct command is
brew upgrade --cask codex.The description above says Codex returns
installAction: nullwhen the install isn't npm-global. The current bundledgetCodexProviderInstallationStatusdoesn't do that. It setsinstallAction = installed ? (needsUpdate || versionUnsupported ? "update" : null) : "install"and never checksinstallSource, soexternalinstalls still get the Update button. At minimum, Codex should gate oninstallSource === "npmGlobal". Claude already gates throughclaude doctor's install method. Better still, map Homebrew cask/formula tobrew upgrade ….zom-2018 commentedon Oct 31, 2026
A narrow fix for one Codex case in this tracker: a Homebrew cask install of
codex, whichcodex updatecannot update. Posting it as a branch, not a PR.Commit: zom-2018@9312c8d01a94
Branch: https://github.com/zom-2018/bb/tree/codex-homebrew-cask-option
It changes two files under
plugins/provider-codex/src/bridge/. When the resolvedcodexexecutable's real path is underCaskroom/codex/, the update plan isbrew upgrade --cask codexinstead ofcodex update. Other installs keepcodex update, and the npm install path is unchanged.The branch is based on the fork's current
main(b0bb686), so its tree differs from upstream916d684. The two changed files are byte-identical to the commit I tested on916d684. A comparison against upstreammainlists only those two files. I have not checked for merge conflicts.What was run: on the
916d684state,turbo run test --filter=bb-plugin-provider-codexpassed 44 files and 553 tests. Without the implementation, the three new tests fail.lintandtypecheckpassed. The runs used Node 24.22.2 and pnpm 9.15.0. CI uses Node 22.x, so the CI run is unverified.What was not run: a real Homebrew cask install, and anything on macOS. The cask path is tested with a synthetic
Caskroom/codex/<version>/binlayout in a temp directory.I am not opening a PR. Whether this belongs under this tracker is for the maintainers to decide.
Refs #3166
Update managed Pi installs with pi update instead of npm (#6869)