openclaw - 💡(How to fix) Fix [Bug] doctor false-misses bundled runtime deps and bundled channel loader can hit ENOTEMPTY on plugin-sdk alias [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#72521Fetched 2026-04-28 06:35:01
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
1
Participants
Timeline (top)
closed ×1commented ×1

On OpenClaw 2026.4.24, I hit two related bundled-runtime-deps problems on macOS:

  1. openclaw doctor kept reporting Bundled plugin runtime deps are missing and openclaw gateway restart stayed slow because bundled runtime deps were repeatedly restaged.
  2. During doctor / bundled channel loading, channel startup could warn with ENOTEMPTY ... openclaw/plugin-sdk.

After local investigation, the machine is stable again, but both behaviors look like upstream bugs rather than just local config mistakes.

Error Message

  1. During doctor / bundled channel loading, channel startup could warn with ENOTEMPTY ... openclaw/plugin-sdk.

Root Cause

  1. openclaw doctor kept reporting Bundled plugin runtime deps are missing and openclaw gateway restart stayed slow because bundled runtime deps were repeatedly restaged.
  2. During doctor / bundled channel loading, channel startup could warn with ENOTEMPTY ... openclaw/plugin-sdk.

Fix Action

Fix / Workaround

Local workaround that restored a healthy state

  1. Ensure the bundled runtime deps are visible at the package install root path that scanBundledPluginRuntimeDeps() checks.
  2. Patch dist/bundled-runtime-root-CuaPBWeD.js so ensureOpenClawPluginSdkAlias() behaves like the safer implementation already present in dist/loader-NucjcOgv.js.

If useful, I can also provide a very small patch diff for the bundled-runtime-root part, since I already validated that locally.

Code Example

Bundled plugin runtime deps are missing.
- @anthropic-ai/sdk@0.90.0
- @anthropic-ai/vertex-sdk@^0.16.0
- @aws-sdk/client-bedrock@3.1034.0
- @aws-sdk/client-bedrock-runtime@3.1034.0
- @aws-sdk/credential-provider-node@3.972.34
- @aws/bedrock-token-generator@^1.1.0
- @clack/prompts@^1.2.0
- @google/genai@^1.50.1
- @grammyjs/runner@^2.0.3
- @grammyjs/transformer-throttler@^1.2.1
- @homebridge/ciao@^1.3.6
- @mariozechner/pi-agent-core@0.70.2
- @mariozechner/pi-ai@0.70.2
- @modelcontextprotocol/sdk@1.29.0
- @mozilla/readability@^0.6.0
- acpx@0.5.3
- commander@^14.0.3
- express@^5.2.1
- grammy@^1.42.0
- linkedom@^0.18.12
- node-edge-tts@^1.2.10
- pdfjs-dist@^5.6.205
- playwright-core@1.59.1
- typebox@1.1.31
- undici@8.1.0
- ws@^8.20.0

---

[channels] failed to load bundled channel feishu: ENOTEMPTY, Directory not empty: /Users/.../.openclaw/plugin-runtime-deps/openclaw-2026.4.24-.../dist/extensions/node_modules/openclaw/plugin-sdk

---

<installRoot>/node_modules/<pkg>/package.json

---

~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-.../dist/extensions/node_modules/...

---

~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-.../node_modules/...

---

fs.rmSync(pluginSdkAliasDir, {
  recursive: true,
  force: true
});
fs.mkdirSync(pluginSdkAliasDir, { recursive: true });
RAW_BUFFERClick to expand / collapse

Summary

On OpenClaw 2026.4.24, I hit two related bundled-runtime-deps problems on macOS:

  1. openclaw doctor kept reporting Bundled plugin runtime deps are missing and openclaw gateway restart stayed slow because bundled runtime deps were repeatedly restaged.
  2. During doctor / bundled channel loading, channel startup could warn with ENOTEMPTY ... openclaw/plugin-sdk.

After local investigation, the machine is stable again, but both behaviors look like upstream bugs rather than just local config mistakes.

Environment

  • OpenClaw: 2026.4.24
  • Install method: npm global install, not a git checkout
  • OS: macOS

Symptoms observed

A. doctor kept reporting missing bundled runtime deps

openclaw doctor repeatedly showed:

Bundled plugin runtime deps are missing.
- @anthropic-ai/[email protected]
- @anthropic-ai/vertex-sdk@^0.16.0
- @aws-sdk/[email protected]
- @aws-sdk/[email protected]
- @aws-sdk/[email protected]
- @aws/bedrock-token-generator@^1.1.0
- @clack/prompts@^1.2.0
- @google/genai@^1.50.1
- @grammyjs/runner@^2.0.3
- @grammyjs/transformer-throttler@^1.2.1
- @homebridge/ciao@^1.3.6
- @mariozechner/[email protected]
- @mariozechner/[email protected]
- @modelcontextprotocol/[email protected]
- @mozilla/readability@^0.6.0
- [email protected]
- commander@^14.0.3
- express@^5.2.1
- grammy@^1.42.0
- linkedom@^0.18.12
- node-edge-tts@^1.2.10
- pdfjs-dist@^5.6.205
- [email protected]
- [email protected]
- [email protected]
- ws@^8.20.0

At the same time, gateway logs showed bundled plugins restaging/installing runtime deps during startup, which made restart slower than expected.

B. ENOTEMPTY while loading bundled channels

I also reproduced warnings like:

[channels] failed to load bundled channel feishu: ENOTEMPTY, Directory not empty: /Users/.../.openclaw/plugin-runtime-deps/openclaw-2026.4.24-.../dist/extensions/node_modules/openclaw/plugin-sdk

I saw the same family of warning for qqbot, telegram, and earlier for imessage.

Investigation notes

1. The package-level runtime dep scan and the runtime dep layout did not agree

scanBundledPluginRuntimeDeps() resolves the package install root and checks sentinels under:

<installRoot>/node_modules/<pkg>/package.json

Relevant code:

  • dist/bundled-runtime-deps-BdEAdjwi.js
    • resolveBundledRuntimeDependencyPackageInstallRoot(...)
    • scanBundledPluginRuntimeDeps(...)
    • dependencySentinelPath(...)
    • hasDependencySentinel(...)

On this machine, the runtime deps that were actually present were under:

~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-.../dist/extensions/node_modules/...

but not under:

~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-.../node_modules/...

I verified this directly:

  • scanBundledPluginRuntimeDeps(...) returned missing: 26
  • but the same packages existed under dist/extensions/node_modules/...

Once I made the package install root expose node_modules at the location the scan expects, the same scan returned missing: 0 and doctor stopped reporting missing bundled runtime deps.

That suggests the scan logic and the effective runtime dep layout can drift apart, causing doctor false negatives and repeated restaging during startup.

2. bundled-runtime-root-CuaPBWeD.js still has older plugin-sdk alias logic

I found that these two files differ:

  • dist/loader-NucjcOgv.js
  • dist/bundled-runtime-root-CuaPBWeD.js

In loader-NucjcOgv.js, ensureOpenClawPluginSdkAlias() is already defensive:

  • it only removes pluginSdkAliasDir if it exists and is not a directory
  • otherwise it reuses the directory and writes wrappers into it

But in bundled-runtime-root-CuaPBWeD.js, ensureOpenClawPluginSdkAlias() still did this:

fs.rmSync(pluginSdkAliasDir, {
  recursive: true,
  force: true
});
fs.mkdirSync(pluginSdkAliasDir, { recursive: true });

Locally, changing bundled-runtime-root-CuaPBWeD.js to match the safer loader-NucjcOgv.js behavior removed the ENOTEMPTY warnings in doctor.

So this part looks like a real code drift / stale implementation issue.

Local workaround that restored a healthy state

What got this machine back to normal:

  1. Ensure the bundled runtime deps are visible at the package install root path that scanBundledPluginRuntimeDeps() checks.
  2. Patch dist/bundled-runtime-root-CuaPBWeD.js so ensureOpenClawPluginSdkAlias() behaves like the safer implementation already present in dist/loader-NucjcOgv.js.

After that:

  • scanBundledPluginRuntimeDeps(...) returned missing: 0
  • openclaw doctor no longer reported Bundled plugin runtime deps are missing
  • openclaw gateway restart dropped from very slow / timeout-prone behavior to about 10-15 seconds on this machine
  • openclaw gateway status --deep returned Connectivity probe: ok and Capability: admin-capable

Suggestion

I think this is worth fixing in two places:

  1. Runtime dep scan / install-root consistency

    • Make sure the path used by scanBundledPluginRuntimeDeps() is always the same path where bundled runtime deps are actually materialized for packaged installs.
    • Or tolerate the dist/extensions/node_modules layout if that is intentional.
  2. Unify plugin-sdk alias behavior

    • Make dist/bundled-runtime-root-CuaPBWeD.js use the same safe directory-handling logic that already exists in dist/loader-NucjcOgv.js.

If useful, I can also provide a very small patch diff for the bundled-runtime-root part, since I already validated that locally.

extent analysis

TL;DR

The issue can be resolved by ensuring consistency between the runtime dependency scan path and the actual installation root, and by unifying the plugin-sdk alias behavior across different modules.

Guidance

  1. Verify the runtime dependency scan path: Check if the path used by scanBundledPluginRuntimeDeps() matches the actual installation root of the bundled runtime dependencies.
  2. Update the bundled-runtime-root-CuaPBWeD.js module: Modify the ensureOpenClawPluginSdkAlias() function to use the same safe directory-handling logic as in dist/loader-NucjcOgv.js.
  3. Test the changes: After applying the updates, run openclaw doctor and openclaw gateway restart to verify that the issues are resolved.

Example

No code snippet is provided as the issue suggests modifying existing code, and the exact changes depend on the specific implementation details.

Notes

The provided information suggests that the issue is related to inconsistencies in the runtime dependency scan and installation paths, as well as differences in the plugin-sdk alias behavior. Resolving these inconsistencies should fix the reported problems.

Recommendation

Apply the suggested workaround by updating the bundled-runtime-root-CuaPBWeD.js module and ensuring consistency between the runtime dependency scan path and the actual installation root. This should resolve the issues with openclaw doctor and openclaw gateway restart.

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] doctor false-misses bundled runtime deps and bundled channel loader can hit ENOTEMPTY on plugin-sdk alias [1 comments, 2 participants]