openclaw - 💡(How to fix) Fix Bundled runtime deps can churn when multiple dependency plans share one install root [2 comments, 3 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#75996Fetched 2026-05-03 04:43:30
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
2
Author
Timeline (top)
commented ×2closed ×1

OpenClaw's bundled runtime dependency installer appears able to get into a repeated npm install add/remove loop when multiple bundled plugins/channels share the same runtime dependency install root but write different dependency manifests over time.

This is not a simple missing-package failure. In the observed case, the npm installs usually exited 0, but startup/control-ui/channel loading repeatedly triggered npm, and npm repeatedly added/removed groups of packages.

Error Message

After updating OpenClaw, normal startup/control-ui/channel loading repeatedly showed runtime dependency installs under a path like:

Root Cause

So each individual npm install can succeed, but the shared install root never converges cleanly because different plans keep replacing the manifest with different subsets.

Code Example

~/.openclaw/plugin-runtime-deps/openclaw-<version>-<hash>/

---

npm install ... exit 0

---

npm error code ENOTEMPTY
npm error syscall rename
npm error path .../node_modules/openai
npm error dest .../node_modules/.openai-<tmp>

---

openclaw plugins deps --json
find ~/.openclaw/plugin-runtime-deps -name '*debug-0.log' -mtime -1 -print
pgrep -af 'npm.*install|openclaw.*plugins deps'

---

OpenClaw 2026.4.29
macOS arm64
npm global package install
RAW_BUFFERClick to expand / collapse

Summary

OpenClaw's bundled runtime dependency installer appears able to get into a repeated npm install add/remove loop when multiple bundled plugins/channels share the same runtime dependency install root but write different dependency manifests over time.

This is not a simple missing-package failure. In the observed case, the npm installs usually exited 0, but startup/control-ui/channel loading repeatedly triggered npm, and npm repeatedly added/removed groups of packages.

Observed behavior

After updating OpenClaw, normal startup/control-ui/channel loading repeatedly showed runtime dependency installs under a path like:

~/.openclaw/plugin-runtime-deps/openclaw-<version>-<hash>/

Symptoms included:

npm install ... exit 0

but repeated add/remove churn across subsequent starts or channel/plugin loads.

Related channel load failures also appeared when dependencies had just been pruned or were mid-install, for example missing bundled channel packages such as Slack/Discord/Nostr/Telegram/Feishu deps. A separate but related failure mode looked like npm rename conflicts:

npm error code ENOTEMPTY
npm error syscall rename
npm error path .../node_modules/openai
npm error dest .../node_modules/.openai-<tmp>

Working hypothesis

The runtime dependency installer may be reusing one install execution root for more than one runtime dependency plan. If one subsystem writes a narrower generated package.json, npm treats packages required by a previous/wider plan as extraneous and prunes them. Later, another subsystem needs those packages again and installs them back.

So each individual npm install can succeed, but the shared install root never converges cleanly because different plans keep replacing the manifest with different subsets.

In other words, the issue is not only "some deps are missing". The stronger issue is that distinct runtime dependency plans can prune each other when they share an install root.

Expected behavior

Once bundled runtime deps for the active OpenClaw version have been materialized, normal startup/control-ui/channel loading should not repeatedly run networked npm installs or repeatedly add/remove the same package groups.

Possible fix direction

One possible approach is to make the generated runtime dependency manifest behave as a superset for a shared install root:

  1. When checking whether a dependency plan is already materialized, compare by package name and verify installed versions satisfy the currently required specs.
  2. When writing the generated install manifest, merge existing manifest specs with newly required specs instead of replacing the manifest with only the latest subset.

That makes the shared install root monotonically accumulate the packages required by observed runtime dep plans, instead of allowing a later narrower plan to prune packages required by an earlier/wider one.

Alternative upstream designs that may be cleaner:

  • give each independent runtime dependency plan its own install root
  • compute one full bundled runtime dependency plan before installing
  • move networked install/repair into an explicit prepare/doctor step instead of normal interactive startup paths

Useful diagnostics

Commands that helped distinguish this from a normal missing-dependency issue:

openclaw plugins deps --json
find ~/.openclaw/plugin-runtime-deps -name '*debug-0.log' -mtime -1 -print
pgrep -af 'npm.*install|openclaw.*plugins deps'

The confusing part is that openclaw plugins deps --json can eventually become clean while the user still experiences repeated npm activity during startup/control-ui/channel loading.

Environment

Observed on macOS with OpenClaw installed from npm globally:

OpenClaw 2026.4.29
macOS arm64
npm global package install

Related context

This may be adjacent to earlier runtime dependency work and reports, including:

  • #63309
  • #72270
  • #58782
  • #63065
  • #67099

Those may not be exact duplicates. This issue is specifically about repeated npm add/remove churn caused by different runtime dependency plans sharing and overwriting one install root.

extent analysis

TL;DR

The most likely fix involves modifying the runtime dependency installer to merge existing manifest specs with newly required specs instead of replacing the manifest with only the latest subset.

Guidance

  • Verify the issue by running openclaw plugins deps --json and checking for repeated npm activity during startup/control-ui/channel loading.
  • To mitigate the issue, consider modifying the generated runtime dependency manifest to behave as a superset for a shared install root, by comparing package names and verifying installed versions satisfy the currently required specs.
  • Use diagnostic commands like find ~/.openclaw/plugin-runtime-deps -name '*debug-0.log' -mtime -1 -print and pgrep -af 'npm.*install|openclaw.*plugins deps' to distinguish this from a normal missing-dependency issue.
  • Consider alternative upstream designs, such as giving each independent runtime dependency plan its own install root or computing one full bundled runtime dependency plan before installing.

Example

No code snippet is provided as the issue does not contain sufficient information to generate a specific code example.

Notes

The issue may be related to earlier runtime dependency work and reports, including #63309, #72270, #58782, #63065, and #67099, but this issue is specifically about repeated npm add/remove churn caused by different runtime dependency plans sharing and overwriting one install root.

Recommendation

Apply the workaround by modifying the runtime dependency installer to merge existing manifest specs with newly required specs, as this approach is likely to resolve the repeated npm add/remove churn issue.

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

Once bundled runtime deps for the active OpenClaw version have been materialized, normal startup/control-ui/channel loading should not repeatedly run networked npm installs or repeatedly add/remove the same package groups.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Bundled runtime deps can churn when multiple dependency plans share one install root [2 comments, 3 participants]