openclaw - 💡(How to fix) Fix [Feature]: Expose `installBundledRuntimeDeps: false` + make `isolatedExecutionRoot` default for bundled plugin runtime deps [3 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#75032Fetched 2026-05-01 05:38:56
View on GitHub
Comments
3
Participants
3
Timeline
5
Reactions
3
Author
Timeline (top)
commented ×3cross-referenced ×2

Two adjacent config-surface changes to give operators an escape hatch from the bundled runtime deps lazy-stage cycle, which has been a recurring source of event-loop stalls and disk bloat (#74949, #73532, #56733, #74860 are all downstream symptoms).

Error Message

  • Fail fast with a clear error if a required plugin dep is missing, rather than silently re-installing

Root Cause

  • #74949 fix is necessary but not sufficient — it stops the destructive prune but lazy-stage still fires every 3-12 min, blocking the event loop with each spawnSync
  • #73532 documents the hot-loop residual after #74949
  • The issues listed above are all distinct symptoms of the same root cause: a lazy-stage system that's mandatory and shares state across plugins

Giving operators these two knobs would let production deployments turn lazy-stage off entirely, while keeping the convenience for single-plugin / dev setups that benefit from the auto-install behavior.

Fix Action

Fix / Workaround

Operators currently have to either patch package.json manually (per #74949) or apply OPENCLAW_PLUGIN_STAGE_DIR via systemd drop-in to get the isolated path. Neither is documented.

This is the proper fix for operators who:

  • Run on disk-constrained hosts (lazy-stage cache reaches 30+ GB)
  • Run latency-sensitive workloads where the 12s+ event-loop block is unacceptable
  • Have already declared the 39 plugin deps in their host package.json (the #74949 workaround)

Changing the default to the isolated path that already exists in source would:

  • Make a single-host, multi-plugin deployment safe out of the box
  • Remove the need for users to discover and apply the OPENCLAW_PLUGIN_STAGE_DIR env var as a workaround
  • Not change behavior for anyone explicitly opting into the legacy shared root

Code Example

# openclaw.json
{
  "plugins": {
    "installBundledRuntimeDeps": false   // default: true
  }
}
RAW_BUFFERClick to expand / collapse

Summary

Two adjacent config-surface changes to give operators an escape hatch from the bundled runtime deps lazy-stage cycle, which has been a recurring source of event-loop stalls and disk bloat (#74949, #73532, #56733, #74860 are all downstream symptoms).

What's already in source

Reading dist/bundled-runtime-deps-*.js and dist/loader-*.js in 2026.4.24 shows two relevant code paths that exist but are gated:

  1. loader-NucjcOgv.js:2240 references installBundledRuntimeDeps: false as an option — the code branch is there but isn't surfaced through openclaw.json config schema or CLI
  2. bundled-runtime-deps-BdEAdjwi.js#resolveBundledRuntimeDepsExternalBaseDir already implements an isolatedExecutionRoot path (separate staging dir + atomic replace) — but the default installExecutionRoot is the legacy shared-root path

Operators currently have to either patch package.json manually (per #74949) or apply OPENCLAW_PLUGIN_STAGE_DIR via systemd drop-in to get the isolated path. Neither is documented.

Proposed changes

1. Surface installBundledRuntimeDeps: false as a config field

# openclaw.json
{
  "plugins": {
    "installBundledRuntimeDeps": false   // default: true
  }
}

When false, the plugin loader should:

  • Skip the lazy-stage spawnSync entirely
  • Assume the operator has provided the runtime deps externally (e.g., via the host's package.json + npm install already done)
  • Fail fast with a clear error if a required plugin dep is missing, rather than silently re-installing

This is the proper fix for operators who:

  • Run on disk-constrained hosts (lazy-stage cache reaches 30+ GB)
  • Run latency-sensitive workloads where the 12s+ event-loop block is unacceptable
  • Have already declared the 39 plugin deps in their host package.json (the #74949 workaround)

2. Make isolatedExecutionRoot the default

The current default puts plugin deps installs at the same root the host openclaw uses. For multi-plugin deployments this causes the destructive prune problem #74949 describes (different plugins' lazy-stage cycles mutually pruning each other's deps).

Changing the default to the isolated path that already exists in source would:

  • Make a single-host, multi-plugin deployment safe out of the box
  • Remove the need for users to discover and apply the OPENCLAW_PLUGIN_STAGE_DIR env var as a workaround
  • Not change behavior for anyone explicitly opting into the legacy shared root

3. Document the resulting matrix

installBundledRuntimeDepsisolatedExecutionRootBehavior
true (default)true (proposed default)Per-plugin isolated lazy-stage. No mutual prune. Cycles still happen but safe.
truefalseLegacy 2026.4.24 default. Destructive prune across plugins.
falsen/aOperator-managed deps. No spawnSync. Plugin loader trusts host node_modules.

Why this matters

  • #74949 fix is necessary but not sufficient — it stops the destructive prune but lazy-stage still fires every 3-12 min, blocking the event loop with each spawnSync
  • #73532 documents the hot-loop residual after #74949
  • The issues listed above are all distinct symptoms of the same root cause: a lazy-stage system that's mandatory and shares state across plugins

Giving operators these two knobs would let production deployments turn lazy-stage off entirely, while keeping the convenience for single-plugin / dev setups that benefit from the auto-install behavior.

Environment of the deployment that motivated this request

  • OpenClaw: 2026.4.24
  • Node: v22.22.0, npm: v10
  • Plugins enabled: discord, feishu, telegram, qqbot, wecom, ddingtalk, openai, kimi (8 channels)
  • Disk impact: ~38 GB cache bloat from repeated re-installs across ~14 days, 91% disk usage on a 120 GB volume before manual cleanup
  • Channel impact: Discord WebSocket invalid-session loops during npm storms; Feishu HTTP timeouts (axios 30s)

Happy to test patches against this deployment.

extent analysis

TL;DR

To address the recurring issues with event-loop stalls and disk bloat, surface the installBundledRuntimeDeps config field and make isolatedExecutionRoot the default.

Guidance

  • Surface installBundledRuntimeDeps: false as a config field in openclaw.json to allow operators to opt-out of lazy-stage and manage runtime dependencies externally.
  • Change the default isolatedExecutionRoot to the isolated path to prevent destructive pruning across plugins in multi-plugin deployments.
  • Document the resulting configuration matrix to help operators understand the behavior of different settings.
  • Test patches against the provided deployment environment to ensure the fixes work as expected.

Example

# openclaw.json
{
  "plugins": {
    "installBundledRuntimeDeps": false
  }
}

This configuration tells the plugin loader to skip lazy-stage and assume the operator has provided the runtime dependencies externally.

Notes

The proposed changes aim to address the root cause of the issues by providing operators with more control over the lazy-stage behavior and preventing destructive pruning across plugins. However, the effectiveness of these changes may depend on the specific deployment environment and plugin configurations.

Recommendation

Apply the proposed changes to surface the installBundledRuntimeDeps config field and make isolatedExecutionRoot the default, as they address the root cause of the issues and provide operators with more control over the lazy-stage behavior.

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 [Feature]: Expose `installBundledRuntimeDeps: false` + make `isolatedExecutionRoot` default for bundled plugin runtime deps [3 comments, 3 participants]