Summary
openclaw status --deep crashes with an unhandled WebSocket error when the gateway is not running, instead of degrading gracefully.
Steps to reproduce
- Stop the gateway (
openclaw gateway stop)
- Run
openclaw status --deep
Expected behavior
status --deep skips the health probe when the gateway is unreachable and displays a clear message (e.g. "skipped (gateway unreachable)") rather than crashing.
Actual behavior
CLI crashes with a stack trace and exit code 1:
Error: gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:19213
at Object.onClose (.../call-N_0IoBZR.js:266:10)
...
ELIFECYCLE Command failed with exit code 1.
OpenClaw version
main (bd28b4ed3)
Operating system
macOS 15 (Darwin 25.3.0) — reproducible on any platform
Install method
pnpm dev
Logs, screenshots, and evidence
Root cause in src/commands/status.command.ts: the health probe (line 110) checks only opts.deep with no gatewayReachable guard and no .catch(). The adjacent lastHeartbeat call (line 126) correctly has both guards — this is an inconsistency.
Impact and severity
Affected: any user running status --deep for diagnostics when gateway is down
Severity: moderate (CLI crashes instead of showing diagnostic info)
Frequency: 100% when gateway is unreachable
Consequence: the diagnostic command fails in exactly the scenario where users need it most
Additional information
Related: #12354 (gateway crashes on network loss instead of graceful degradation)
Summary
openclaw status --deepcrashes with an unhandled WebSocket error when the gateway is not running, instead of degrading gracefully.Steps to reproduce
openclaw gateway stop)openclaw status --deepExpected behavior
status --deepskips the health probe when the gateway is unreachable and displays a clear message (e.g. "skipped (gateway unreachable)") rather than crashing.Actual behavior
CLI crashes with a stack trace and exit code 1:
OpenClaw version
main (bd28b4ed3)
Operating system
macOS 15 (Darwin 25.3.0) — reproducible on any platform
Install method
pnpm dev
Logs, screenshots, and evidence
Root cause in
src/commands/status.command.ts: the health probe (line 110) checks onlyopts.deepwith nogatewayReachableguard and no.catch(). The adjacentlastHeartbeatcall (line 126) correctly has both guards — this is an inconsistency.Impact and severity
Affected: any user running
status --deepfor diagnostics when gateway is downSeverity: moderate (CLI crashes instead of showing diagnostic info)
Frequency: 100% when gateway is unreachable
Consequence: the diagnostic command fails in exactly the scenario where users need it most
Additional information
Related: #12354 (gateway crashes on network loss instead of graceful degradation)