Skip to content

[Bug]: 2026.7.1 macOS update targets Homebrew Cellar but leaves owning OpenClaw package stale #107074

Closed

Description

@BooRy95

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.

  1. Start with OpenClaw 2026.6.11 installed globally at /opt/homebrew/lib/node_modules/openclaw and /opt/homebrew/bin/openclaw symlinked to ../lib/node_modules/openclaw/openclaw.mjs.
  2. Run the main gateway as a managed macOS LaunchAgent targeting /opt/homebrew/lib/node_modules/openclaw/dist/index.js through /opt/homebrew/opt/node/bin/node.
  3. Use Homebrew Node v26.5.0 and npm 11.17.0. command -v npm is /opt/homebrew/bin/npm; no nvm npm is involved. npm prefix -g reports /opt/homebrew/Cellar/node/26.5.0.
  4. Run:
    openclaw update --yes --json --timeout 1800
  5. 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/openclaw was 2026.7.1.
  • The LaunchAgent was rewritten to /opt/homebrew/Cellar/node/26.5.0/lib/node_modules/openclaw/dist/index.js and labeled v2026.7.1.
  • /opt/homebrew/bin/openclaw still resolved through /opt/homebrew/lib/node_modules/openclaw, which remained 2026.6.11.
  • Managed official plugins had already advanced to 2026.7.1.
  • Commands through /opt/homebrew/bin/openclaw therefore saw a 2026.6.11 host with 2026.7.1 plugins, 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 --json

After 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: ok

Screenshots, 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.11 to 2026.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

Activity

  1. added
    P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.
    impact:crash-loopCrash, hang, restart loop, or process-level availability failure.
    impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on Jul 14, 2026
  2. clawsweeper commented on Jul 14, 2026

    @clawsweeper
    Contributor

    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: canonical
    Canonical: #107074
    Summary: This issue is the active canonical report for a Homebrew-only recurrence of the earlier npm global-root mismatch failure class.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.
    • Include redacted logs or terminal output.

    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:

    • Current main appears designed to preserve the owning npm package root, but no focused evidence yet proves the reported Homebrew npm layout against current main or identifies whether the failure is in initial target selection, managed-service redirection, or post-core handoff.
    • The issue may be a release-only regression already corrected after v2026.7.1, but the specific fixing commit and release inclusion have not been established, so an implemented-on-main close would be premature.

    Codex review notes: model internal, reasoning high; reviewed against ac4fd2ad4265.

    Label changes

    Label changes:

    • add P0: A stable update left a real managed gateway unavailable and recovery required explicit npm-prefix commands plus LaunchAgent repair.
    • add impact:crash-loop: The package-root split prevented the managed gateway from returning to a ready state after update.
    • add 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.
    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • add 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:

    • Observed stable-release failure: The report records a 2026.6.11-to-2026.7.1 update placing OpenClaw 2026.7.1 under the versioned Homebrew Node Cellar while the active /opt/homebrew/bin/openclaw package remained 2026.6.11, leaving the managed gateway unavailable until explicit prefix and LaunchAgent repair. (2d2ddc43d0dc)
    • Current owning-root selection: Current main explicitly treats the npm prefix inferred from the running package root as authoritative over the root reported by PATH-resolved npm, directly addressing the stale-running-tree failure class. (src/infra/update-global.ts:3659, ac4fd2ad4265)
    • Explicit npm prefix support: The global npm install command accepts an install prefix and emits --prefix for the selected target, so the remaining question is why the shipped flow selected or propagated the Cellar target in this Homebrew layout. (src/infra/update-global.ts:3876, ac4fd2ad4265)
    • Staged installation boundary: The package updater installs into a staging prefix, verifies it, and then swaps the staged package into installTarget.packageRoot; a regression test must prove the final target remains /opt/homebrew/lib/node_modules/openclaw when Homebrew npm reports a Cellar global prefix. (src/infra/package-update-steps.ts:2892, ac4fd2ad4265)
    • Managed-service root handling: Current main separately resolves the managed gateway package root and Node runner before creating the package install target, making service-root redirection and fresh-process handoff relevant suspects for the observed LaunchAgent rewrite. (src/cli/update-cli/update-command.ts:3576, ac4fd2ad4265)
    • Related earlier failure class: openclaw update leaves gateway down + unbootable on split Homebrew/nvm installs #80384 and [Bug]: openclaw update uses npm from PATH instead of the npm that owns the installed global package #60150 describe the same canonical-root invariant failing when npm reports a different global root, but this report adds a distinct Homebrew-only reproduction without nvm.

    Likely related people:

    • amknight: Recent release history credits this contributor with managed Gateway Node and update follow-up behavior in the same package-update and service-restart surface; exact ownership of this Homebrew prefix edge remains uncertain. (role: recent updater contributor; confidence: medium; files: src/cli/update-cli/update-command.ts, src/infra/update-global.ts, src/infra/package-update-steps.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  3. steipete commented on Jul 29, 2026

    @steipete
    Contributor

    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.

  4. locked as resolved and limited conversation to collaborators on Oct 4, 2026
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

    P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions