Skip to content

Windows node system.run always times out on gateway (fixed ~30 s RPC limit) — MXC sandbox takes 27–53 s per invocation, result #1190

Closed as not planned

Description

@yTI0r

Environment

  • OpenClaw Gateway: 2026.7.1-2, WSL2 (Linux), bind loopback :18789
  • OpenClaw Companion (Windows node): core v2026.7.1, Windows 10.0.26200 (x64), i7-14700KF
  • Node capabilities: system, canvas, device, browser
  • Node exec approvals: security=allowlist, ask=on-miss, askFallback=deny, autoAllowSkills=off, allowlist empty
  • MXC: wxc-exec.exe v0.7.0-alpha; sandbox enabled=True, blockHostFallbackWhenMxcUnavailable=False

Steps to reproduce

  1. Pair a Windows node (OpenClaw Companion) with a gateway.
  2. From an agent session run any simple command via exec with host=node (e.g. echo test).
  3. Approve the Windows exec-approval dialog immediately.
  4. Observe: the exec tool fails with TIMEOUT: node invoke timed out.

Expected behavior
Command output is returned to the agent once approved and executed.

Actual behavior
The gateway aborts node.invoke after ~30 s (errorCode=UNAVAILABLE), while the node executes the command successfully and sends the result — 2–4 s after the gateway already timed out.

Confirmed diagnosis (measured, latest run)

12:50:52.542 node.invoke.request received by node
12:50:54.536 EXEC-APPROVALS decision=allow (user clicked within ~2 s)
12:50:54.539 MXC sandbox start (new AppContainer, containerId changes every run)
12:51:25.655 MXC result: exitCode=0, durationMs=31114 (command SUCCEEDED)
12:51:25.655 Sending invoke result: ok=True
12:51:22.563 gateway timeout: node.invoke 30014ms UNAVAILABLE ← fired 3.1 s BEFORE the result

Request→response total: 33.1 s vs gateway limit 30.0 s. Approval latency is not the issue (≈2 s). Observed MXC durations across runs: 27 s, 53 s, 27 s, 31 s — unstable, and each run creates a fresh AppContainer (containerId differs every time).

The 30 s limit is hard-coded on the gateway: passing exec timeouts of 60 s / 120 s / 150 s still results in exactly node.invoke 30014ms (the node even receives timeoutMs:150000 in params, but the gateway RPC aborts at 30 s regardless).

Suggested fixes (any of)

  1. Make the gateway node.invoke RPC timeout configurable (config/env) or honor the request's timeoutMs with a sane cap.
  2. Reuse/warm MXC containers across invocations to eliminate the ~27–53 s cold start.
  3. When MXC cold start exceeds the RPC timeout, fall back to host execution if blockHostFallbackWhenMxcUnavailable=false (currently fallback only triggers when MXC is unavailable, not when it is merely slow).

Related but different: #1189 (SetInformationJobObject 0x80070057 — exec never starts; here exec succeeds but the result is discarded by the gateway timeout).

Activity

  1. added
    clawsweeper:needs-maintainer-review
    clawsweeper:needs-product-decision
    clawsweeper:needs-security-review
    clawsweeper:no-new-fix-pr
    clawsweeper:source-repro
    impact:other
    impact:security
    issue-rating: 🦞 diamond lobster
    P1
    on Aug 21, 2026
  2. clawsweeper commented on Aug 21, 2026

    @clawsweeper

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed September 14, 2026, 1:32 PM ET / 17:32 UTC.

    Summary
    Keep open for verification against the supported Gateway and Windows release combination. Upstream main now explicitly supplies the invocation deadline that prevents the reported 30-second cutoff, but its shipped availability and resolution on the affected Windows setup are not established.

    Reproducibility: no. high-confidence current-version reproduction is established. The report contains concrete historical timings, but current upstream supplies the missing invocation budget; this read-only review ran no application, build, or tests.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Next step
    Verify release inclusion of upstream deadline propagation and retest agent exec on the affected Windows setup before opening another fix PR; no bounded remaining local defect is established.

    Security
    Needs attention: The suggested timeout-triggered host fallback must not become an implicit containment bypass.

    Review details

    Best possible solution:

    Use the existing upstream deadline propagation while preserving local sandbox limits and containment, with clear in-product diagnostics when execution cannot finish within the available budget.

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

    No high-confidence current-version reproduction is established. The report contains concrete historical timings, but current upstream supplies the missing invocation budget; this read-only review ran no application, build, or tests.

    Is this the best way to solve the issue?

    Yes, propagating the existing invocation deadline is the narrowest solution and is already present upstream. Container reuse or timeout-triggered host fallback is unnecessary unless a separate current defect is demonstrated.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The upstream deadline propagation change has not been tied to a supported released Gateway and verified with the affected Windows setup.
    • Per-call container creation remains, but current evidence does not establish that it still causes the reported 27–53 second latency.

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

    Label changes

    Label justifications:

    • P0: The report describes unusable core Windows command execution on the affected setup, and recent human triage explicitly restored emergency priority.
    • impact:other: Successful remote command results arrive after the Gateway stops waiting, preventing usable agent execution.
    • impact:security: The proposed slow-sandbox host fallback would change the containment boundary and requires explicit scrutiny.
    Evidence reviewed

    Security concerns:

    • [medium] Preserve containment when sandbox startup is slow — src/OpenClaw.Shared/Mxc/MxcCommandRunner.cs:178
      Treating a slow sandbox as unavailable could execute the command outside its intended boundary and repeat side effects from an invocation that already started. This is a concern with the suggested remedy, not a demonstrated vulnerability in current code.
      Confidence: 0.95

    What I checked:

    • Concrete reported failure: The captured issue body records immediate approval, successful execution after 31.1 seconds, and a Gateway timeout at 30.0 seconds before the node returned its result. This supports a real historical failure, but does not establish reproduction on current releases.
    • Dependency ownership boundary: The FAQ assigns agent exec orchestration and invocation gates to openclaw/openclaw, while Windows owns local approval and MXC execution. Its explicit upstream source links justify inspecting the Gateway implementation. (docs/OPENCLAW_GATEWAY_NODE_EXEC_FAQ.md:307, bd9ce43b4d9c)
    • Upstream now propagates the missing deadline: At the inspected upstream main revision, buildNodeSystemRunInvoke sets top-level timeoutMs from target.invokeDeadlineMs separately from the nested program timeout. Its comment explicitly identifies the otherwise-default 30-second pending invocation timer and discarded late result. This directly addresses the reported mechanism, but is not proof of release inclusion or Windows integration success. (src/agents/bash-tools.exec-host-node-phases.ts:379, 89029af97dc1)
    • Thirty seconds is a default: invokeNodeRegistryCore resolves the invocation timer from params.timeoutMs with a 30,000 ms default and arms the pending invocation with that resolved budget. Current upstream therefore does not impose an unconditional 30-second maximum. (src/gateway/node-registry-private.ts:245, 89029af97dc1)
    • Existing integration test distinguishes all three budgets: The Gateway-to-Windows MXC test supplies a 60-second nested execution timeout, a 90-second top-level invocation timeout, and a 120-second Gateway CLI timeout, then checks returned output and successful exit. This direct CLI path is relevant coverage, but does not establish the reported agent exec path. (tests/OpenClaw.E2ETests/Setup/MxcSetupAndConnectTests.cs:146, bd9ce43b4d9c)
    • Local timeout and containment remain separate: MxcCommandRunner combines the requested timeout with the local sandbox cap and returns sandbox timeout results without host retry. Host fallback is limited to unavailable-sandbox paths. DirectAppContainerExecutor adds a five-second cleanup allowance; MxcConfigBuilder still generates a per-call container ID. (src/OpenClaw.Shared/Mxc/MxcCommandRunner.cs:145, bd9ce43b4d9c)

    Likely related people:

    • shanselman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • Barbara Kudiess: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    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.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  3. MilkyWay008 commented on Aug 22, 2026

    @MilkyWay008

    The node.invoke 30014ms UNAVAILABLE gap is the whole story, the gateway's RPC deadline is hard-coded around 30s and the MXC fresh-AppContainer cold start (27-53s) always outruns it, so the node lands 2-4s after the gateway gives up. Bumping exec timeouts won't help, that's a different knob; the fix is raising the gateway-side invoke deadline or keeping the MXC container warm between runs. I've got a portable Hermes OTG on a USB stick I use as a rescue agent for exactly this kind of Windows+WSL agent pairing mess, https://github.com/MilkyWay008/Hermes-OTG if you want to poke at it.

  4. added
    P0
    and removed
    P1
    on Sep 4, 2026
  5. 6 remaining items

  6. added this to the 9/30 MXC Release milestone on Sep 4, 2026
  7. added
    P0
    and removed
    P1
    on Sep 14, 2026
  8. added
    issue-rating: 🦪 silver shellfish
    and removed
    clawsweeper:needs-maintainer-review
    clawsweeper:needs-product-decision
    issue-rating: 🐚 platinum hermit
    clawsweeper:needs-live-repro
    on Sep 14, 2026
  9. removed this from the MXC Update milestone on Sep 23, 2026
  10. github-actions commented on Oct 8, 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.

  11. github-actions commented on Oct 16, 2026

    @github-actions
    Contributor

    Closing due to inactivity.
    If this still affects OpenClaw Windows, open a new issue with the current version, logs, and fresh reproduction details.

  12. locked as resolved and limited conversation to collaborators on Oct 19, 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

    P0clawsweeper:needs-security-reviewclawsweeper:no-new-fix-primpact:otherimpact:securityissue-rating: 🦪 silver shellfishstale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions