Skip to content

[Bug] Hub 2026.9.8-1: premature WebSocket closures and lost system.run.prepare result with WSL Gateway #1689

Open

Description

@eskild-boop

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.roles is absent and gateway.trustedProxies is 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:

  1. Connect the Windows Hub operator and node roles to the WSL Gateway.
  2. 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.
  3. Observe the request fail after approximately 5.8 seconds with DISCONNECTED: node disconnected (system.run.prepare), without stdout or exit status.
  4. 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

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.

Activity

  1. added
    P1
    clawsweeper:needs-maintainer-review
    clawsweeper:no-new-fix-pr
    impact:other
    issue-rating: 🦪 silver shellfish
    on Oct 9, 2026
  2. clawsweeper commented on Oct 9, 2026

    @clawsweeper

    Codex review: this still needs some work.

    Summary
    Keep this issue open: it documents an interrupted command on an official release, and the merged transport repairs do not establish that its premature closures or missing prepare result are resolved.

    Reproducibility: No high-confidence current-main reproduction is established: the reporter supplies intermittent release observations, while source confirms delivery and attribution limitations without proving the disconnect trigger; this read-only review ran no builds or tests.

    Next step
    Capture a supported-build failure correlating client role, connection generation, receive progress, result-write outcome, and Gateway close cause before selecting a repair.

    Review details

    Best possible solution:

    Restore reliable invocation with evidence that separates local capability completion, socket-write outcome, and Gateway receipt for the same connection.

    Do we have a high-confidence way to reproduce the issue?

    No high-confidence current-main reproduction is established: the reporter supplies intermittent release observations, while source confirms delivery and attribution limitations without proving the disconnect trigger; this read-only review ran no builds or tests.

    Is this the best way to solve the issue?

    Correlated transport diagnostics are the justified next step; longer timeouts, application-level ping handling, or automatic result replay would assume an unproven cause or delivery guarantee.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The original failure has no correlated Gateway close cause, and later node timeout records cannot identify which Windows node disconnected.
    • No current-build reproduction distinguishes receive-handler delay, Gateway event-loop delay, and Windows-to-WSL transport loss.

    Codex review notes: model internal, reasoning medium; reviewed against b762c8dc12a8.

    Label changes

    Label changes:

    No label changes.

    Label justifications:

    • P1: Repeated established-connection loss interrupted an actual agent-to-Windows command on an official release.
    • impact:other: The demonstrated impact is failed Windows node execution through transport loss, without established process crashes, channel-message loss, or state corruption.
    Evidence reviewed

    Acceptance criteria:

    • Establish a failing regression for the observed transport failure before implementing a repair.
    • ./build.ps1
    • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
    • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore
    • Validate the same harmless invocation through a real WSL Gateway with correlated client and Gateway diagnostics.

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed November 30, 2026, 12:25 AM ET / 05:25 UTC.

  3. github-actions commented on Oct 24, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

  4. added
    clawsweeper:intake:support
    and removed
    clawsweeper:intake:support
    on Oct 25, 2026
  5. github-actions commented on Nov 9, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

  6. added
    clawsweeper:intake:support
    and removed
    clawsweeper:intake:support
    on Nov 14, 2026
  7. added
    clawsweeper:intake:support
    and removed
    clawsweeper:intake:support
    on Nov 15, 2026
  8. github-actions commented on Nov 30, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

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

    P1clawsweeper:needs-maintainer-reviewclawsweeper:no-new-fix-primpact:otherissue-rating: 🦪 silver shellfishstale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions