openclaw - 💡(How to fix) Fix [BUG] 2026.4.25: bundled runtime-deps staging blocks gateway for minutes, causing handshake timeouts [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#73002Fetched 2026-04-28 06:28:50
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1

Error Message

| Plugin | Block Time | Error |

Root Cause

Root Cause (Confirmed)

Fix Action

Workaround

None identified. Disabling channels (WhatsApp, Telegram) and QMD memory helps reduce load but does not prevent the plugin staging issue since the staging is triggered for ALL bundled plugins, not just channel plugins.

Code Example

if (shouldLoadModules && shouldInstallBundledRuntimeDeps && candidate.origin === "bundled" && enableState.enabled) {
    // STAGING HAPPENS HERE - SYNCHRONOUSLY!
}
RAW_BUFFERClick to expand / collapse

Bug Description

Running openclaw status (or any CLI command) triggers bundled runtime-deps staging for plugins that are not actively enabled or configured. Each failed plugin install can block for 76-366 seconds. During this window:

  • Gateway HTTP/WS handshakes timeout
  • /healthz can timeout
  • CPU stays at 90%+
  • Gateway appears running but becomes completely unresponsive

Affected Plugins (5 confirmed)

PluginBlock TimeError
acpx76sfailed to stage
amazon-bedrock227sfailed to stage
amazon-bedrock-mantle296sfailed to stage
anthropic366sfailed to stage
anthropic-vertex266sfailed to stage

Environment

  • Version: OpenClaw 2026.4.25 (aa36ee6)
  • OS: WSL2 on Windows (Linux 6.6.87.2-microsoft-standard-WSL2 x64)
  • Node: v24.15.0
  • Gateway: systemd service, bind=lan (0.0.0.0:18789)
  • Channels configured: discord (enabled), whatsapp (disabled), telegram (disabled)

Steps to Reproduce

  1. Start fresh OpenClaw gateway service
  2. Run openclaw status or any CLI command
  3. Watch as gateway begins installing bundled runtime-deps for all plugins, not just enabled ones
  4. Each failed install (missing npm packages, registry timeouts) blocks the event loop for up to 366 seconds
  5. During this time, Node.js WebSocket handshakes fail with handshake timeout and code 1006

Observed Symptoms

Gateway WS: handshake timeout conn=... peer=127.0.0.1:XXXXX->127.0.0.1:18789 Gateway WS: closed before connect ... code=1006 reason=n/a Gateway: node.list very slow (839ms+) CPU: openclaw-gateway at 93.8%

Root Cause (Confirmed)

OpenClaw 2026.4.25 changed the plugin loading mechanism to pre-stage ALL bundled runtime-deps on startup or first CLI invocation, regardless of whether the plugin is actually enabled or needed.

The critical code is in loader-B7s_ViP3.js line ~3210:

if (shouldLoadModules && shouldInstallBundledRuntimeDeps && candidate.origin === "bundled" && enableState.enabled) {
    // STAGING HAPPENS HERE - SYNCHRONOUSLY!
}

Key finding: The affected plugins (acpx, amazon-bedrock, anthropic, anthropic-vertex, etc.) are bundled with OpenClaw by default and are NOT explicitly configured by the user. They are staged automatically because they exist in the bundled plugin registry, not because they are enabled in the user's config.

User's actual config has these providers:

  • lmstudio, lmstudio-112, kilocode, minimax-coding, minimax
  • openrouter:default, venice:default, minimax:default, minimax:global

The bug: ALL bundled plugins get staged, not just the ones the user actually uses. The staging is based on plugin existence (bundled), not actual usage.

The staging process:

  1. Iterates through ALL bundled plugins
  2. Checks if each plugin has missing deps
  3. Attempts npm install for each plugin's bundled deps (SYNCHRONOUSLY)
  4. Blocks for the entire timeout duration on failure (no async fallback)
  5. Repeats this sequentially for every bundled plugin - causing cumulative 10+ minute delays

Workaround

None identified. Disabling channels (WhatsApp, Telegram) and QMD memory helps reduce load but does not prevent the plugin staging issue since the staging is triggered for ALL bundled plugins, not just channel plugins.

Expected Behavior

  1. Plugin deps should only be staged for actually used plugins, not all bundled plugins
  2. Failed dep installs should be non-blocking (async with warning, not sync blocking)
  3. CLI commands should not trigger heavy async work that blocks the gateway
  4. Gateway should remain responsive during plugin staging

Severity

Critical - Gateway becomes completely unavailable for 10+ minutes on any CLI command.

Reported via OpenClaw agent Lisa on 2026-04-27

extent analysis

TL;DR

Modify the plugin loading mechanism to stage only the bundled runtime-deps of enabled plugins, rather than all bundled plugins.

Guidance

  • Identify the plugins that are actually used by the user and modify the loader-B7s_ViP3.js file to only stage the bundled runtime-deps for those plugins.
  • Consider implementing an asynchronous fallback for failed dep installs to prevent blocking.
  • Review the shouldLoadModules and shouldInstallBundledRuntimeDeps conditions to ensure they are correctly filtering out unused plugins.
  • Investigate the possibility of caching or parallelizing the plugin staging process to reduce the overall delay.

Example

// Modified code to stage only enabled plugins
if (shouldLoadModules && shouldInstallBundledRuntimeDeps && candidate.origin === "bundled" && enableState.enabled && isEnabledPlugin(candidate)) {
    // STAGING HAPPENS HERE - ASYNCHRONOUSLY!
}

// Example function to check if a plugin is enabled
function isEnabledPlugin(plugin) {
    // Check if the plugin is in the user's config
    return userConfig.plugins.includes(plugin.name);
}

Notes

The provided code snippet is a hypothetical example and may require modifications to fit the actual implementation. The isEnabledPlugin function is a placeholder and should be replaced with the actual logic to check if a plugin is enabled.

Recommendation

Apply a workaround by modifying the loader-B7s_ViP3.js file to stage only the bundled runtime-deps of enabled plugins, as this is a critical issue that causes the gateway to become unavailable for an extended period.

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 [BUG] 2026.4.25: bundled runtime-deps staging blocks gateway for minutes, causing handshake timeouts [1 comments, 2 participants]