Skip to content

Machine shim ~/.local/bin/bb keeps running the enrollment-time CLI after in-app updates, and cli-command install refuses to replace it #7897

Closed

Description

@salemsayed

Summary

On a machine enrolled with the machine install script, ~/.local/bin/bb keeps running the CLI from enrollment time after in-app updates. Any shell that bb did not start (ssh, bash -l, systemd units, cron) gets an old CLI: here 0.46.2 while the app runs 0.50.2. The supported fix, bb settings cli-command install, refuses because of that same shim, so there is no supported way to get a current bb on PATH.

Versions and environment

  • bb 0.50.2-nightly.44597192366.1, in-app updates (npm kind), Ubuntu, Node 24.
  • Enrolled as a machine on 0.46.2 with the install script, then made the full-stack server by a server move (the unit runs <data dir>/npm/bin/bb-app start).
  • Tested against main at fab8266.

Steps to reproduce

  1. Enroll a machine with the install script, let it become a full-stack server, and take an in-app update.
  2. In an ssh shell, run bb --version and bb thread regenerate-title --help.
  3. Run <data dir>/bin/bb --version and bb settings cli-command show --json.

Expected vs actual

Actual:

$ bb --version
0.46.2-nightly.38916346193.1
$ bb thread regenerate-title --help
error: unknown command 'regenerate-title'
$ <data dir>/bin/bb --version
0.50.2-nightly.44597192366.1
$ bb settings cli-command show --json
{"installedPath": null, "onPath": false, "shadowedBy": {"path": "/home/<user>/.local/bin/bb", "source": "machine"}, "supported": true}

Expected: bb on PATH follows the running bb, or cli-command install can make it do so.

Evidence

What you ruled out

Suggested fix

In the machine shim, use $BB_CLI when it is set and executable (the daemon's choice for the session), then <data dir>/bin/bb when present, then npm/bin/bb. Or let cli-command install replace a machine shim whose data dir has a bin/bb launcher. A local patch of the first option fixed both of our machines.

Priority suggestion: affects every enrolled machine that later became a server or took in-app updates. There is a manual workaround (edit the shim), and nothing is lost, but scripts silently run an old CLI.

AGENT GENERATED

Activity

  1. added theissue type on Nov 20, 2026
  2. added
    desktop
    cli
    confirmed-repro
    on Nov 20, 2026
  3. bb-slop-cop commented on Nov 20, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Medium · desktop, cli.
    • Report: Reproduction and root cause — REPRODUCED, high confidence; confirmed-repro.
    • Root cause: The machine shim selects the enrollment npm executable rather than the maintained launcher, while CLI installation rejects that recognized machine shim.
    • Verification: The focused shim/service regression fails identically in two trusted-main checkouts; 11 existing checks pass. This verifies dispatch and repair behavior, not a live upgrade or the separate Connect authentication symptom.
    • No PR: Repair changes installer/launcher packaging behavior, excluded by this rule’s simple-fix gate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliconfirmed-reprodesktop

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions