openclaw - 💡(How to fix) Fix [BUG] message send CLI can hang as openclaw-message at ~100% CPU after plugin load failure [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#76168Fetched 2026-05-03 04:41:27
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
2
Timeline (top)
commented ×1cross-referenced ×1mentioned ×1subscribed ×1

On OpenClaw 2026.4.29, openclaw message send can spawn a child process titled openclaw-message that gets stuck at ~100% CPU instead of exiting after a Telegram plugin load failure. While that process is spinning, the gateway becomes unhealthy (very large event-loop delays, Telegram replies stall, user sees something went wrong).

Error Message

  • in particular, avoid any path where openclaw-message can remain alive spinning after a plugin/module load error

Root Cause

A single failed openclaw message send invocation can consume nearly a full core plus ~858 MB RSS for a long time and indirectly break normal Telegram agent replies on small hosts.

Code Example

openclaw message send --channel telegram --account ops --target telegram:5282457901 --message "[ops][session-monitor][critical] Stuck run: coder session stopped progressing"

---

node openclaw message send ...   (parent)
└── openclaw                     (child)
    └── openclaw-message         (child, stuck)

---

[plugins] telegram installed bundled runtime deps in 145ms: ... grammy@^1.42.0 ...
[channels] failed to load bundled channel telegram: Cannot find module 'grammy'
Require stack:
- /home/admin/.npm-global/lib/node_modules/openclaw/dist/extensions/telegram/send-t4GTTdHF.js
RAW_BUFFERClick to expand / collapse

Summary

On OpenClaw 2026.4.29, openclaw message send can spawn a child process titled openclaw-message that gets stuck at ~100% CPU instead of exiting after a Telegram plugin load failure. While that process is spinning, the gateway becomes unhealthy (very large event-loop delays, Telegram replies stall, user sees something went wrong).

Environment

  • OpenClaw: 2026.4.29 (a448042)
  • Host: Linux
  • Channel affected: Telegram
  • Observed after upgrading from 2026.4.27

What happened

A monitoring script invoked:

openclaw message send --channel telegram --account ops --target telegram:5282457901 --message "[ops][session-monitor][critical] Stuck run: coder session stopped progressing"

That produced this process tree:

node openclaw message send ...   (parent)
└── openclaw                     (child)
    └── openclaw-message         (child, stuck)

Observed stuck process:

  • process title: openclaw-message
  • CPU: ~97%
  • RSS: ~858 MB
  • elapsed: ~1h44m until manually killed

While it was spinning:

  • gateway event-loop delay warnings climbed as high as ~204s
  • Telegram main-session replies stalled / timed out
  • Telegram user-facing symptom was something went wrong

Killing the stuck openclaw-message process immediately relieved CPU pressure and restored normal behavior.

Relevant logs

Around the time the stuck process started, logs showed bundled runtime deps being staged/installed, then channel load failures:

[plugins] telegram installed bundled runtime deps in 145ms: ... grammy@^1.42.0 ...
[channels] failed to load bundled channel telegram: Cannot find module 'grammy'
Require stack:
- /home/admin/.npm-global/lib/node_modules/openclaw/dist/extensions/telegram/send-t4GTTdHF.js

There were similar failures for other bundled channels in the same CLI process:

  • discord-api-types/v10
  • nostr-tools
  • @slack/web-api
  • grammy

At the same time, the running gateway itself had already successfully brought Telegram up and was polling, so this appears specific to the separate CLI message send path / child process, not a generic gateway inability to use Telegram.

Suspected root cause

This looks like two bugs interacting:

  1. Bundled runtime deps / module-path race or ordering bug in the CLI child process

    • grammy exists under the staged plugin runtime deps root: ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-.../node_modules/grammy
    • but the CLI child still attempts to load Telegram before the runtime dep node path is effectively usable in that child process.
  2. Failure path does not terminate the CLI child process cleanly

    • plugin load failures are recorded and later surfaced via PluginLoadFailureError
    • the command should exit with non-zero
    • instead, the child remains alive as openclaw-message and spins at very high CPU

I traced the relevant compiled flow as:

  • dist/program-BrS1V7cf.js
    • setProcessTitleForCommand() sets process.title = "openclaw-message" for message command
  • dist/register.message-BUA5UmMq.js
    • message command calls ensurePluginRegistryLoaded(...)
  • dist/runtime-registry-loader-DW8FE8ql.js
    • loads plugins with throwOnLoadError: true
  • dist/loader-CLyHx60E.js
    • plugin import failures are first recorded via recordPluginError(...)
    • later maybeThrowOnPluginLoadError(...) throws PluginLoadFailureError
  • command does not terminate cleanly after that failure and the process stays alive spinning

Why this matters

A single failed openclaw message send invocation can consume nearly a full core plus ~858 MB RSS for a long time and indirectly break normal Telegram agent replies on small hosts.

Repro hints

I do not yet have a minimal deterministic repro outside this affected host, but the failure was observed immediately after upgrading to 2026.4.29 and invoking openclaw message send from a monitoring script on a host with Telegram configured.

Requested fix

  • ensure CLI message send children either:
    • correctly register bundled runtime dep node paths before importing channel modules, or
    • fail fast and exit cleanly on plugin load failure
  • in particular, avoid any path where openclaw-message can remain alive spinning after a plugin/module load error

If useful, I can provide additional logs / timestamps from the affected host.

extent analysis

TL;DR

The issue can be fixed by ensuring the CLI message send children correctly register bundled runtime dep node paths before importing channel modules or fail fast and exit cleanly on plugin load failure.

Guidance

  • Review the dist/runtime-registry-loader-DW8FE8ql.js file to ensure that the throwOnLoadError option is properly handled to prevent the child process from spinning indefinitely.
  • Investigate the maybeThrowOnPluginLoadError function in dist/loader-CLyHx60E.js to determine why it's not terminating the process cleanly after a plugin load failure.
  • Verify that the recordPluginError function in dist/loader-CLyHx60E.js is correctly recording plugin import failures and that this information is being used to exit the process.
  • Consider adding additional logging or error handling to the openclaw message send command to help diagnose and prevent similar issues in the future.

Example

No code snippet is provided as the issue is more related to the logic and flow of the program rather than a specific code block.

Notes

The fix may require changes to the openclaw codebase, specifically in the areas responsible for loading plugins and handling errors. It's also possible that the issue is related to the specific environment or configuration of the affected host.

Recommendation

Apply a workaround to ensure that the openclaw-message process exits cleanly after a plugin load failure, such as adding a timeout or a hook to detect and terminate the process if it's spinning indefinitely. This can help prevent the issue from causing problems until a more permanent fix can be implemented.

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] message send CLI can hang as openclaw-message at ~100% CPU after plugin load failure [1 comments, 2 participants]