Gateway WebSocket handshake timeout affects active-memory and streaming output
Summary
The OpenClaw Gateway''s local WebSocket connections (loopback 127.0.0.1:18789) experience handshake timeouts that affect multiple subsystems: active-memory plugin, streaming output from @larksuite/openclaw-lark, and potentially other embedded sub-agent operations.
Root Cause
This is NOT a model API timeout. All model APIs (GLM-5.1, GLM-5-Turbo, DeepSeek V4 Flash) respond in <1s. The timeout occurs at the Gateway''s internal WS handshake level:
handshake timeout conn=... peer=127.0.0.1:...->127.0.0.1:18789
closed before connect code=1006 reason=n/a
Affected Subsystems
- active-memory: Embedded sub-agent connects back to Gateway via WS → handshake timeout → fallback/error. Tested with all 3 models, all timeout at WS level (17-45s).
- Streaming output (openclaw-lark): Streaming card controller uses WS → intermittent handshake timeouts → falls back to static (non-streaming) output.
- Embedded runs:
embedded run failover decision warnings in logs.
Environment
- OpenClaw: 2026.4.26 (be8c246)
- Node.js: v24.14.0
- OS: macOS arm64 (Darwin 25.2.0)
- Plugins: openclaw-lark 2026.4.8, active-memory (disabled as workaround)
- Connection: WebSocket mode (loopback only)
Evidence
Log entries (timestamps UTC+8):
2026-04-29T18:12:14 handshake timeout conn=39d99e01... peer=127.0.0.1:61839->127.0.0.1:18789
2026-04-29T18:12:14 closed before connect code=1006 reason=n/a
2026-04-29T19:46:49 handshake timeout conn=ca4f6570... peer=127.0.0.1:61856->127.0.0.1:18789
2026-04-29T19:46:49 closed before connect code=1006 reason=n/a
2026-04-29T19:46:59 embedded run failover decision
Model API tests (all <1s, no timeout):
- GLM-5.1: 0.8s response time
- GLM-5-Turbo: 0.6s response time
- DeepSeek V4 Flash: 0.5s response time
active-memory timeout tests (all fail at WS level):
- GLM-5.1: 43948ms → timeout
- GLM-5-Turbo: 43000ms → timeout
- DeepSeek V4 Flash: 45348ms → timeout
Workaround
Disabled active-memory entirely (plugins.entries.active-memory.enabled: false). Streaming is intermittent.
Related
Gateway WebSocket handshake timeout affects active-memory and streaming output
Summary
The OpenClaw Gateway''s local WebSocket connections (loopback 127.0.0.1:18789) experience handshake timeouts that affect multiple subsystems: active-memory plugin, streaming output from @larksuite/openclaw-lark, and potentially other embedded sub-agent operations.
Root Cause
This is NOT a model API timeout. All model APIs (GLM-5.1, GLM-5-Turbo, DeepSeek V4 Flash) respond in <1s. The timeout occurs at the Gateway''s internal WS handshake level:
Affected Subsystems
embedded run failover decisionwarnings in logs.Environment
Evidence
Log entries (timestamps UTC+8):
Model API tests (all <1s, no timeout):
active-memory timeout tests (all fail at WS level):
Workaround
Disabled active-memory entirely (
plugins.entries.active-memory.enabled: false). Streaming is intermittent.Related