openclaw - 💡(How to fix) Fix openclaw tui hangs on all agents after upgrading to 2026.4.29 — WebSocket handshake timeout, missing dist file [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#75717Fetched 2026-05-02 05:31:16
View on GitHub
Comments
1
Participants
2
Timeline
14
Reactions
5
Author
Timeline (top)
subscribed ×7cross-referenced ×3mentioned ×2commented ×1

Upgrading from 2026.4.11 to 2026.4.29 via openclaw gateway update.run causes all openclaw tui sessions to hang indefinitely for all agents. TUI never completes the WebSocket handshake. Processes spin at 50–92% CPU until killed. Only fix was downgrading to 2026.4.11.

Error Message

[gateway-http] unhandled error: Cannot find module '/opt/homebrew/lib/node_modules/openclaw/dist/control-ui-BKlfXfAt.js' code: 'ERR_MODULE_NOT_FOUND'

gateway/ws: handshake timeout conn=3e07d582 cause: handshake-timeout, handshakeMs: 10000

gateway connect failed: Error: gateway closed (1000):

Root Cause

  • Gateway HTTP /health returns 500 immediately after upgrade restart
  • WebSocket handshake times out (cause: handshake-timeout)
  • Root cause in logs: Cannot find module '.../dist/control-ui-BKlfXfAt.js' — stale hashed dist file not cleaned by npm update
  • Re-running npm install -g openclaw@latest regenerated the file but 500 and timeouts persisted
  • All TUI sessions hung 50–92% CPU, required kill -9
  • Affects ALL agents (default and non-default)
  • Ollama discovery probe fires at TUI client startup regardless of enabled: false in config

Fix Action

Workaround

npm install -g [email protected]

Code Example

[gateway-http] unhandled error: Cannot find module
'/opt/homebrew/lib/node_modules/openclaw/dist/control-ui-BKlfXfAt.js'
code: 'ERR_MODULE_NOT_FOUND'

gateway/ws: handshake timeout conn=3e07d582
  cause: handshake-timeout, handshakeMs: 10000

gateway connect failed: Error: gateway closed (1000):
RAW_BUFFERClick to expand / collapse

Summary

Upgrading from 2026.4.11 to 2026.4.29 via openclaw gateway update.run causes all openclaw tui sessions to hang indefinitely for all agents. TUI never completes the WebSocket handshake. Processes spin at 50–92% CPU until killed. Only fix was downgrading to 2026.4.11.

Environment

  • Before (working): OpenClaw 2026.4.11 (769908e)
  • After (broken): OpenClaw 2026.4.29 (a448042)
  • OS: macOS Darwin 25.4.0 arm64
  • Node: v25.6.1
  • Install: npm install -g openclaw@latest via openclaw gateway update.run
  • Gateway: LaunchAgent, bind=lan, port 18789

Steps to Reproduce

  1. openclaw gateway update.run from 2026.4.11
  2. Confirm gateway restarts on 2026.4.29
  3. openclaw tui (any agent)
  4. TUI shows connecting | idle then gateway disconnected: closed

Observed Behavior

  • Gateway HTTP /health returns 500 immediately after upgrade restart
  • WebSocket handshake times out (cause: handshake-timeout)
  • Root cause in logs: Cannot find module '.../dist/control-ui-BKlfXfAt.js' — stale hashed dist file not cleaned by npm update
  • Re-running npm install -g openclaw@latest regenerated the file but 500 and timeouts persisted
  • All TUI sessions hung 50–92% CPU, required kill -9
  • Affects ALL agents (default and non-default)
  • Ollama discovery probe fires at TUI client startup regardless of enabled: false in config

Expected Behavior

openclaw tui connects within ~2 seconds as on 2026.4.11.

Workaround

npm install -g [email protected]

Relevant Logs

[gateway-http] unhandled error: Cannot find module
'/opt/homebrew/lib/node_modules/openclaw/dist/control-ui-BKlfXfAt.js'
code: 'ERR_MODULE_NOT_FOUND'

gateway/ws: handshake timeout conn=3e07d582
  cause: handshake-timeout, handshakeMs: 10000

gateway connect failed: Error: gateway closed (1000):

Root Cause Hypothesis

update.run npm global install leaves stale hashed dist files from the previous version. New version references control-ui-BKlfXfAt.js in its import map but installed file is control-ui-Cf8YUkqZ.js. A pre-clean step in update.run is needed to remove old dist files before writing new ones.

Approximately 2 hours of productive work lost to this regression. A pre-flight check verifying all referenced dist files exist before restarting the gateway would prevent this.

extent analysis

TL;DR

The most likely fix is to add a pre-clean step in update.run to remove old dist files before writing new ones, addressing the issue of stale hashed dist files causing WebSocket handshake timeouts.

Guidance

  • Verify the existence of stale dist files by checking the dist directory for files with different hashes after running npm install -g openclaw@latest.
  • Consider adding a pre-flight check in update.run to ensure all referenced dist files exist before restarting the gateway.
  • Manually cleaning the dist directory and re-running npm install -g openclaw@latest may provide a temporary workaround.
  • Review the update.run script to identify potential areas where the pre-clean step can be integrated.

Example

No code snippet is provided as the issue is related to the update.run script and npm installation process, which is not explicitly shown in the issue body.

Notes

The root cause hypothesis suggests that the issue is specific to the update.run script and the way it handles npm global installations, leaving stale dist files from previous versions. The proposed fix aims to address this specific issue.

Recommendation

Apply workaround: Downgrade to 2026.4.11 using npm install -g [email protected] until a fixed version of update.run is available, as this is the only known working version.

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