openclaw - 💡(How to fix) Fix Gateway WS handshake timeout + plugin re-stage cache miss in 2026.4.24 (regression vs 4.23) [1 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#72438Fetched 2026-04-27 05:30:09
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Upgrading from 2026.4.232026.4.24 introduces two distinct event-loop hazards that make the gateway and embedded modes effectively unusable for real workloads. Rolling back to 2026.4.23 restores both paths to working order with all the same agent/plugin config.

Root Cause

Upgrading from 2026.4.232026.4.24 introduces two distinct event-loop hazards that make the gateway and embedded modes effectively unusable for real workloads. Rolling back to 2026.4.23 restores both paths to working order with all the same agent/plugin config.

Fix Action

Workaround

npm install -g [email protected] — gateway recovers in ~14s, all TUI/Discord/Telegram round-trips succeed in <100ms, embedded mode dispatches models cleanly.

Code Example

2026-04-26T16:24:42.559-07:00 [ws] handshake timeout conn=9a961b24-... peer=127.0.0.1:65122->127.0.0.1:18789
2026-04-26T16:24:42.761-07:00 [ws] closed before connect ... code=1008 reason=connect failed

---

2026.4.24, every restart:
[plugins] anthropic staging bundled runtime deps (1 missing, 24 install specs): @mariozechner/pi-ai@0.70.2
[plugins] anthropic installed bundled runtime deps in 7278ms: ...
[plugins] discord staging bundled runtime deps (8 missing, ...)
[plugins] discord installed bundled runtime deps in 7264ms: ...
[plugins] firecrawl staging bundled runtime deps (1 missing, ...)
[plugins] firecrawl installed bundled runtime deps in 7336ms: ...
[plugins] ollama staging bundled runtime deps (2 missing, ...)
[plugins] ollama installed bundled runtime deps in 21170ms: ...
[plugins] telegram staging bundled runtime deps (5 missing, ...)
[plugins] telegram installed bundled runtime deps in 8057ms: ...

2026.4.23, second restart:
[gateway] ready (5 plugins: discord, lossless-claw, openclaw-web-search, rtk-rewrite, telegram; 14.2s)
RAW_BUFFERClick to expand / collapse

Summary

Upgrading from 2026.4.232026.4.24 introduces two distinct event-loop hazards that make the gateway and embedded modes effectively unusable for real workloads. Rolling back to 2026.4.23 restores both paths to working order with all the same agent/plugin config.

Environment

  • macOS 15 (Darwin 25.4.0) on Apple Silicon
  • Node v24.14.1
  • 5 plugins enabled: discord, lossless-claw, openclaw-web-search, rtk-rewrite, telegram
  • 4 named agents (paul, hermes, jamesbond, volunteer) + main, all on ollama/...:cloud models

Regression 1 — gateway WebSocket handshake timeout

After gateway start, TUI chat.history calls return errorCode=UNAVAILABLE errorMessage=chat.history unavailable during gateway startup and the WS upgrade never completes:

2026-04-26T16:24:42.559-07:00 [ws] handshake timeout conn=9a961b24-... peer=127.0.0.1:65122->127.0.0.1:18789
2026-04-26T16:24:42.761-07:00 [ws] closed before connect ... code=1008 reason=connect failed

TCP layer accepts (port 18789 listens, nc -zv succeeds) but the WS UPGRADE → 101 Switching Protocols never returns. TUIs sit in connecting | idle indefinitely; calling openclaw agent --local also hangs after plugin staging. Same agent/plugin config works fine on 2026.4.23.

Suspected adjacent symptom — at 16:15:19.756 on a clean cold start we observed [model-pricing] OpenRouter pricing fetch failed: TypeError: fetch failed, immediately followed by 7+ minutes of total log silence despite an established WS connection from the TUI. Looks like an unhandled rejection wedging the event loop.

Regression 2 — plugin runtime-deps cache miss on every restart

2026.4.23 cold-starts in 14.2s with 5 plugins (channels enabled). 2026.4.24 cold-starts in 167-172s with the same config — every restart re-installs anthropic/discord/firecrawl/ollama/telegram bundled deps. The previous-install detection appears to no longer hit:

2026.4.24, every restart:
[plugins] anthropic staging bundled runtime deps (1 missing, 24 install specs): @mariozechner/[email protected]
[plugins] anthropic installed bundled runtime deps in 7278ms: ...
[plugins] discord staging bundled runtime deps (8 missing, ...)
[plugins] discord installed bundled runtime deps in 7264ms: ...
[plugins] firecrawl staging bundled runtime deps (1 missing, ...)
[plugins] firecrawl installed bundled runtime deps in 7336ms: ...
[plugins] ollama staging bundled runtime deps (2 missing, ...)
[plugins] ollama installed bundled runtime deps in 21170ms: ...
[plugins] telegram staging bundled runtime deps (5 missing, ...)
[plugins] telegram installed bundled runtime deps in 8057ms: ...

2026.4.23, second restart:
[gateway] ready (5 plugins: discord, lossless-claw, openclaw-web-search, rtk-rewrite, telegram; 14.2s)

This may compound Regression 1 — a saturated install path during gateway startup likely starves the WS handshake handler.

Reproduction

  1. npm install -g [email protected]
  2. launchctl load ~/Library/LaunchAgents/ai.openclaw.gateway.plist (or openclaw gateway start)
  3. Open any TUI session: openclaw tui --session agent:<name>:main
  4. Observe TUI stuck at connecting | idle indefinitely. lsof -i :18789 shows ESTABLISHED, but no [ws] ⇄ res ... lines appear in ~/.openclaw/logs/gateway.log for any TUI RPC.
  5. Embedded mode: openclaw agent --agent <name> -m "test" --local — agent worker spawns (openclaw-agent PID alive, ~30s of CPU), then goes silent past plugin-staging. No model dispatch.

Workaround

npm install -g [email protected] — gateway recovers in ~14s, all TUI/Discord/Telegram round-trips succeed in <100ms, embedded mode dispatches models cleanly.

Files / context

Happy to share full sanitized gateway.log excerpts privately if helpful — they contain bot tokens redacted but the WS conn IDs and timings are present. Logs above are direct copy.

extent analysis

TL;DR

Downgrade to [email protected] to avoid event-loop hazards causing gateway and embedded mode issues.

Guidance

  • The upgrade to 2026.4.24 introduces two regressions: a WebSocket handshake timeout and a plugin runtime-deps cache miss on every restart, which may be related to an unhandled rejection wedging the event loop.
  • To verify the issue, try reproducing the problem using the provided steps and observe the TUI getting stuck at connecting | idle indefinitely.
  • The suspected cause is an event-loop hazard, possibly due to an unhandled rejection, which can be mitigated by downgrading to 2026.4.23.
  • To further investigate, sharing full sanitized gateway.log excerpts may provide more insight into the issue.

Example

No code snippet is provided as the issue is related to a specific version upgrade and not a code-specific problem.

Notes

The provided workaround of downgrading to 2026.4.23 resolves the issue, but it may not be a permanent solution. Further investigation is needed to identify the root cause and provide a fix for 2026.4.24.

Recommendation

Apply the workaround by downgrading to [email protected] to restore functionality, as it has been confirmed to resolve the issue.

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