-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Bug]: openclaw update command fails with EBUSY error on Windows #40540
Description
Bug type
Behavior bug (incorrect output/state without crash)
Summary
Description
Running openclaw update fails with EBUSY error, preventing OpenClaw from updating itself.
Environment
OS: Windows_NT 10.0.20348
Node: v22.22.0
OpenClaw: 2026.3.2
Root Cause Analysis
The openclaw update command attempts to update itself via npm while it is still running. During the update process, npm needs to rename/move the node_modules/openclaw directory, but this directory is locked by the current process, causing Windows to reject the rename operation.
This is a "self-update" design issue: the update process needs to replace the directory it is running from, but the directory is occupied by itself.
Temporary Workaround
- Stop Gateway service:
openclaw gateway stop - Kill any remaining node processes:
taskkill /F /IM node.exe - Manually update:
npm install -g openclaw - Restart Gateway:
openclaw gateway start
Suggested Fixes
- Option A: Spawn a separate child process to execute npm update, rather than running in the current Gateway process
- Option B: Download new version to a temp directory first, then switch after update completes (blue-green deployment)
- Option C: Prompt user to stop Gateway service before updating
Steps to reproduce
use openclaw update command to upgrade from version 2026.3.2 to v2026.3.7.
Expected behavior
system updated to v2026.3.7.
Actual behavior
Update Result: ERROR
Root: C:\Users\Administrator\AppData\Roaming\npm\node_modules\openclaw
Reason: global update (omit optional)
Before: 2026.3.2
After: 2026.3.2
OpenClaw version
2026.3.2
Operating system
Windows_NT 10.0.20348
Install method
No response
Logs, screenshots, and evidence
Update Result: ERROR
Root: C:\Users\Administrator\AppData\Roaming\npm\node_modules\openclaw
Reason: global update (omit optional)
Before: 2026.3.2
After: 2026.3.2
Steps:
✗ global update (30.42s)
npm error code EBUSY
npm error syscall rename
npm error path C:\Users\Administrator\AppData\Roaming\npm\node_modules\openclaw
npm error dest C:\Users\Administrator\AppData\Roaming\npm\node_modules\.openclaw-oHGnns6k
npm error errno -4082Impact and severity
No response
Additional information
No response