openclaw - 💡(How to fix) Fix Bundled plugin deps re-installed on every gateway restart causing 20s+ startup delay [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#75017Fetched 2026-05-01 05:39:04
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

Code Example

12:04:22 [gateway] starting...
12:04:27 [plugins] staging bundled runtime deps before gateway startup (9 missing, 18 install specs): @agentclientprotocol/claude-agent-acp@0.31.0, @homebridge/ciao@^1.3.6, @modelcontextprotocol/sdk@1.29.0, @zed-industries/codex-acp@0.12.0, acpx@0.6.1, chokidar@^5.0.0, commander@^14.0.3, express@5.2.1, playwright-core@1.59.1
12:04:33 [plugins] installed bundled runtime deps before gateway startup in 5432ms
RAW_BUFFERClick to expand / collapse

Environment

  • OpenClaw 2026.4.27 (cbc2ba0), npm global install
  • Node.js v22.22.2
  • Debian 13 (x64), systemd user service
  • Gateway bind: 127.0.0.1:18789 (loopback)
  • openclaw doctor reports chokidar@^5.0.0 missing on every run
  • openclaw doctor --fix installs deps but they don't survive a restart

Steps to reproduce

  1. Start gateway: systemctl --user restart openclaw-gateway
  2. Check logs: journalctl --user -u openclaw-gateway
  3. Observe: deps are staged and installed from scratch every time

Actual behavior

Every gateway restart triggers a full re-install of bundled plugin runtime deps:

12:04:22 [gateway] starting...
12:04:27 [plugins] staging bundled runtime deps before gateway startup (9 missing, 18 install specs): @agentclientprotocol/[email protected], @homebridge/ciao@^1.3.6, @modelcontextprotocol/[email protected], @zed-industries/[email protected], [email protected], chokidar@^5.0.0, commander@^14.0.3, [email protected], [email protected]
12:04:33 [plugins] installed bundled runtime deps before gateway startup in 5432ms

This cascades into:

  • Model warmup timeout (5s limit hit)
  • Bonjour advertiser stuck for 25s (service stuck in announcing)
  • Event loop delay spike: eventLoopDelayMaxMs=20837.3 (over 20 seconds!)
  • TUI unresponsive during startup (WebSocket hangs)

Expected behavior

Bundled plugin deps should persist across restarts. The staging system should detect they're already installed and skip re-installation.

Additional context

  • The deps are physically present at ~/.npm-global/lib/node_modules/openclaw/node_modules/ (e.g., chokidar v5.0.0 is there)
  • The doctor and gateway startup both report them as missing regardless
  • The service PATH is also flagged as non-minimal (includes volta, asdf, nvm, fnm, pnpm), but --repair doesn't fix it
  • This was observed after a clean openclaw doctor --fix followed immediately by systemctl --user restart openclaw-gateway

extent analysis

TL;DR

The issue can be fixed by ensuring that the dependencies installed by openclaw doctor --fix are persisted across restarts, possibly by modifying the PATH environment variable or the npm configuration.

Guidance

  • Verify that the dependencies are correctly installed in the ~/.npm-global/lib/node_modules/openclaw/node_modules/ directory and check the permissions of this directory.
  • Check the PATH environment variable to ensure it includes the directory where the dependencies are installed, as the service PATH is flagged as non-minimal.
  • Run npm config ls to check the prefix configuration and ensure it points to the correct directory where the dependencies are installed.
  • Try running openclaw doctor --fix with the --verbose flag to get more detailed output and potentially identify the issue.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue seems to be related to the persistence of dependencies across restarts, and modifying the PATH environment variable or the npm configuration might fix the issue. However, the exact solution is uncertain and may require further investigation.

Recommendation

Apply a workaround by modifying the PATH environment variable or the npm configuration to ensure that the dependencies are persisted across restarts, as upgrading to a fixed version is not clearly implied in the issue. This is because the issue seems to be related to the environment configuration rather than a bug in the openclaw package itself.

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

Bundled plugin deps should persist across restarts. The staging system should detect they're already installed and skip re-installation.

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 plugin deps re-installed on every gateway restart causing 20s+ startup delay [1 comments, 2 participants]