[Bug] Hub 2026.9.8-1: premature WebSocket closures and lost system.run.prepare result with WSL Gateway
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 8/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- csharp, docker, linux
- Domain
- backend, distributed-systems, networking
Research direction
Start in src/OpenClaw.Shared/WebSocketClientBase.cs, the receive loop around line 472 and the premature-close warning near line 555, then the SendRawAsync helper near line 744. Related paths are WindowsNodeClient.cs around lines 630 and 644 and the slow-capability test in tests/OpenClaw.Shared.Tests/WindowsNodeClientTests.cs. Done would mean a role- and connection-generation-labelled diagnostic that separates missed PONG processing from transport loss, which needs wire-level reproduction first.
Written by the indexing model from the issue text.
Description
Summary
Windows Hub intermittently loses its Gateway connections, including while the agent is idle. One node-exec request failed during system.run.prepare despite the Hub logging local completion and an ok=True result send attempt. Root cause is unresolved; the report distinguishes observed failures from source-level hypotheses.
Environment
- Windows 11 Pro, build 26300.
- Hub 2026.9.8-1, installed product revision
2ba89f377ce8ce3f5ddfc452e4d509329f109114. - Installed self-contained runtime configuration: .NET / WindowsDesktop 10.0.12.
- Gateway 2026.9.9 (
bcfc888), Node 24.19.0, Ubuntu-26.04 in WSL2 with mirrored networking. - Ordinary Gateway listener is loopback-only. No externally managed reverse proxy targets it.
gateway.rolesis absent andgateway.trustedProxiesis empty. - Three Windows nodes exist. The original command explicitly targeted the Hub; later generic node-mode close records cannot all be assigned to it.
Observed reproduction
This is an intermittent live-installation observation, not a deterministic minimal reproduction:
- Connect the Windows Hub operator and node roles to the WSL Gateway.
- From a Main agent session, request a harmless echo through node exec, explicitly targeting the Hub with a Windows working directory and a 20-second tool timeout.
- Observe the request fail after approximately 5.8 seconds with
DISCONNECTED: node disconnected (system.run.prepare), without stdout or exit status. - Leave the agent idle. Automatic reconnects and premature closures also occur without another command.
Expected: prepare returns to the Gateway and an ordinary harmless command completes, or transport failure is reported accurately. Actual: result delivery is unconfirmed and sockets reconnect repeatedly.
Sanitized timeline, 2026-10-09 (BST, UTC+1)
Original request:
| Time | Hub observation |
|---|---|
| 15:53:10.328 | Prepare handled locally |
| 15:53:10.332 | Invoke-result send logged with ok=True |
| 15:53:10.336 | Local prepare invocation completed |
| 15:53:12.458 | Connection closed prematurely |
| 15:53:12.459 | Node disconnected |
| 15:53:15.998 | Node registered again |
A later three-minute stock verbose-WebSocket observation, with no command canary, recorded:
| Time | Connection prefix | Client mode | Close code | Cause | Ping write | Last pong age (ms) | Buffered bytes |
|---|---|---|---|---|---|---|---|
| 16:33:51.942 | d0aee6ef | cli | 1006 | heartbeat-timeout | completed | 44710.8 | 0 |
| 16:34:23.160 | 8f0379a3 | node | 1006 | heartbeat-timeout | completed | 39671.8 | 0 |
Hub independently logged premature closure at exactly 16:33:51.942. That is strong correlation, not definitive process attribution: the Hub operator declares cli/cli, while its node declares node-host/node. The second record has not been assigned to a particular Windows node. The original prepare failure has no retained matching Gateway close-cause record.
Completed ping writes and zero buffered output do not prove peer receipt. A transient Gateway event-loop delay was observed near the original failure, but later idle disconnects mean it is not established as the sole cause. HTTP health checks returned 200 after restoration; the restored Gateway process stayed active with no automatic restarts, and the Hub process remained alive. Diagnostic logging was restored to normal afterward. These checks do not establish continuous uptime or a functioning node-exec route.
Exact-revision source findings, not a root-cause claim
- WebSocketClientBase.cs:472 onward awaits message processing between receives. A blocking handler/subscriber could delay control-frame processing, but no such runtime stall has been demonstrated.
- Accepted node capabilities already run off the receive loop through
Task.Run: WindowsNodeClient.cs:630. The slow-capability test at WindowsNodeClientTests.cs:3655 exercises message dispatch, not wire-level heartbeat behavior; it was inspected, not run here. - The
ok=Trueresult log precedes the socket write: WindowsNodeClient.cs:644. The untracked SendRawAsync helper, WebSocketClientBase.cs:744 can return without sending on a closed socket. Thus local completion does not establish Gateway receipt. - The premature-close warning at WebSocketClientBase.cs:555 has no role or connection-generation label, limiting attribution.
- Microsoft guidance and the .NET 10.0.12 implementation confirm automatic protocol PONG handling during receive. Adding an application-level JSON ping handler is not an established fix.
Related reports and request
This differs from #1190, where MXC executes successfully but exceeds an approximately 30-second RPC limit. This failure happened during prepare, with disconnection after approximately 5.8 seconds and no process-execution receipt. It also differs from #1574, which concerns reconnects during Windows session teardown; no shutdown was in progress here.
Is there a released, supported repair matching this behavior? Otherwise, what bounded role/generation-specific diagnostic would distinguish missed protocol PONG processing from transport loss and attribute operator versus node closures? No permission expansion, timeout workaround, network-mode change, or unmerged patch has been applied. No raw traffic, session content, credentials, or personal paths are included.
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 315
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 135
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openclaw/openclaw-windows-node
-
clawsweeper:source-repro impact:ux-release-blocker issue-rating: 🦞 diamond lobster P0
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
openclaw/openclaw-windows-node#1723 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:security issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
openclaw/openclaw-windows-node#1516 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
clawsweeper:needs-info clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr impact:ux-friction issue-rating: 🦐 gold shrimp P1 stale
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openclaw/openclaw-windows-node#1145 · 5 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
clawsweeper:needs-security-review clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:security issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
openclaw/openclaw-windows-node#1755 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
bug impact:ux-friction issue-rating: 🦪 silver shellfish P2
Difficulty 3/5 Half a day Newbie friendliness 50/100
openclaw/openclaw-windows-node#1753 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
All issues in openclaw/openclaw-windows-node
Similar issues
-
area/indexing bug package/core triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
elastic/docs-builder#4495 ·
Maintainers usually reply within 1 day
-
ASP.NET Core container quickstart: `docker-run: debug` task sample is missing its closing braceOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
microsoft/vscode-docs#10499 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
SourceDotNET/Source.NET#203 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day