Repository navigation
Description
Summary
On an npm install started by the host-daemon LaunchAgent, the server process has no node on PATH. Anything on the server that spawns the bb CLI fails with env: node: No such file or directory. Today that makes the new MCP server plugin unusable: search/read report a missing command index and run exits 127. I expected the MCP tools to work right after bb plugin enable bb--mcp.
Versions and environment
- bb 0.46.1, npm install (
BB_APP_INSTALL_KIND=npm), run by LaunchAgentapp.getbb.host-daemon.<host>; macOS 27, Mac mini M2 - Node 24.21.0 from nvm only (no /usr/local or Homebrew node on the default PATH)
- bb Connect paired; this machine is the server; server previously moved here with
bb server move
Steps to reproduce
- Install Node only through nvm, and run bb from the LaunchAgent it writes (ProgramArguments call node by absolute path; EnvironmentVariables has no PATH).
bb plugin enable bb--mcp- Call the local endpoint:
curl -s -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream'
http://127.0.0.1:38886/api/v1/plugins/bb--mcp/http/mcp
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"run","arguments":{"code":"const r = await bb.cli(["--version"]); return r"}}}'
Also reproduces without MCP:env -i PATH=/usr/bin:/bin:/usr/sbin:/sbin "$BB_CLI" --version
Expected vs actual
Actual (run tool): {"exitCode": 127, "stdout": "", "stderr": "env: node: No such file or directory\n"}
Actual (search/read): Error: The bb CLI on this bb server did not return its command index (`bb guide commands --json`), so the `read` and `search` tools are unavailable. Update bb on that machine.
Expected: the MCP tools run bb commands. The "Update bb on that machine" hint is misleading; bb is current.
Evidence
Server process environment (ps eww, bb 0.46.1):
PATH=/usr/bin:/bin:/usr/sbin:/sbin
BB_CLI=/bb-app/host-daemon/dist/bb (first line: #!/usr/bin/env node)
BB_CLI_LAUNCHER=/bin/bb (runs node by absolute path; works)
The MCP plugin's CLI lookup (builtin-plugins/mcp/dist/server.js, bbBinaryCandidates) tries BB_CLI, BB_CLI_DIR/bb, PATH, /opt/homebrew/bin/bb, /usr/local/bin/bb. It never tries BB_CLI_LAUNCHER and never runs the CLI with process.execPath.
Same root cause hit the Talk to BB plugin on 0.44.0 right after a server move.
What you ruled out
- Related to Packaged Nightly plugin processes lose PATH for node and gh #2343 (packaged Nightly from the GUI loses PATH); this is the npm + LaunchAgent install, and it still happens on 0.46.1 release.
- Not a stale CLI:
bb guide commands --jsonreturns a valid index (232 commands) when node is on PATH. - Fixed locally by adding EnvironmentVariables:PATH (with the nvm bin dir) to the LaunchAgent and reloading it; MCP search/read then work.
AGENT GENERATED — written by Claude Code from a bb session on the affected machine.
Suggested priority and effort (optional)
Medium: breaks MCP and any server-side plugin that shells out to bb on nvm installs; workaround is a manual plist edit that an update may overwrite. Effort probably low (add dirname(process.execPath) to the LaunchAgent PATH, or prefer BB_CLI_LAUNCHER).
Checks
- I reproduced this on the latest release or on
main, or I say above that I could not. - I searched open and closed issues for the same problem.
- If an agent wrote this, the body ends with
> AGENT GENERATEDand links the thread or report.
Activity
bb-slop-cop commentedon Oct 20, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilothost,plugins.confirmed-repro.BB_CLIand ignores the runtime-pinnedBB_CLI_LAUNCHER. Without Node on PATH, execution exits 127; the command-index loader masks this with the update hint.SawyerHood commentedon Oct 20, 2026
Backlog comparison: related to #2343 and #5292, but retain this issue separately.
#2343 concerns packaged-GUI shell PATH acquisition; #5292 includes the daemon restoring a stale startup PATH after managed-environment changes. This report adds npm/LaunchAgent service startup and the server-side CLI consumer selecting the Node-shebang BB_CLI rather than the runtime-pinned BB_CLI_LAUNCHER. Its runner reproduction succeeds when the pinned launcher is selected.
Coordinate runtime/launcher ownership across the three trackers, and test server plugin execution as well as provider detection. A shell-probe-only fix is not sufficient evidence that this report is resolved.
One host toolchain for executable discovery, child PATH, and proxy/CA…