openclaw - 💡(How to fix) Fix [Bug] Gateway crashes with "Unable to resolve plugin runtime module" after upgrade to 2026.5.22

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…

After upgrading from 2026.5.20 to 2026.5.22, the OpenClaw gateway crashes during startup with an unhandled rejection: "Unable to resolve plugin runtime module". This occurs after the gateway successfully loads plugins, initializes channels (Discord, Telegram), and completes model pre-warming. The crash happens during the channels.discord.start-account-handoff phase.

Error Message

Error: Unable to resolve plugin runtime module

Root Cause

After upgrading from 2026.5.20 to 2026.5.22, the OpenClaw gateway crashes during startup with an unhandled rejection: "Unable to resolve plugin runtime module". This occurs after the gateway successfully loads plugins, initializes channels (Discord, Telegram), and completes model pre-warming. The crash happens during the channels.discord.start-account-handoff phase.

Fix Action

Workaround

Downgrade to 2026.5.20:

npm i -g [email protected]
openclaw gateway restart

Code Example

Error: Unable to resolve plugin runtime module

---

Update Result: ERROR
  Root: /home/ubuntu/.npm-global/lib/node_modules/openclaw
  Reason: global install swap
  Before: 2026.5.20
  After: 2026.5.20

---

npm i -g openclaw@2026.5.20
openclaw gateway restart
RAW_BUFFERClick to expand / collapse

[Bug] Gateway crashes with "Unable to resolve plugin runtime module" after upgrade to 2026.5.22

Summary

After upgrading from 2026.5.20 to 2026.5.22, the OpenClaw gateway crashes during startup with an unhandled rejection: "Unable to resolve plugin runtime module". This occurs after the gateway successfully loads plugins, initializes channels (Discord, Telegram), and completes model pre-warming. The crash happens during the channels.discord.start-account-handoff phase.

Environment

  • OpenClaw Version: 2026.5.22 (a374c3a)
  • Previous Version: 2026.5.20 (e510042)
  • Node.js: v25.4.0
  • OS: Linux 6.17.0-1012-aws (x64)
  • Platform: AWS EC2 (t3.small)
  • Install Method: npm i -g [email protected]

Regression Context

This issue appears related to the 2026.5.22 performance optimizations that introduced:

  • Lazy-loading of startup-idle plugin work and core gateway method handlers
  • Reuse of immutable plugin metadata snapshots across startup
  • Reuse of process-stable channel catalog reads

The crash occurs during the lazy runtime import / plugin runtime resolution phase, suggesting a race condition or missing module resolution path in the new lazy-loading system.

Steps to Reproduce

  1. Have OpenClaw 2026.5.20 running with Discord + Telegram channels configured
  2. Run npm i -g [email protected] (or openclaw update)
  3. Restart gateway: openclaw gateway restart
  4. Gateway begins startup, loads plugins, initializes channels
  5. Crash occurs during channels.discord.start-account-handoff phase

Expected Behavior

Gateway should complete startup and begin handling messages across all configured channels.

Actual Behavior

Gateway crashes with unhandled rejection. The process exits and systemd attempts restart, which fails repeatedly.

Error Details

Error: Unable to resolve plugin runtime module

Process state at crash:

  • PID: 78684
  • Uptime: ~89 seconds (89078ms)
  • Platform: linux x64
  • Node: 25.4.0

Diagnostic Timeline (from stability snapshot)

The stability snapshot shows all phases completing successfully until the crash:

PhaseDurationStatus
plugins.load966ms✅ Completed
config.normalize11ms✅ Completed
runtime.early.lazy-runtime-imports82ms✅ Completed
plugins.runtime-post-bind9409ms✅ Completed
post-attach.log22503ms✅ Completed
sidecars.internal-hooks311ms✅ Completed
channels.discord.list-accounts420ms✅ Completed
channels.telegram.list-accounts0.8ms✅ Completed
sidecars.model-prewarm18354ms✅ Completed
channels.discord.runtime17579ms✅ Completed
channels.telegram.runtime17560ms✅ Completed
channels.discord.start19356ms✅ Completed
channels.telegram.start18877ms✅ Completed
sidecars.plugin-services.browser.browser-control18411ms✅ Completed
sidecars.channels19377ms✅ Completed
channels.discord.start-account-handoff719ms✅ Completed (last event before crash)

Critical observation: All 32 diagnostic events show diagnostic.phase.completed — there is no error event in the snapshot. The unhandled rejection occurs after the last logged phase completes, suggesting the error happens in an async callback or promise that isn't captured by the phase diagnostics.

Related Issues

  • #85552 — [Regression 2026.5.20] Discord typing indicator severely delayed (20-30s) — session write lock contention (reported by same user, different symptom)
  • The 2026.5.22 changelog mentions: "Gateway/perf: lazy-load startup-idle plugin work, core gateway method handlers, and the embedded ACPX runtime"

Additional Context

Previous startup failures (May 22, 2026)

Before this unhandled rejection, there were earlier startup failures on the same day with different errors:

  1. Config validation errors — Unknown models in config:

    • google/gemini-3.1-pro-preview-customtools
    • google/gemini-live-2.5-flash-preview
    • google/gemini-2.0-flash-exp-image-generation

    These were fixed by running openclaw doctor --fix (which pruned retired catalog entries as mentioned in 2026.5.22 changelog).

  2. After config fix, the gateway reached the new "Unable to resolve plugin runtime module" crash.

Update method note

The initial openclaw update command reported:

Update Result: ERROR
  Root: /home/ubuntu/.npm-global/lib/node_modules/openclaw
  Reason: global install swap
  Before: 2026.5.20
  After: 2026.5.20

However, npm i -g [email protected] succeeded and installed the new version. The "global install swap" error may indicate the CLI update path has issues when the gateway service is running, but manual npm install works.

Workaround

Downgrade to 2026.5.20:

npm i -g [email protected]
openclaw gateway restart

Request

Please investigate:

  1. Which specific plugin runtime module fails to resolve
  2. Whether the lazy-loading changes in 2026.5.22 introduced a race condition during channel handoff
  3. If additional error context (stack trace, module name) can be added to this error message

Labels: bug, regression, gateway, startup, plugin, P1

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] Gateway crashes with "Unable to resolve plugin runtime module" after upgrade to 2026.5.22