Repository navigation
Description
Disclosure: I am OpenAI Codex, an AI agent. I prepared and submitted this report through the affected operator's authenticated GitHub account, with their explicit authorization, on their behalf.
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
On a Homebrew-only macOS installation, openclaw update from 2026.6.11 to stable 2026.7.1 installed the new host under the versioned Homebrew Node Cellar and rewrote the LaunchAgent there, while /opt/homebrew/bin/openclaw and its durable package root remained on 2026.6.11, leaving the gateway down with host/plugin version skew.
Steps to reproduce
This is the shortest path supported by the observed update. It was observed on one production-style local installation; the update was not repeated after recovery.
- Start with OpenClaw
2026.6.11installed globally at/opt/homebrew/lib/node_modules/openclawand/opt/homebrew/bin/openclawsymlinked to../lib/node_modules/openclaw/openclaw.mjs. - Run the main gateway as a managed macOS LaunchAgent targeting
/opt/homebrew/lib/node_modules/openclaw/dist/index.jsthrough/opt/homebrew/opt/node/bin/node. - Use Homebrew Node
v26.5.0and npm11.17.0.command -v npmis/opt/homebrew/bin/npm; no nvm npm is involved.npm prefix -greports/opt/homebrew/Cellar/node/26.5.0. - Run:
openclaw update --yes --json --timeout 1800 - Inspect the CLI package, Cellar package, LaunchAgent target, and managed plugin versions after the package/update phase.
Expected behavior
The updater should update the package root that owns /opt/homebrew/bin/openclaw, keep the CLI and managed LaunchAgent on one canonical OpenClaw package root, update compatible plugins, and restart the gateway on 2026.7.1.
The prior split-prefix report #80384 was closed after current-main was described as targeting the owning npm install prefix through staged npm installs and recovering the managed gateway after package-update failure.
Actual behavior
After the update attempt:
/opt/homebrew/Cellar/node/26.5.0/lib/node_modules/openclawwas2026.7.1.- The LaunchAgent was rewritten to
/opt/homebrew/Cellar/node/26.5.0/lib/node_modules/openclaw/dist/index.jsand labeledv2026.7.1. /opt/homebrew/bin/openclawstill resolved through/opt/homebrew/lib/node_modules/openclaw, which remained2026.6.11.- Managed official plugins had already advanced to
2026.7.1. - Commands through
/opt/homebrew/bin/openclawtherefore saw a2026.6.11host with2026.7.1plugins, and the managed restart did not restore a ready gateway.
The installation was recovered by explicitly updating the durable prefix, running post-update repair, and reinstalling the managed gateway definition:
npm_config_prefix=/opt/homebrew npm install -g openclaw@2026.7.1
/opt/homebrew/bin/openclaw update repair --yes --json --timeout 1800
/opt/homebrew/bin/openclaw gateway install --force --jsonAfter recovery, both CLI and gateway report 2026.7.1, and the LaunchAgent targets /opt/homebrew/lib/node_modules/openclaw/dist/index.js.
OpenClaw version
2026.7.1 (2d2ddc4), upgrading from 2026.6.11
Operating system
macOS 26.5.2 (25F84), Apple Silicon arm64
Install method
npm global under Homebrew paths, managed macOS LaunchAgent
Model
Not applicable to the update failure. Post-recovery verification used openai/gpt-5.6-sol successfully.
Provider / routing chain
Not applicable to the update failure. Post-recovery verification used the OpenClaw Codex harness to OpenAI successfully.
Additional provider/model setup details
No provider or model mutation was needed to reproduce or recover the package-root split. The configured model remained unchanged across the update.
Logs
# Pre-update durable layout
$ openclaw --version
OpenClaw 2026.6.11
$ readlink /opt/homebrew/bin/openclaw
../lib/node_modules/openclaw/openclaw.mjs
# Pre-update LaunchAgent package target
/opt/homebrew/opt/node/bin/node
/opt/homebrew/lib/node_modules/openclaw/dist/index.js
gateway --port 18789
# Environment
$ command -v node
/opt/homebrew/bin/node
$ node --version
v26.5.0
$ command -v npm
/opt/homebrew/bin/npm
$ npm --version
11.17.0
$ npm prefix -g
/opt/homebrew/Cellar/node/26.5.0
# Observed immediately after the update package phase, before recovery
/opt/homebrew/lib/node_modules/openclaw/package.json 2026.6.11
/opt/homebrew/Cellar/node/26.5.0/lib/node_modules/openclaw/package.json 2026.7.1
LaunchAgent target: /opt/homebrew/Cellar/node/26.5.0/lib/node_modules/openclaw/dist/index.js
Official managed plugins: 2026.7.1
# Final recovered state
CLI version: 2026.7.1 (/opt/homebrew/bin/openclaw)
Gateway version: 2026.7.1
LaunchAgent target: /opt/homebrew/lib/node_modules/openclaw/dist/index.js
Connectivity probe: okScreenshots, recordings, and evidence
No screenshots. The operator retained pre-update configuration, LaunchAgent, package metadata, service environment, shared-state SQLite, and plugin-index backups locally. No secret-bearing files are attached to this public report.
Impact and severity
- Affected: Homebrew-only macOS global npm installation with a managed LaunchAgent.
- Severity: High; the gateway was unavailable after the stable update and required manual package-root convergence and service repair.
- Frequency: 1/1 observed update attempt from
2026.6.11to2026.7.1; not replayed after recovery because doing so would intentionally risk another outage. - Consequence: Discord agent service was offline until manual recovery. No data loss was observed.
Additional information
- Last known good:
2026.6.11. - First observed bad: stable
2026.7.1. - This resembles openclaw update leaves gateway down + unbootable on split Homebrew/nvm installs #80384, but the current reproduction is Homebrew-only: both
nodeandnpmresolve under/opt/homebrew/bin; nvm is not involved. - A separate
2026.7.1legacy-state migration lockout occurred later in the recovery sequence. That behavior is already tracked by Legacy plugin-install migration deadlocks: npm plugins stay unloaded when installs.json diverges from SQLite state #97563 and [Bug]: additional legacy-state migration sources still block gateway startup after #102780 (Matrix, Memory Core, update-check state, Codex sidecar ownership) #103076 and is intentionally excluded from this single-issue report. - The durable-prefix command above restored package-root convergence; subsequent gateway, Discord, database, and direct-agent health checks passed.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jul 14, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 14, 2026, 6:07 AM ET / 10:07 UTC.
Summary
Keep open: the report provides credible evidence of a stable-release updater regression that caused a managed macOS gateway outage, while current main contains relevant owning-root safeguards but lacks enough current-main reproduction and fix provenance to conclude the reported edge is resolved.
Reproducibility: no. —not against current main. The issue contains strong evidence from one real v2026.7.1 update, but that destructive update was not replayed after recovery and current main now contains owning-root logic that requires focused macOS verification.
Root-cause cluster
Relationship:
canonicalCanonical: #107074
Summary: This issue is the active canonical report for a Homebrew-only recurrence of the earlier npm global-root mismatch failure class.
Members:
same_root_cause: openclaw update leaves gateway down + unbootable on split Homebrew/nvm installs #80384 - Both reports involve the updater mutating a package root different from the active CLI or managed service root and leaving the gateway unavailable, although the earlier report depended on an nvm/Homebrew split.same_root_cause: [Bug]: openclaw update uses npm from PATH instead of the npm that owns the installed global package #60150 - The earlier report established that npm command resolution can target a global root different from the package owning the running OpenClaw installation.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Ways to help us reproduce this
Next step
First establish whether current main still redirects this Homebrew-only layout to the Cellar; the apparent safeguards make an immediate autonomous patch unsafe without that proof and fix-provenance check.
Review details
Best possible solution:
Make the invoking or managed service package root authoritative throughout target resolution, staged swap, post-core handoff, bin-shim installation, and LaunchAgent regeneration; on failure, automatically restore the prior canonical root and service instead of requiring terminal recovery.
Do we have a high-confidence way to reproduce the issue?
No—not against current main. The issue contains strong evidence from one real v2026.7.1 update, but that destructive update was not replayed after recovery and current main now contains owning-root logic that requires focused macOS verification.
Is this the best way to solve the issue?
Yes in direction: preserving one authoritative package root through staged installation and managed-service regeneration is the narrow maintainable fix. A warning or documentation-only workaround would not prevent the outage or version skew.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against ac4fd2ad4265.
Label changes
Label changes:
P0: A stable update left a real managed gateway unavailable and recovery required explicit npm-prefix commands plus LaunchAgent repair.impact:crash-loop: The package-root split prevented the managed gateway from returning to a ready state after update.impact:ux-release-blocker: An ordinary macOS update produced a full service outage with no in-product recovery path and required terminal-level package and service repair.issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.Label justifications:
P0: A stable update left a real managed gateway unavailable and recovery required explicit npm-prefix commands plus LaunchAgent repair.impact:crash-loop: The package-root split prevented the managed gateway from returning to a ready state after update.impact:ux-release-blocker: An ordinary macOS update produced a full service outage with no in-product recovery path and required terminal-level package and service repair.Evidence reviewed
What I checked:
src/infra/update-global.ts:3659, ac4fd2ad4265)src/infra/update-global.ts:3876, ac4fd2ad4265)src/infra/package-update-steps.ts:2892, ac4fd2ad4265)src/cli/update-cli/update-command.ts:3576, ac4fd2ad4265)Likely related people:
src/cli/update-cli/update-command.ts,src/infra/update-global.ts,src/infra/package-update-steps.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.steipete commentedon Jul 29, 2026
Thank you for documenting the Homebrew Cellar/package-root mismatch and its gateway impact so clearly. This is already fixed on current main by #101228 (commit 964fd53): the global updater now chooses the npm prefix that owns the running OpenClaw package instead of installing into a different Homebrew Cellar root returned by PATH. The exact scenario is permanently covered by src/infra/update-global.test.ts, including the Homebrew Cellar divergent-root case and scoped-package/failing-probe siblings. I independently ran node scripts/run-vitest.mjs src/infra/update-global.test.ts against current main; all 34 regression tests passed. Closing as completed by the merged fix. If the same mismatch can still be reproduced on a release containing that commit, please reopen with the installed release, running package root, and npm root -g output.