Skip to content

[Bug]: [Bug]: Gateway WebSocket handshake/request regression in 2026.4.25+ — TUI cannot connect on low-core hosts #73524

Closed

Description

@harshcatsystems-collab

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Title: [Bug]: Gateway WebSocket handshake/request regression in 2026.4.25+ — TUI cannot connect on low-core hosts

Body:

Environment

  • OpenClaw: 2026.4.25 and 2026.4.26 (regression vs 2026.4.14)
  • OS: Debian bookworm (2 CPU, 3.8GB RAM)
  • Node: 22.22.2
  • Gateway: loopback, token auth, 9 plugins, Telegram + Slack channels

Description

After updating from 2026.4.14 to 2026.4.25, the TUI cannot connect to the gateway.
WebSocket handshake completes but subsequent RPC requests (agents.list, chat.history)
take 2-29 seconds, exceeding the 30s requestTimeoutMs.

On 2026.4.14 with identical config and hardware, TUI connects instantly.

Steps to Reproduce

  1. Working gateway on 2026.4.14, TUI connects instantly
  2. npm install -g openclaw@2026.4.25 (or 2026.4.26)
  3. openclaw gateway restart
  4. openclaw tui — stuck at "connecting | idle", eventually "gateway request timeout for connect"

Gateway Logs

Gateway shows requests completing but extremely slowly:

  • agents.list: 1723ms
  • chat.history: 28844ms (nearly hits 30s requestTimeoutMs)

Channels (Telegram, Slack) and HTTP dashboard work fine. Only WebSocket RPC is slow.

Related Issues

Workaround

Downgrade to 2026.4.14: npm install -g openclaw@2026.4.14


Open https://github.com/openclaw/openclaw/issues/new and paste this in.

Sources:

Steps to reproduce

Steps to Reproduce

  1. Working gateway on 2026.4.14, TUI connects instantly
  2. npm install -g openclaw@2026.4.25 (or 2026.4.26)
  3. openclaw gateway restart
  4. openclaw tui — stuck at "connecting | idle", eventually "gateway request timeout for connect"

Expected behavior

Steps:

  1. Working gateway on 2026.4.14, TUI connects instantly
  2. npm install -g openclaw@2026.4.25
  3. openclaw gateway restart
  4. openclaw tui — stuck at "connecting | idle", eventually "gateway request timeout for connect"

Actual behavior

Description/Steps to reproduce:
After updating from 2026.4.14 to 2026.4.25, the TUI cannot connect to the gateway. WebSocket handshake completes but subsequent RPC requests (agents.list, chat.history) take 2-29 seconds, exceeding the 30s requestTimeoutMs. On
2026.4.14 with identical config and hardware, TUI connects instantly.

OpenClaw version

2026.4.25 and 2026.4.26 (regression vs 2026.4.14)

Operating system

Debian bookworm, 2 CPU, 3.8GB RAM, Node 22.22.2

Install method

No response

Model

claude-sonnet-4-6

Provider / routing chain

anthropic-messages (direct API key, no router)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Activity

  1. Vksh07 commented on Apr 28, 2026

    @Vksh07

    same issue: websocket error and handshake timeout. gateway takes as much as 6 min in wsl @shakkernerd

  2. steipete commented on Apr 29, 2026

    @steipete
    Contributor

    Fixed on main by 7e41913 and 7994833.

    The two slow TUI startup paths from this report are now covered:

    • chat.history no longer waits on model catalog discovery; the regression test in src/gateway/server.chat.gateway-server-chat-b.test.ts asserts that chat.history returns without calling loadGatewayModelCatalog.
    • TUI local Gateway connections now carry the configured/env pre-auth handshake budget into GatewayClient, so the client-side connect watchdog no longer stays shorter than the Gateway's configured handshake window. The TUI regression test in src/tui/gateway-chat.test.ts covers that connection option, and src/gateway/client.watchdog.test.ts covers the watchdog behavior.

    I rechecked the relevant path on current main: agents.list is config-only in src/gateway/server-methods/agents.ts, chat.history stays on session history in src/gateway/server-methods/chat.ts, and the TUI connection wiring is in src/tui/gateway-chat.ts.

    Verification run locally after the main push:

    pnpm test src/tui/gateway-chat.test.ts src/gateway/client.watchdog.test.ts -- --reporter=verbose
    

    That passed 2 shards / 30 tests. I also reran the previously slow Claude history backfill test after it timed out in a larger mixed run; the focused rerun passed.

  3. locked as resolved and limited conversation to collaborators on May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions