openclaw - 💡(How to fix) Fix openclaw update does not sync embedded openclaw copy in ~/.openclaw/extensions/node_modules/ [1 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#61844Fetched 2026-04-08 02:53:40
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Error Message

Error: session file locked (timeout 10000ms): unknown /path/to/sessions.json.lock

Fix Action

Workaround

cd ~/.openclaw/extensions && npm update openclaw

Then restart the gateway.

Code Example

Error: session file locked (timeout 10000ms): unknown /path/to/sessions.json.lock

---

cd ~/.openclaw/extensions && npm update openclaw

---

cd ~/.openclaw/extensions && npm update openclaw
RAW_BUFFERClick to expand / collapse

Describe the bug

When upgrading openclaw via npm install -g openclaw@<version>, the global binary at /usr/local/lib/node_modules/openclaw is updated correctly. However, the embedded openclaw copy used by the extensions runtime at ~/.openclaw/extensions/node_modules/openclaw is not updated and remains on the previous version.

Example

This version gap caused Feishu/Lark session write-lock contention errors during high-concurrency cron runs:

Error: session file locked (timeout 10000ms): unknown /path/to/sessions.json.lock

The error was triggered repeatedly when 14+ cron sessions, Feishu listeners, and subagents all competed for the single sessions.json write lock. The issue was resolved only after manually running:

cd ~/.openclaw/extensions && npm update openclaw

Expected behavior

openclaw update (or the global install process) should automatically sync ~/.openclaw/extensions/node_modules/openclaw to match the installed version.

Workaround

cd ~/.openclaw/extensions && npm update openclaw

Then restart the gateway.

Environment

  • openclaw: 2026.4.5
  • Node: v24.13.1
  • Platform: macOS darwin 25.3.0

extent analysis

TL;DR

Manually updating the embedded openclaw copy used by the extensions runtime using npm update openclaw in the ~/.openclaw/extensions directory resolves the version gap issue.

Guidance

  • The version gap between the global openclaw installation and the embedded copy in ~/.openclaw/extensions/node_modules/openclaw causes the session write-lock contention errors.
  • To verify the fix, check the versions of openclaw in both locations after running the update command: npm ls openclaw in the global directory and ~/.openclaw/extensions.
  • Restart the gateway after updating the embedded openclaw copy to ensure the changes take effect.
  • Consider adding the manual update step to the upgrade process to prevent similar issues in the future.

Example

cd ~/.openclaw/extensions && npm update openclaw

This command updates the embedded openclaw copy to the latest version, matching the global installation.

Notes

The issue seems to be specific to the upgrade process of openclaw, and the provided workaround resolves the version gap. However, it is unclear why the global installation does not automatically update the embedded copy.

Recommendation

Apply the workaround by manually updating the embedded openclaw copy using npm update openclaw in the ~/.openclaw/extensions directory, as this resolves the version gap and prevents session write-lock contention errors.

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

openclaw update (or the global install process) should automatically sync ~/.openclaw/extensions/node_modules/openclaw to match the installed version.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING