Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
On Linux (Ubuntu under WSL2, Node 22.22.0, openclaw 2026.4.22 installed globally via npm i -g openclaw), the gateway's bundled-runtime-deps installer for the plugin-runtime-deps tree populates ~250 transitive packages but does not install the openclaw package itself, neither as a real install nor as a symlink. As a result, every extension that imports a subpath of openclaw/* fails with ERR_MODULE_NOT_FOUND and crashes on startup. The Discord channel goes into exponential backoff and after 10 retries it gives up entirely.
openclaw doctor --fix does not detect or fix this; the doctor command also hangs (no output) when the gateway is in this state.
Steps to reproduce
- Fresh Linux host with openclaw installed globally (
npm i -g openclaw).
- Configure Discord channel in
~/.openclaw/openclaw.json (token + at least one guild/channel).
- Start the gateway via
systemctl --user start openclaw-gateway.
- Observe
~/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-<HASH>/node_modules/ after the gateway runs its bundled-deps install — there is no openclaw entry.
- Discord channel crash-loops with
Cannot find package 'openclaw'.
Easy way to reproduce on an existing working install: delete the version dir and restart the service.
systemctl --user stop openclaw-gateway
rm -rf ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-*/
systemctl --user start openclaw-gateway
journalctl --user -u openclaw-gateway -f | grep -i "Cannot find package"
Expected behavior
Suggested fixes (in order of preference)
- Have the bundled-deps installer add
openclaw as a peer of the version dir, either:
- real install (
npm install --no-save openclaw@<sameVersion> into the version dir), or
- symlink to the host install when versions match (
ln -s $(npm root -g)/openclaw ./node_modules/openclaw).
- Set
NODE_PATH=$(npm root -g) in the systemd unit. Cheaper but pollutes resolution for everything; not preferred.
- Don't import
openclaw/* from the published extension bundles — bundle the plugin-sdk subset each extension actually needs. Avoids the peer-dep entirely. Most invasive.
Doctor command behavior
openclaw doctor --fix produces zero output for at least 3 minutes when the gateway is in this state and was killed by an external 180s timeout. It would be helpful for doctor to print which checks it is running and surface the failed import 'openclaw' resolution.
Actual behavior
Symptom (real journalctl output)
[plugins] discord installed bundled runtime deps: @buape/carbon@0.16.0, @discordjs/voice@^0.19.2, discord-api-types@^0.38.47, https-proxy-agent@^9.0.0, opusscript@^0.0.8, typebox@1.1.28, undici@8.1.0, ws@^8.20.0
[plugins] telegram installed bundled runtime deps: @grammyjs/runner@^2.0.3, ...
[gateway] ready (7 plugins: acpx, browser, device-pair, discord, phone-control, talk-voice, telegram; 32.9s)
[delivery-recovery] Retry failed for delivery 96e1dd21-...: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/send-lsr_UsIt.js
[discord] [default] starting provider
[discord] [default] channel exited: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/provider-DYru-eTz.js
[discord] [default] auto-restart attempt 1/10 in 5s
... exponential backoff: 5s, 10s, 21s, 41s, 81s, 162s, 300s, then halts
curl http://127.0.0.1:18789/ hangs (read timeout) for the entire boot window while these retries run; the HTTP gateway only becomes responsive after the channel installs settle (or fail terminally).
OpenClaw version
openclaw 2026.4.22 (gateway service version 2026.4.5, host CLI 2026.4.22)
Operating system
Linux 6.6.87.2-microsoft-standard-WSL2 (Ubuntu, systemd-user managed)
Install method
Node v22.22.0
Model
all
Provider / routing chain
all
Additional provider/model setup details
No response
Logs, screenshots, and evidence
[plugins] discord installed bundled runtime deps: @buape/carbon@0.16.0, @discordjs/voice@^0.19.2, discord-api-types@^0.38.47, https-proxy-agent@^9.0.0, opusscript@^0.0.8, typebox@1.1.28, undici@8.1.0, ws@^8.20.0
[plugins] telegram installed bundled runtime deps: @grammyjs/runner@^2.0.3, ...
[gateway] ready (7 plugins: acpx, browser, device-pair, discord, phone-control, talk-voice, telegram; 32.9s)
[delivery-recovery] Retry failed for delivery 96e1dd21-...: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/send-lsr_UsIt.js
[discord] [default] starting provider
[discord] [default] channel exited: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/provider-DYru-eTz.js
[discord] [default] auto-restart attempt 1/10 in 5s
... exponential backoff: 5s, 10s, 21s, 41s, 81s, 162s, 300s, then halts
`curl http://127.0.0.1:18789/` hangs (read timeout) for the entire boot window while these retries run; the HTTP gateway only becomes responsive after the channel installs settle (or fail terminally).
Impact and severity
Affected extensions
8 extensions in the published dist/extensions/ import openclaw/* subpaths:
acpx, amazon-bedrock, amazon-bedrock-mantle, anthropic, codex, discord, google, telegram
Sample imports from dist/extensions/discord/provider-DYru-eTz.js:
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
import { chunkItems, logDebug, logError, ... } from "openclaw/plugin-sdk/text-runtime";
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
import { isDangerousNameMatchingEnabled, loadConfig, ... } from "openclaw/plugin-sdk/config-runtime";
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
Additional information
No response
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
On Linux (Ubuntu under WSL2, Node 22.22.0, openclaw 2026.4.22 installed globally via
npm i -g openclaw), the gateway's bundled-runtime-deps installer for the plugin-runtime-deps tree populates ~250 transitive packages but does not install theopenclawpackage itself, neither as a real install nor as a symlink. As a result, every extension that imports a subpath ofopenclaw/*fails withERR_MODULE_NOT_FOUNDand crashes on startup. The Discord channel goes into exponential backoff and after 10 retries it gives up entirely.openclaw doctor --fixdoes not detect or fix this; the doctor command also hangs (no output) when the gateway is in this state.Steps to reproduce
npm i -g openclaw).~/.openclaw/openclaw.json(token + at least one guild/channel).systemctl --user start openclaw-gateway.~/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-<HASH>/node_modules/after the gateway runs its bundled-deps install — there is noopenclawentry.Cannot find package 'openclaw'.Easy way to reproduce on an existing working install: delete the version dir and restart the service.
Expected behavior
Suggested fixes (in order of preference)
openclawas a peer of the version dir, either:npm install --no-save openclaw@<sameVersion>into the version dir), orln -s $(npm root -g)/openclaw ./node_modules/openclaw).NODE_PATH=$(npm root -g)in the systemd unit. Cheaper but pollutes resolution for everything; not preferred.openclaw/*from the published extension bundles — bundle the plugin-sdk subset each extension actually needs. Avoids the peer-dep entirely. Most invasive.Doctor command behavior
openclaw doctor --fixproduces zero output for at least 3 minutes when the gateway is in this state and was killed by an external 180s timeout. It would be helpful fordoctorto print which checks it is running and surface the failedimport 'openclaw'resolution.Actual behavior
Symptom (real journalctl output)
curl http://127.0.0.1:18789/hangs (read timeout) for the entire boot window while these retries run; the HTTP gateway only becomes responsive after the channel installs settle (or fail terminally).OpenClaw version
openclaw
2026.4.22(gateway service version2026.4.5, host CLI2026.4.22)Operating system
Linux 6.6.87.2-microsoft-standard-WSL2 (Ubuntu, systemd-user managed)
Install method
Node
v22.22.0Model
all
Provider / routing chain
all
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Affected extensions
8 extensions in the published
dist/extensions/importopenclaw/*subpaths:Sample imports from
dist/extensions/discord/provider-DYru-eTz.js:Additional information
No response