Skip to content

[Bug]: openclaw update runs full npm install even when already on latest version #69412

Description

@Inhum

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

openclaw update does not check whether the installed version matches the registry version before invoking the package manager. This causes unnecessary work, wastes time, and can be dangerous on resource-constrained systems.

Steps to reproduce

  1. Install OpenClaw (npm global): version 2026.4.15
  2. Verify: npm view openclaw version2026.4.15 (same as installed)
  3. Run: openclaw update
  4. Observe: full npm install runs for ~144 seconds, doctor checks for ~42 seconds
  5. Result: Before: 2026.4.15 → After: 2026.4.15 — no change

Expected behavior

openclaw update should compare the installed version against the registry target before invoking the package manager. If versions match, it should skip the update and exit early:

$ openclaw update
Already on 2026.4.15 (latest). Nothing to update.

Or at minimum, offer --check / --dry-run that exits with code 0/1 based on whether an update is available, without running the package manager.

Actual behavior

$ openclaw update
Updating OpenClaw...
 
│
◇  ✓ Updating via package manager (144.24s)
│
◇  ✓ Running doctor checks (42.31s)
 
Update Result: OK
  Root: /home/admin/.npm-global/lib/node_modules/openclaw
  Before: 2026.4.15
  After: 2026.4.15
 
Total time: 193.46s
 
Updating plugins...
No plugin updates needed.
 
Restarting service...
Daemon restart completed.
 
Update complete. The bugs feared me, so they left.

The full package manager update runs, recompiles native modules (sqlite-vec, sharp, better-sqlite3), and restarts the gateway — all for a no-op version change.

OpenClaw version

2026.04.15

Operating system

Debian 13

Install method

npm global

Model

openrouter/nvidia/nemotron-3-super-120b-a12b:free

Provider / routing chain

openclaw - openrouter - nemotron-3-super-120b-a12b:free

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

On resource-constrained systems (e.g., 4GB RAM VPS without swap), the unnecessary npm install can cause OOM conditions. In our case, running openclaw update while other services were active triggered kswapd0 thrashing and required a hard reboot via the hosting provider's web console.

Additional information

Workaround

We use a wrapper script that checks the version before running update:

#!/bin/bash
cur=$(openclaw --version | grep -oP '\d+\.\d+\.\d+')
latest=$(npm view openclaw version)
if [ "$cur" = "$latest" ]; then
  echo "Already on $cur, skipping update"
else
  echo "Updating $cur -> $latest"
  openclaw update
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions