openclaw - 💡(How to fix) Fix Runtime deps staging mirrors all 53 built-in plugins regardless of config — 25x size increase from v2026.4.27 to v2026.4.29 [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#75826Fetched 2026-05-02 05:29:28
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
2
Timeline (top)
closed ×1commented ×1mentioned ×1subscribed ×1

After updating from v2026.4.27 to v2026.4.29, the plugin runtime dependency staging directory exploded from 79 modules / 235MB to 551 modules / 4.5GB. This causes severe event loop stalls (60+ seconds), rendering the gateway effectively unresponsive.

The root cause appears to be that the runtime stages dependencies for all 53 built-in plugins regardless of which plugins are enabled in openclaw.json. Disabling plugins or removing them from plugins.entries has no effect on staging.

Root Cause

The root cause appears to be that the runtime stages dependencies for all 53 built-in plugins regardless of which plugins are enabled in openclaw.json. Disabling plugins or removing them from plugins.entries has no effect on staging.

Fix Action

Workaround

  • Roll back to v2026.4.27 using npm install -g [email protected]
  • Preserve the original lean runtime deps directory — do not delete it
  • If deps were regenerated (bloated), delete the bloated staging directory and keep the original
  • Do not clear the deps directory between restarts; restarts reuse existing deps and start fast

Code Example

[diagnostic] liveness warning: eventLoopDelayMaxMs=58082.7 eventLoopUtilization=0.971

---

[diagnostic] liveness warning: eventLoopDelayMaxMs=59827.6 eventLoopUtilization=0.981

---

[diagnostic] liveness warning: eventLoopDelayP99Ms=360.4 eventLoopDelayMaxMs=10695.5 eventLoopUtilization=0.709

---

[ws] ⇄ res ✓ models.list 22639ms
[ws] ⇄ res ✓ chat.history 22643ms
[ws] ⇄ res ✓ sessions.list 22665ms

---

npm install @matrix-org/matrix-sdk-crypto-nodejs @matrix-org/matrix-sdk-crypto-wasm fake-indexeddb jiti markdown-it matrix-js-sdk music-metadata
RAW_BUFFERClick to expand / collapse

Description

After updating from v2026.4.27 to v2026.4.29, the plugin runtime dependency staging directory exploded from 79 modules / 235MB to 551 modules / 4.5GB. This causes severe event loop stalls (60+ seconds), rendering the gateway effectively unresponsive.

The root cause appears to be that the runtime stages dependencies for all 53 built-in plugins regardless of which plugins are enabled in openclaw.json. Disabling plugins or removing them from plugins.entries has no effect on staging.

Environment

  • OpenClaw version: 2026.4.29 (rolled back to 2026.4.27)
  • OS: Linux 6.12.77-haos (x64) / HAOS add-on (Machine A), WSL2 on Win11 (Machine B)
  • Node: v22.22.2
  • Hardware: Intel N150 mini PC, 32GB RAM (Machine A); desktop PC (Machine B)
  • Enabled plugins (Machine A): brave, xai, anthropic, google, moonshot, ollama, openrouter, openai, microsoft (9 plugins)
  • Enabled plugins (Machine B): telegram, brave, anthropic, xai, moonshot, ollama, openrouter, deepseek, google, openai (10 plugins)

Reproduction

  1. Install OpenClaw v2026.4.27 — observe runtime deps at ~235MB / 79 modules
  2. Update to v2026.4.29 — observe runtime deps at ~4.5GB / 551 modules
  3. Gateway becomes unresponsive during and after dep staging

Observed Behaviour

Dependency staging comparison

VersionModulesSizeBehaviour
2026.4.27 (original install)79235MBFast startup, responsive
2026.4.27 (fresh npm reinstall)5181.7GBBloated — different staging hash
2026.4.295514.5GBUnusable

Event loop impact (from gateway diagnostic logs)

v2026.4.29 (Machine B):

[diagnostic] liveness warning: eventLoopDelayMaxMs=58082.7 eventLoopUtilization=0.971

v2026.4.27 after dep restaging (Machine B):

[diagnostic] liveness warning: eventLoopDelayMaxMs=59827.6 eventLoopUtilization=0.981

v2026.4.27 after staging complete (Machine A):

[diagnostic] liveness warning: eventLoopDelayP99Ms=360.4 eventLoopDelayMaxMs=10695.5 eventLoopUtilization=0.709

models.list stall

On both machines, the models.list WebSocket call takes 15-22 seconds on startup, blocking chat.history and sessions.list behind it:

[ws] ⇄ res ✓ models.list 22639ms
[ws] ⇄ res ✓ chat.history 22643ms
[ws] ⇄ res ✓ sessions.list 22665ms

After the initial stall, subsequent calls are fast (~71ms). This appears to be a separate but related issue.

Background npm install during operation

During dep staging, the gateway spawns npm install for packages not required by the user's config, including:

npm install @matrix-org/matrix-sdk-crypto-nodejs @matrix-org/matrix-sdk-crypto-wasm fake-indexeddb jiti markdown-it matrix-js-sdk music-metadata

This runs at 100-138% CPU and blocks the event loop for the entire duration (2-4 minutes).

Expected Behaviour

  1. The gateway should only stage runtime dependencies for enabled plugins, not all 53 built-in ones
  2. A config with 9-10 enabled plugins should not trigger installation of Matrix SDK, music-metadata, and other unrelated dependencies
  3. Dep staging should not block the event loop — it should either complete before the gateway starts serving, or run without blocking the main thread
  4. A fresh npm install of the same version should produce the same lean dep set as the original install, not a bloated variant with a different hash

Workaround

  • Roll back to v2026.4.27 using npm install -g [email protected]
  • Preserve the original lean runtime deps directory — do not delete it
  • If deps were regenerated (bloated), delete the bloated staging directory and keep the original
  • Do not clear the deps directory between restarts; restarts reuse existing deps and start fast

Suggested Fix

  1. Filter staged deps by enabled plugins. Only install runtime dependencies for plugins that are enabled: true in the user's config. This alone would reduce the staging footprint from 53 plugins to typically 9-10.
  2. Non-blocking staging. If staging must happen at runtime, run it in a worker thread or complete it before the gateway starts accepting connections.
  3. Deterministic staging hash. A fresh npm install of the same version should produce identical deps to the original install, not a different hash with different (larger) contents.

extent analysis

TL;DR

The most likely fix is to filter staged dependencies by enabled plugins and implement non-blocking staging to prevent event loop stalls.

Guidance

  • Verify that the issue is resolved by checking the dependency staging directory size and the event loop delay after applying the suggested fixes.
  • Implement a mechanism to filter staged dependencies based on the enabled status of plugins in the user's config to reduce the staging footprint.
  • Consider running dependency staging in a worker thread or completing it before the gateway starts accepting connections to prevent event loop blocking.
  • Ensure that a fresh npm install of the same version produces identical dependencies to the original install, with the same hash and contents.

Example

No code snippet is provided as the issue does not require a specific code change, but rather a change in the dependency staging logic.

Notes

The suggested fixes assume that the issue is caused by the changed dependency staging behavior in version 2026.4.29. If the issue persists after applying these fixes, further investigation may be necessary.

Recommendation

Apply the suggested fixes, specifically filtering staged dependencies by enabled plugins and implementing non-blocking staging, to resolve the issue and prevent event loop stalls.

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…

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 Runtime deps staging mirrors all 53 built-in plugins regardless of config — 25x size increase from v2026.4.27 to v2026.4.29 [1 comments, 2 participants]