openclaw - 💡(How to fix) Fix [Bug]: Windows 2026.4.26 gateway/WebChat/TUI handshake timeouts + stuck agent:main:main queue [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73752Fetched 2026-04-29 06:15:36
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1

OpenClaw 2026.4.26 on Windows 11 / Node 24.14.1.

Symptoms:

  • Gateway starts and reaches [gateway] ready.
  • Control UI can connect and load sessions/models/config.
  • Sending a simple WebChat message queues forever.
  • openclaw tui --session main --message "Reply with only OK." --deliver --timeout-ms 120000 fails with: gateway disconnected: closed gateway connect failed: Error: gateway closed (1000)
  • openclaw tui --local --session main --message "Reply with only OK." reaches local embedded runtime, writes to transcript, but returns: Agent failed before reply: This operation was aborted. usage input=0 output=0
  • Logs include: handshake-timeout closed before connect gateway connect failed: Error: gateway closed (1000) stuck session: sessionId=unknown sessionKey=agent:main:main state=processing queueDepth=1

Important context:

  • I recovered prior sessions and registered a separate jesse-history agent.
  • openclaw status --all now sees main and jesse-history.
  • I have not run doctor --fix or archived orphan transcripts because recovered history may still be needed.

Error Message

gateway connect failed: Error: gateway closed (1000) gateway connect failed: Error: gateway closed (1000) gateway connect failed: Error: gateway closed (1000) gateway connect failed: Error: gateway closed (1000) gateway connect failed: Error: gateway closed (1000)

Root Cause

Important context:

  • I recovered prior sessions and registered a separate jesse-history agent.
  • openclaw status --all now sees main and jesse-history.
  • I have not run doctor --fix or archived orphan transcripts because recovered history may still be needed.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

OpenClaw 2026.4.26 on Windows 11 / Node 24.14.1.

Symptoms:

  • Gateway starts and reaches [gateway] ready.
  • Control UI can connect and load sessions/models/config.
  • Sending a simple WebChat message queues forever.
  • openclaw tui --session main --message "Reply with only OK." --deliver --timeout-ms 120000 fails with: gateway disconnected: closed gateway connect failed: Error: gateway closed (1000)
  • openclaw tui --local --session main --message "Reply with only OK." reaches local embedded runtime, writes to transcript, but returns: Agent failed before reply: This operation was aborted. usage input=0 output=0
  • Logs include: handshake-timeout closed before connect gateway connect failed: Error: gateway closed (1000) stuck session: sessionId=unknown sessionKey=agent:main:main state=processing queueDepth=1

Important context:

  • I recovered prior sessions and registered a separate jesse-history agent.
  • openclaw status --all now sees main and jesse-history.
  • I have not run doctor --fix or archived orphan transcripts because recovered history may still be needed.

Steps to reproduce

  1. On Windows, run OpenClaw 2026.4.26 with Node 24.14.1.

  2. Use a clean/custom OpenClaw state directory and config: OPENCLAW_CONFIG_PATH=%USERPROFILE%.openclaw-clean\openclaw.json OPENCLAW_STATE_DIR=%USERPROFILE%.openclaw-clean OPENCLAW_GATEWAY_PORT=18789

  3. Start the gateway: node "%APPDATA%\npm\node_modules\openclaw\dist\index.js" gateway --port 18789

  4. Wait until the gateway logs: [gateway] ready

  5. Open the dashboard: openclaw dashboard --no-open Then open the token-authenticated URL from the clipboard in Chrome.

  6. In WebChat/main agent, send a simple message: Reply with only OK.

  7. Observe that the message remains queued / hangs and no assistant reply is produced.

  8. Stop the gateway, restart it, and test TUI against the gateway: openclaw tui --session main --message "Reply with only OK." --deliver --timeout-ms 120000

  9. Observe TUI fails with: gateway disconnected: closed gateway connect failed: Error: gateway closed (1000)

  10. Test local embedded runtime: openclaw tui --local --session main --message "Reply with only OK." --deliver --timeout-ms 120000

  11. Observe local runtime starts and writes to the transcript, but the assistant message says: Agent failed before reply: This operation was aborted | This operation was aborted.

Expected behavior

After the gateway reports [gateway] ready, both the Control UI/WebChat and TUI should be able to send a simple message to the main agent and receive a normal assistant response.

Specifically:

  • Sending Reply with only OK. in WebChat should produce OK, not remain queued indefinitely.
  • Running openclaw tui --session main --message "Reply with only OK." --deliver --timeout-ms 120000 should connect to the gateway and return OK, not disconnect with gateway closed (1000).
  • The agent:main:main session lane should not remain stuck in processing with queueDepth=1.
  • The session transcript should append both the user message and assistant reply.

Actual behavior

The gateway starts and eventually reports [gateway] ready, and the Control UI can connect far enough to load sessions, models, config, tools, and agent metadata. However, actual chat runs do not complete.

Observed behavior:

  • Sending Reply with only OK. in WebChat/main leaves the message queued indefinitely.
  • The main session transcript initially remained at 0 bytes / 0 lines after the queued WebChat attempt.
  • Running: openclaw tui --session main --message "Reply with only OK." --deliver --timeout-ms 120000 fails with: gateway disconnected: closed gateway connect failed: Error: gateway closed (1000)
  • Running: openclaw tui --local --session main --message "Reply with only OK." --deliver --timeout-ms 120000 reaches the local embedded runtime and writes to the transcript, but the assistant message is: Agent failed before reply: This operation was aborted | This operation was aborted.
  • Usage for that failed local attempt is input=0, output=0, so it appears to abort before a real model request is made.
  • Logs show repeated: handshake-timeout closed before connect gateway connect failed: Error: gateway closed (1000)
  • Logs also show: stuck session: sessionId=unknown sessionKey=agent:main:main state=processing age=292s queueDepth=1

Net effect: the UI is visible and sessions can be loaded, but the main agent cannot actually answer even a minimal prompt.

OpenClaw version

OpenClaw 2026.4.26 (be8c246)

Operating system

Node.js v24.14.1 Windows 11 / Windows 10.0.22631 x64

Install method

No response

Model

anthropic/claude-opus-4-6

Provider / routing chain

OpenClaw gateway-injected/openai-responses wrapper -> Anthropic -> claude-opus-4-6

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue is likely caused by a handshake timeout or connection failure between the OpenClaw gateway and the Anthropic model provider, and a potential workaround is to run openclaw doctor --fix to resolve any configuration issues.

Guidance

  • Verify the gateway connection by checking the logs for repeated handshake-timeout and closed before connect errors.
  • Run openclaw doctor --fix to resolve any configuration issues and potentially fix the connection problem.
  • Check the openclaw status --all output to ensure that the main and jesse-history agents are properly registered and configured.
  • Consider increasing the timeout value in the openclaw tui command to allow for more time to establish a connection.

Example

No code snippet is provided as the issue seems to be related to configuration and connection rather than code.

Notes

The issue may be specific to the OpenClaw version (2026.4.26) and Node.js version (24.14.1) being used, and further investigation may be required to determine the root cause.

Recommendation

Apply the workaround by running openclaw doctor --fix to resolve any configuration issues, as this may help to establish a stable connection between the OpenClaw gateway and the Anthropic model provider.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

After the gateway reports [gateway] ready, both the Control UI/WebChat and TUI should be able to send a simple message to the main agent and receive a normal assistant response.

Specifically:

  • Sending Reply with only OK. in WebChat should produce OK, not remain queued indefinitely.
  • Running openclaw tui --session main --message "Reply with only OK." --deliver --timeout-ms 120000 should connect to the gateway and return OK, not disconnect with gateway closed (1000).
  • The agent:main:main session lane should not remain stuck in processing with queueDepth=1.
  • The session transcript should append both the user message and assistant reply.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Windows 2026.4.26 gateway/WebChat/TUI handshake timeouts + stuck agent:main:main queue [1 comments, 2 participants]