Summary
agent-relay update always runs npm install -g agent-relay@latest and then prints Successfully updated to <version>, regardless of how the CLI was actually installed. When the CLI is installed as a standalone (Bun-compiled) binary — e.g. ~/.agentworkforce/relay/bin/agent-relay, reached via a shim on PATH at ~/.local/bin/agent-relay — the npm install updates a different, unused copy. The running command stays on the old version, but update falsely reports success and the "Update available" banner never clears.
This makes self-update a silent no-op for standalone installs, so users stay pinned to old versions and keep hitting already-fixed bugs.
Impact (concrete)
On 10.6.3 this stranded a user on the node up enrollment identity mismatch bug (fleet snowflake node id vs relaycast uuid session id — never matches; fixed in 10.6.4). Running agent-relay update reported Successfully updated to 10.6.4, but:
$ agent-relay version
agent-relay v10.6.3 # still the old Bun binary; shim → ~/.agentworkforce/relay/bin/agent-relay
Only manually repointing the ~/.local/bin/agent-relay shim to the npm 10.6.4 binary made the fix take effect.
Steps to reproduce
- Install
agent-relay as a standalone binary at ~/.agentworkforce/relay/bin/agent-relay, with a shim at ~/.local/bin/agent-relay (first on PATH) execing it.
- With a newer version published, run
agent-relay update.
- Observe:
Installing update... → Successfully updated to <new>.
- Run
agent-relay version → still reports the old version. The banner keeps nagging.
Root cause
runUpdateCommand in packages/cli/src/cli/lib/core-maintenance.ts:157 unconditionally shells out to npm and reports success without verifying the running binary changed:
deps.log('Installing update...');
const toVersion = info.latestVersion ?? 'latest';
const { stdout, stderr } = await deps.execCommand('npm install -g agent-relay@latest');
...
deps.log(`Successfully updated to ${toVersion}`); // printed even when the standalone binary is untouched
There is no detection of the install method. The codebase already knows standalone binaries live in ~/.local/bin — runUninstallCommand handles exactly that (core-maintenance.ts:283, "Remove standalone binaries from ~/.local/bin") — but runUpdateCommand was never taught the same.
Suggested fix
- Detect the active install method (standalone binary vs npm global) — e.g. resolve the real path behind the
~/.local/bin shim / process.execPath.
- For standalone installs, update via the standalone path (re-download/replace the Bun binary + shim) instead of
npm install -g.
- Only claim
Successfully updated to X after confirming the resolved binary now reports the new version; otherwise warn and print the manual remediation.
- Bonus:
update --check (and the passive banner) should reflect the version of the binary that will actually run, not just the npm package.
Environment
- agent-relay 10.6.3 (standalone Bun binary), macOS arm64
- Shim:
~/.local/bin/agent-relay → ~/.agentworkforce/relay/bin/agent-relay
- npm global copy (updated, but unused by the shim):
~/.local/share/mise/installs/node/<ver>/bin/agent-relay
Summary
agent-relay updatealways runsnpm install -g agent-relay@latestand then printsSuccessfully updated to <version>, regardless of how the CLI was actually installed. When the CLI is installed as a standalone (Bun-compiled) binary — e.g.~/.agentworkforce/relay/bin/agent-relay, reached via a shim onPATHat~/.local/bin/agent-relay— the npm install updates a different, unused copy. The running command stays on the old version, butupdatefalsely reports success and the "Update available" banner never clears.This makes self-update a silent no-op for standalone installs, so users stay pinned to old versions and keep hitting already-fixed bugs.
Impact (concrete)
On 10.6.3 this stranded a user on the
node upenrollment identity mismatch bug (fleet snowflake node id vs relaycast uuid session id — never matches; fixed in 10.6.4). Runningagent-relay updatereportedSuccessfully updated to 10.6.4, but:Only manually repointing the
~/.local/bin/agent-relayshim to the npm 10.6.4 binary made the fix take effect.Steps to reproduce
agent-relayas a standalone binary at~/.agentworkforce/relay/bin/agent-relay, with a shim at~/.local/bin/agent-relay(first onPATH) execing it.agent-relay update.Installing update...→Successfully updated to <new>.agent-relay version→ still reports the old version. The banner keeps nagging.Root cause
runUpdateCommandinpackages/cli/src/cli/lib/core-maintenance.ts:157unconditionally shells out to npm and reports success without verifying the running binary changed:There is no detection of the install method. The codebase already knows standalone binaries live in
~/.local/bin—runUninstallCommandhandles exactly that (core-maintenance.ts:283, "Remove standalone binaries from ~/.local/bin") — butrunUpdateCommandwas never taught the same.Suggested fix
~/.local/binshim /process.execPath.npm install -g.Successfully updated to Xafter confirming the resolved binary now reports the new version; otherwise warn and print the manual remediation.update --check(and the passive banner) should reflect the version of the binary that will actually run, not just the npm package.Environment
~/.local/bin/agent-relay→~/.agentworkforce/relay/bin/agent-relay~/.local/share/mise/installs/node/<ver>/bin/agent-relay