Skip to content

[Bug]:TUI enters infinite reconnect loop on WebSocket close (code 1006) #73666

Description

@oldsix-cell

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

TUI repeatedly reconnects on WebSocket close (code 1006) without stopping or showing the underlying error.

Steps to reproduce

  1. Start gateway:
    openclaw gateway

  2. Use a client that cannot authenticate (e.g. not initialized or incompatible)

  3. Start TUI:
    openclaw tui

  4. Observe repeated reconnect attempts

Expected behavior

TUI should stop retrying after connection failure or show a clear error message.

Actual behavior

TUI continuously reconnects and prints:

WebSocket closed (code 1006)
reconnecting...

This repeats indefinitely without exit.

OpenClaw version

2026.4.24

Operating system

macOS 15.4

Install method

npm global

Model

NOT_RELEVANT

Provider / routing chain

NOT_RELEVANT

Additional provider/model setup details

NOT_RELEVANT

Logs, screenshots, and evidence

WebSocket closed (code 1006)
reconnecting...
WebSocket closed (code 1006)
reconnecting...
(repeats indefinitely)

Impact and severity

Affected: TUI users encountering connection failure
Severity: High (CLI unusable)
Frequency: Always (observed repeatedly)
Consequence: Terminal flooded, underlying error not visible

Additional information

Process must be terminated manually (Ctrl + C).

Occurs consistently when connection fails (e.g. authentication issues).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions