-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
[Bug]: CLI commands hang at WebSocket gateway handshake #68944
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
CLI Commands Hang at WebSocket Gateway Handshake
Bug Description
Every CLI subcommand that requires a live gateway connection hangs indefinitely. The CLI successfully connects to the gateway WebSocket endpoint and receives the
connect.challengenonce, but then never sends theconnect.reply— the command hangs until killed.Commands that bypass the gateway transport (
--version,--help) work correctly.Environment
~/.openclaw/identity/)Affected Commands
openclaw --versionopenclaw --helpopenclaw sessionsopenclaw cron listopenclaw statusopenclaw doctoropenclaw channels listopenclaw models listopenclaw agents listopenclaw gateway statusopenclaw backup listopenclaw tuiRoot Cause Tracing
Using a WebSocket client with the auth token to trace the connection flow:
ws://localhost:18789/gateway✅connect.challengeevent with nonce ✅connect.replywith signed nonce ❌The CLI receives the nonce but appears to fail silently when generating/sending the signed reply. This blocks the entire command.
What Was Tried
npm uninstall -g openclaw+npm install -g openclaw@2026.4.15Stop-ScheduledTask+Start-ScheduledTask)wslibrary with HMAC-SHA256 signed nonceDevice Identity Status
identity/device.json— intact, valid EC keypairidentity/device-auth.json— intact, operator token with correct scopes20512fa1c7948b21355756331b40ee88c8e3d27b033ca619b2620d4995cb48fPossible Causes
crypto.sign()/crypto.verify()for EC P-256 keysNODE_OPTIONS; the respawned process may have a different crypto stateLogs
Gateway log does not show the CLI connection attempt — the challenge is sent but no corresponding connection is logged as established.
Impact
Workaround
/healthin 6ms)Suggestion
openclaw --log-level trace sessionsto expose where exactly it hangs