You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex update succeeds via npm -g, then verification reads a shadowed PATH binary #4009
codex update refreshed the Homebrew global package. Verification then runs codex --version through resolveExecutablePath("codex"), which still hits ~/.local/bin/codex at 0.154.0.
provider-codex plans the update as version_at_least the npm latest. Host daemon installationVerificationPassed compares that to status.currentVersion from the first PATH binary (apps/host-daemon/src/command-dispatch.ts). The npm package moved; the binary BB will actually spawn did not.
Related but not the same as #3166 (externally managed / ChatGPT.app / Homebrew Cellar). Here both copies are npm-global, just different prefixes.
What you would expect
After a successful codex update, verification should look at the same install the updater just wrote, or refuse Update when more than one codex is on PATH and say which one BB uses. A green npm log plus a red “could not verify” is the wrong outcome when the CLI BB launches is unchanged.
Checks
I searched open and closed issues for the same report.
If an agent wrote this, the body ends with > AGENT GENERATED.
Applied Bug · Priority: Medium · Effort: Medium, with providers, provider-codex, and partial-repro.
Reproduction and root-cause report: PARTIALLY REPRODUCED, with high confidence in the BB-side mechanism. Controlled CLI fixtures and a host-dispatch test passed in two clean checkouts of trusted origin/main.
Update planning does not reconcile the PATH-selected executable with the active npm prefix. Verification correctly rejects success when the executable BB uses remains old. The report includes the repeatable tests and results.
No PR: real Codex/npm updater destination selection remains unverified, so this does not meet the automatic-fix reproduction gate.
The same thing happens with pi, and we confirmed where the update goes. This closes the gap in the partial repro (the updater's install destination).
Pi repro
pi was installed with NPM_CONFIG_PREFIX=~/.npm-global npm install -g @earendil-works/pi-coding-agent@latest. ~/.npm-global/bin/pi is first on PATH and is a symlink into ~/.npm-global/lib/node_modules/@earendil-works/pi-coding-agent/. Then Settings → Providers → Pi → Update.
macOS (Homebrew node), after the update:
Path
Version
~/.npm-global/bin/pi (first on PATH, the one bb runs)
1.1.0
/opt/homebrew/bin/pi (written by bb's update)
1.2.0
Linux (pixi node): the same update went to ~/.pixi/envs/nodejs, npm's default prefix there.
Both machines then show pi update exited successfully, but the provider could not verify the installed result., and every retry does the same. Status shows install source external.
So npm uses its default prefix. With only PATH set, npm prefix -g prints /opt/homebrew on the Mac. The daemon's npm debug logs (cwd ~/.bb-machines/<server>/provider-maintenance-workspace) load /opt/homebrew/etc/npmrc.
The verification step is right to fail: the CLI bb runs did not change.
Pi and codex share the provider maintenance kit for npm installs and the npm probe. Codex updates with codex update, and in this issue that ran npm install -g @openai/codex inside the same daemon environment, so it hits the same default-prefix problem.
Fix
Draft PR: #5550. The shared kit now finds the npm prefix that owns the CLI on PATH (its real path is under <prefix>/lib/node_modules/<package>). When that prefix is not npm's default, the npm install and the npm list -g probe add --prefix <prefix>. Pi uses it. It does not fix codex yet, because codex update does not go through the kit's npm command. A follow-up could plan the codex update with the kit's npm command (with --prefix) when an owning prefix is found.
Suggest renaming this issue to cover all npm-installed providers, for example: "Provider update installs into npm's default prefix, not the prefix of the CLI bb runs".
Activity
bb-slop-cop commentedon Sep 21, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied Bug · Priority: Medium · Effort: Medium, with
providers,provider-codex, andpartial-repro.Reproduction and root-cause report: PARTIALLY REPRODUCED, with high confidence in the BB-side mechanism. Controlled CLI fixtures and a host-dispatch test passed in two clean checkouts of trusted
origin/main.Update planning does not reconcile the PATH-selected executable with the active npm prefix. Verification correctly rejects success when the executable BB uses remains old. The report includes the repeatable tests and results.
No PR: real Codex/npm updater destination selection remains unverified, so this does not meet the automatic-fix reproduction gate.
ryanolson commentedon Oct 15, 2026
The same thing happens with pi, and we confirmed where the update goes. This closes the gap in the partial repro (the updater's install destination).
Pi repro
pi was installed with
NPM_CONFIG_PREFIX=~/.npm-global npm install -g @earendil-works/pi-coding-agent@latest.~/.npm-global/bin/piis first onPATHand is a symlink into~/.npm-global/lib/node_modules/@earendil-works/pi-coding-agent/. Then Settings → Providers → Pi → Update.macOS (Homebrew node), after the update:
~/.npm-global/bin/pi(first on PATH, the one bb runs)/opt/homebrew/bin/pi(written by bb's update)Linux (pixi node): the same update went to
~/.pixi/envs/nodejs, npm's default prefix there.Both machines then show
pi update exited successfully, but the provider could not verify the installed result., and every retry does the same. Status shows install sourceexternal.Cause
npm install -g <package>@latestwith no--prefix(provider-maintenance-kit.ts#L131-L137).PATHfrom the login shell (command-dispatch.ts#L165-L168, runtime-shell-env.ts#L623).NPM_CONFIG_PREFIXfrom the shell is dropped.PATHset,npm prefix -gprints/opt/homebrewon the Mac. The daemon's npm debug logs (cwd~/.bb-machines/<server>/provider-maintenance-workspace) load/opt/homebrew/etc/npmrc.Pi and codex share the provider maintenance kit for npm installs and the npm probe. Codex updates with
codex update, and in this issue that rannpm install -g @openai/codexinside the same daemon environment, so it hits the same default-prefix problem.Fix
Draft PR: #5550. The shared kit now finds the npm prefix that owns the CLI on
PATH(its real path is under<prefix>/lib/node_modules/<package>). When that prefix is not npm's default, the npm install and thenpm list -gprobe add--prefix <prefix>. Pi uses it. It does not fix codex yet, becausecodex updatedoes not go through the kit's npm command. A follow-up could plan the codex update with the kit's npm command (with--prefix) when an owning prefix is found.Suggest renaming this issue to cover all npm-installed providers, for example: "Provider update installs into npm's default prefix, not the prefix of the CLI bb runs".