Skip to content

[Bug]: tasklist hangs forever in Windows node sandbox even with "Allow Windows UI APIs" enabled (2026.7.1) #1149

Closed

Description

@PanyhP

Summary

After upgrading to 2026.7.1 (which fixed #1143 — PowerShell/console programs crashing with 0xC0000142), tasklist still hangs forever in the Windows node sandbox, even with "Allow Windows UI APIs" enabled. Every invocation times out at the node.invoke layer; the command never returns output and never exits.

Environment

  • OpenClaw Windows Companion: 2026.7.1 (Installer x64)
  • Windows: 26H1 build 28120.2630
  • Node Sandbox: ON (MXC AppContainer)
  • Node Sandbox setting: Allow Windows UI APIs = ON (settings page confirms: "Win32k boundary is disabled... allows Win32k system calls")

What works (after the #1143 fix)

  • whoami OK
  • ver OK
  • powershell (5.1) OK
  • pwsh (7.6.4) OK
  • ipconfig, dir OK

What still fails

  1. tasklist hangs forever — reproduced 5x across reboots; node.invoke times out, no output, no exit.
  2. Process enumeration is still container-isolated: Get-Process returns only 3 processes (the sandbox's own cmd, Idle, powershell); Get-CimInstance Win32_Process fails with "cannot connect to the CIM server".

Evidence

The official FAQ (docs/OPENCLAW_GATEWAY_NODE_EXEC_FAQ.md) explicitly names tasklist as a program that requires Allow Windows UI APIs:

MXC also blocks Win32k system calls by default. PowerShell, whoami, tasklist, and many other console programs initialize Windows UI APIs even when they do not show a window. Enable Allow Windows UI APIs on the Node Sandbox page when those programs are required.

The option is enabled (Win32k boundary removed), yet tasklist still hangs — so the remaining blocker is not the Win32k boundary but the process-enumeration layer (the container cannot see host processes, and tasklist blocks instead of failing fast).

Repro

  1. Companion 2026.7.1, Node Sandbox ON, "Allow Windows UI APIs" ON
  2. From the gateway: run exec targeting the Windows node, command tasklist
  3. Observed: hangs until node.invoke timeout; no output, no exit

Expected

  • tasklist returns the process list, or at minimum fails fast with a clear error; OR
  • Documentation clarifies that host process enumeration is intentionally unavailable inside the sandbox and tasklist is expected to hang — in which case a fast, explicit deny would still be preferable to a hang.

Activity

  1. added
    clawsweeper:fix-shape-clear
    clawsweeper:queueable-fix
    clawsweeper:source-repro
    impact:other
    issue-rating: 🦞 diamond lobster
    no-stale
    P1
    on Aug 11, 2026
  2. clawsweeper commented on Aug 11, 2026

    @clawsweeper

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 12, 2026, 3:18 PM ET / 19:18 UTC.

    Summary
    Keep open: v2026.7.1 current main has an unbounded synchronous cleanup wait after MXC command cancellation, which can outlive the configured timeout. The linked open PR owns the narrow repair and explicitly closes this issue.

    Likely related people

    • shanselman (high confidence): introduced the current MXC executor and is the linked repair author.

    Reproducibility: yes. source-reproducible: cancellation reaches synchronous WaitForExit() after the kill attempt, so a surviving launcher or undrained pipe prevents the timed-out result from returning.

    Regression provenance
    Possible regression — suspected (reviewed change). No predecessor PR is attributed.

    Next step
    The linked open PR already owns the bounded cleanup repair, so a second fix branch would duplicate active implementation work.

    Review details

    Best possible solution:

    Merge the linked repair after normal review, preserving MXC process-tree termination and returning the existing timed-out result after bounded cleanup.

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

    Yes, source-reproducible: cancellation reaches synchronous WaitForExit() after the kill attempt, so a surviving launcher or undrained pipe prevents the timed-out result from returning.

    Is this the best way to solve the issue?

    Yes. Bounding only the post-cancellation exit and pipe-drain waits addresses the hang while preserving the existing sandbox policy and process-tree termination behavior.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The linked repair intentionally bounds timeout cleanup only. Host process enumeration remains subject to AppContainer policy and should not be represented as newly available.

    Codex review notes: model internal, reasoning high; reviewed against 4206611f2b2e.

    Label changes

    Label justifications:

    • P1: A Windows-node command can remain pending indefinitely after its configured timeout, blocking an active command workflow.
    • impact:other: The report concerns sandbox command-execution availability, which does not map more specifically to the owned impact taxonomy.
    Evidence reviewed

    What I checked:

    • Current source has an unbounded cancellation wait: After cancellation, the executor attempts process-tree termination and then calls synchronous WaitForExit() before returning its timed-out result. A launcher or redirected pipe that remains alive can therefore keep the invocation pending. (src/OpenClaw.Shared/Mxc/MxcExecutor.cs:150, 4206611f2b2e)
    • Feature provenance: The current executor, including the cancellation cleanup path, was introduced by the MXC UI-API repair commit. (src/OpenClaw.Shared/Mxc/MxcExecutor.cs:150, 4206611f2b2e)
    • Current documentation distinguishes UI access from timeout behavior: The execution FAQ says enabling Windows UI APIs removes the Win32k boundary while timeout controls remain in force, matching the report's separation of the two concerns. (docs/OPENCLAW_GATEWAY_NODE_EXEC_FAQ.md:651, 4206611f2b2e)
    • Open implementation owner: The linked open PR states that it bounds post-cancellation launcher and pipe cleanup at 500 ms while retaining process-tree termination, and it uses closing syntax for this issue. (c31f320a8d5d)
    • Release provenance: The source containing the unbounded wait is current main and is included in v2026.7.1, so the issue is not already fixed in the latest release. (src/OpenClaw.Shared/Mxc/MxcExecutor.cs:150, 4206611f2b2e)

    Likely related people:

    • shanselman: Current main attributes the MXC executor to the UI-API repair commit, and this person authored the open focused repair. (role: introduced current behavior and linked repair author; confidence: high; commits: 4206611f2b2e, c31f320a8d5d; files: src/OpenClaw.Shared/Mxc/MxcExecutor.cs)
    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. added
    status: 🚢 actively landing
    on Aug 12, 2026
  4. removed
    clawsweeper:queueable-fix
    clawsweeper:fix-shape-clear
    no-stale
    on Aug 12, 2026
  5. removed
    status: 🚢 actively landing
    on Aug 12, 2026
  6. added
    clawsweeper:linked-pr-open
    clawsweeper:no-new-fix-pr
    on Aug 12, 2026
  7. locked as resolved and limited conversation to collaborators on Aug 17, 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

    P1clawsweeper:linked-pr-openclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:otherissue-rating: 🦞 diamond lobster

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions