openclaw - 💡(How to fix) Fix Cold-Load Bottleneck in tools --help / effective / status --usage (2026.4.23) [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#73477Fetched 2026-04-29 06:19:22
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
cross-referenced ×3commented ×1

Even after pruning disabled bundled plugins and clearing the runtime-deps cache, openclaw tools --help, openclaw tools effective, and openclaw status --usage still time out after ~12 seconds. The bottleneck is not the discovery phase itself, but the plugin registry load/tool resolution path.

Root Cause

The bottleneck is not the discoverOpenClawPlugins() call itself (now only 7 candidates). Instead, the tools and effective commands force a full runtime plugin registry load via resolveRuntimePluginRegistry(), which:

  1. Iterates all discovery candidates (even disabled ones) in loadPluginManifestRegistry()
  2. Loads manifests for each candidate
  3. Resolves enable state after the manifest loop (resolveEffectiveEnableState)

Key code paths:

  • tools-BDzuLs8q.js:33-45resolvePluginTools()resolveRuntimePluginRegistry()
  • loader-DeOtDUYt.js:2687-2700discoverOpenClawPlugins() + loadPluginManifestRegistry() (runs before enable filter)
  • manifest-registry-D5n47dku.js:574-600 → Manifest loading loop over all candidates
  • loader-DeOtDUYt.js:2738-2788 → Enable check happens after discovery & manifest load

Fix Action

Fix / Workaround

Impact

  • CLI commands (tools --help, tools effective, status --usage) are unusably slow
  • Active users perceive hangs on every fresh CLI invocation
  • Workaround (pruning config) only partially helps; physical plugin removal still leaves manifest-loading overhead

Code Example

sudo mv /usr/local/lib/node_modules/openclaw/dist/extensions/\{anthropic,moonshot,…\} \
     /usr/local/lib/node_modules/openclaw/dist/extensions-disabled-2026-04-28/

---

sudo rm -rf /home/node/.openclaw/plugin-runtime-deps/*

---

openclaw gateway restart

---

time openclaw tools --help
   time openclaw tools effective
   time openclaw status --usage
   time openclaw status --json  # control (fast)
RAW_BUFFERClick to expand / collapse

Cold-Load Bottleneck in openclaw tools --help / tools effective / status --usage (2026.4.23)

Summary

Even after pruning disabled bundled plugins and clearing the runtime-deps cache, openclaw tools --help, openclaw tools effective, and openclaw status --usage still time out after ~12 seconds. The bottleneck is not the discovery phase itself, but the plugin registry load/tool resolution path.

Environment

  • OpenClaw Version: 2026.4.23 (a979721)
  • Runtime: Docker container on Synology NAS
  • Config: plugins.entries.* explicitly disabled for ~96 plugins, only 7 kept enabled (openai, browser, memory-core, whatsapp, codex, acpx, active-memory)

Reproduction Steps

  1. Disable plugins in config (only 7 kept enabled)
  2. Physically move bundled plugin dirs to remove from discovery:
    sudo mv /usr/local/lib/node_modules/openclaw/dist/extensions/\{anthropic,moonshot,…\} \
      /usr/local/lib/node_modules/openclaw/dist/extensions-disabled-2026-04-28/
  3. Clear runtime-deps cache:
    sudo rm -rf /home/node/.openclaw/plugin-runtime-deps/*
  4. Restart OpenClaw:
    openclaw gateway restart
  5. Measure cold-load times:
    time openclaw tools --help
    time openclaw tools effective
    time openclaw status --usage
    time openclaw status --json  # control (fast)

Observed Behavior

CommandTime (after pruning)Status
openclaw status --json~3.1 s✅ fast
openclaw tools --helpTimeout 12 s❌ hangs
openclaw tools effectiveTimeout 12 s❌ hangs
openclaw status --usageTimeout 12 s❌ hangs

Internal measurements:

  • Discovery: 7 candidates ✅
  • Registry load: ~9 s (down from ~18 s, but still high)
  • Tools resolution: ~12 s timeout (no improvement)

Expected Behavior

After disabling 96/102 plugins and clearing caches, cold-load times should be near-instant (<2 s) for CLI commands, especially tools --help.

Root Cause Analysis

The bottleneck is not the discoverOpenClawPlugins() call itself (now only 7 candidates). Instead, the tools and effective commands force a full runtime plugin registry load via resolveRuntimePluginRegistry(), which:

  1. Iterates all discovery candidates (even disabled ones) in loadPluginManifestRegistry()
  2. Loads manifests for each candidate
  3. Resolves enable state after the manifest loop (resolveEffectiveEnableState)

Key code paths:

  • tools-BDzuLs8q.js:33-45resolvePluginTools()resolveRuntimePluginRegistry()
  • loader-DeOtDUYt.js:2687-2700discoverOpenClawPlugins() + loadPluginManifestRegistry() (runs before enable filter)
  • manifest-registry-D5n47dku.js:574-600 → Manifest loading loop over all candidates
  • loader-DeOtDUYt.js:2738-2788 → Enable check happens after discovery & manifest load

Impact

  • CLI commands (tools --help, tools effective, status --usage) are unusably slow
  • Active users perceive hangs on every fresh CLI invocation
  • Workaround (pruning config) only partially helps; physical plugin removal still leaves manifest-loading overhead

Proposed Solutions

  1. Early pruning: Filter enabled: false plugin IDs before discoverOpenClawPlugins() or loadPluginManifestRegistry() to avoid work entirely.
  2. Separate fast path: Provide a lightweight tools --help mode that skips full registry load and uses cached tool metadata.
  3. Lazy manifest loading: Only load plugin manifests when enabled: true (or when explicitly requested for validation).

Additional Context

  • Related issue patterns: #72365 ("Control UI unresponsive during chat runs"), #64004 ("slow CLI"), #72384, #72383 (plugin SDK changes)
  • This is reproducible across sessions and persists after clearing all caches and pruning config down to 7 plugins.

Reported by: @oromeis (OpenClaw instance on Docker/Synology) Logs available on request.

extent analysis

TL;DR

Implement early pruning of disabled plugins before loading the plugin registry to reduce cold-load times for CLI commands.

Guidance

  • Investigate modifying the loadPluginManifestRegistry() function to filter out disabled plugins before loading their manifests, as proposed in the "Early pruning" solution.
  • Consider implementing a separate fast path for tools --help that skips the full registry load and uses cached tool metadata, as suggested in the "Separate fast path" solution.
  • Review the resolveRuntimePluginRegistry() function to determine if lazy manifest loading can be implemented for enabled plugins only, as proposed in the "Lazy manifest loading" solution.
  • Verify that the proposed solutions do not introduce any regressions or compatibility issues with other plugins or features.

Example

No code snippet is provided, as the issue requires a more in-depth analysis of the OpenClaw codebase and plugin registry implementation.

Notes

The proposed solutions aim to address the bottleneck in the plugin registry load and tool resolution path. However, the effectiveness of these solutions may depend on the specific implementation details and plugin interactions.

Recommendation

Apply the "Early pruning" workaround by filtering out disabled plugins before loading their manifests, as it is a more straightforward solution that can be implemented without introducing significant changes to the existing codebase.

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