openclaw - ✅(Solved) Fix Auto-update detects new version but never installs it [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#74754Fetched 2026-05-01 05:41:45
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
2
Author
Timeline (top)
mentioned ×2subscribed ×2commented ×1cross-referenced ×1

Fix Action

Fix / Workaround

update-check.json correctly detects new versions and records autoFirstSeenAt timestamp. The stableDelayHours window passes but no install is attempted. Workaround: manual brew upgrade openclaw.

PR fix notes

PR #74870: Skip auto-update on Homebrew installs with clear hint (#74754)

Description (problem / solution / changelog)

Closes #74754

Problem

The auto-update path runs openclaw update --yes --channel <channel> --json after the daily check. That command uses npm internally and cannot update a Homebrew-installed binary. On Homebrew installs (brew install openclaw or the tap formula), the daily auto-update either silently no-ops or runs an npm install against a directory the brew node wrapper does not see, so users on Homebrew never get auto-updated and have no clue why.

Reproduced with brew install openclaw on Apple Silicon: update.json records hasUpdate: true for weeks, but autoFirstSeenAt resets every restart and no install ever runs.

Fix

Detect Homebrew-managed installs before spawning the auto-update child:

  • New src/infra/homebrew-install.ts matches the package root (and its realpath) against the canonical Homebrew layouts:
    • <HOMEBREW_PREFIX>/Cellar/openclaw/<version>/... (versioned keg)
    • <HOMEBREW_PREFIX>/opt/openclaw/... (stable opt symlink)
    • Works for /opt/homebrew (Apple Silicon), /usr/local (Intel), and /home/linuxbrew/.linuxbrew (Linuxbrew).
  • update-startup.ts calls the helper before invoking runAutoUpdateCommand. When matched it:
    • Skips the doomed npm invocation entirely.
    • Logs auto-update skipped: Homebrew-managed install (run: brew upgrade openclaw) with the detected Cellar version and channel tag so the user understands why no install ran and what to do next.
    • Reuses the existing lastNotifiedVersion/lastNotifiedTag persistence so the hint fires once per (version, tag) pair rather than every heartbeat.

The explicit openclaw update CLI is intentionally untouched - the issue is about the silent auto-update path. CLI-side parity can land separately if desired.

Tests

  • src/infra/homebrew-install.test.ts (14 cases): pure-string detection across Apple Silicon, Intel, Linuxbrew, opt-symlink and Cellar layouts; rejects vanilla npm globals; realpath-based detection across symlinked opt directories; ghost paths.
  • src/infra/update-startup.test.ts: new case asserts the auto-update child is not invoked and the brew-upgrade hint is logged with the right metadata when the resolved root sits inside Cellar.
✓ infra ../../src/infra/update-startup.test.ts (12 tests)
✓ infra ../../src/infra/homebrew-install.test.ts (14 tests)

 Test Files  2 passed (2)
      Tests  26 passed (26)

Risk

Low. The helper is read-only path matching plus a realpath() lookup. Fall-through behaviour for non-Homebrew installs is unchanged. Worst case a misdetection skips one auto-update cycle and the next openclaw update invocation still works.

Changed files

  • CHANGELOG.md (modified, +6/-0)
  • src/infra/homebrew-install.test.ts (added, +154/-0)
  • src/infra/homebrew-install.ts (added, +95/-0)
  • src/infra/update-startup.test.ts (modified, +52/-0)
  • src/infra/update-startup.ts (modified, +20/-0)
RAW_BUFFERClick to expand / collapse

Steps to reproduce

  1. Set update.auto.enabled = true, update.auto.stableDelayHours = 1, update.checkOnStart = true in openclaw.json
  2. Start gateway. Wait for update-check.json to detect a newer version.
  3. Wait 2+ hours (well past the 1-hour stableDelayHours).
  4. Run openclaw --version — still on old version. No auto-install occurred.

Expected behavior

Gateway should auto-install the newer stable version after the stableDelayHours delay and restart itself.

Actual behavior

update-check.json shows lastAvailableVersion: "2026.4.27" first seen at 2026-04-29T23:26. After 2+ hours, gateway still running 2026.4.25. No auto-install log entries found. Manual brew upgrade required.

OpenClaw version

2026.4.25

Operating system

macOS 15.4 (Darwin 25.4.0, Apple Silicon)

Install method

Homebrew (brew install openclaw)

Model

moonshot/kimi-k2.6

Provider / routing chain

openclaw -> moonshot (direct API)

Additional provider/model setup details

Not model-related. Bug is in the auto-update system, not model routing.

Impact and severity

  • Affected: All Homebrew users with update.auto.enabled = true
  • Severity: Medium (blocks automatic updates, requires manual intervention)
  • Frequency: Always — auto-install never triggers despite correct config
  • Consequence: Users run outdated versions with known bugs, thinking auto-update handles it

Additional information

update-check.json correctly detects new versions and records autoFirstSeenAt timestamp. The stableDelayHours window passes but no install is attempted. Workaround: manual brew upgrade openclaw.

extent analysis

TL;DR

The auto-update mechanism in OpenClaw may not be functioning correctly due to a potential issue with the timing or triggering of the update process after the specified stableDelayHours.

Guidance

  • Verify that the update-check.json file is being updated correctly and that the autoFirstSeenAt timestamp is set as expected.
  • Check the OpenClaw logs for any errors or warnings related to the auto-update process that may indicate why the update is not being triggered.
  • Consider adding additional logging or debugging statements to the auto-update code to gain more insight into the issue.
  • Test the auto-update process with a shorter stableDelayHours value to see if the issue is related to the timing of the update.

Example

No code snippet is provided as the issue seems to be related to the configuration and timing of the auto-update process rather than a specific code error.

Notes

The issue may be specific to the Homebrew installation method or the macOS operating system, and further testing on other platforms or installation methods may be necessary to determine the root cause.

Recommendation

Apply workaround: manual brew upgrade openclaw until the auto-update issue is resolved, as this ensures that users are running the latest version of OpenClaw with the latest bug fixes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Gateway should auto-install the newer stable version after the stableDelayHours delay and restart itself.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING