Repository navigation
fix(mxc): Windows sandbox fails to activate or run commands - #158303
Conversation
Current Windows builds replaced the IsoEnvBroker service with the demand-started IsolationSession service, so the readiness check failed with "IsoEnvBroker service is not installed" on hosts that can run MXC. Probe IsolationSession instead and make the test fake host name-aware so probing a retired name fails.
The plugin passes a raw ContainerConfig to spawnSandboxFromConfig, which forwards it unmapped to wxc-exec. wxc-exec 0.8.0 rejects filesystem.clearPolicyOnExit (an SDK-only alias) and processContainer.name (removed from the wire), so every MXC command failed with a configuration parse error after the 0.7.0 -> 0.8.0 bump. Clear policy through lifecycle.preservePolicy, drop the removed name, and cap containerId at 64 characters because MXC now uses it as the AppContainer profile name. Add a Windows integration test that runs the pinned wxc-exec --dry-run against the generated config.
A Windows service name is the wrong readiness signal: IsoEnvBroker was renamed to IsolationSession, and MXC ProcessContainer depends on neither. Run wxc-exec --probe on the executor the backend launches and activate only when MXC selects an isolation tier, passing its error through and logging its degradation warnings. The SDK contract test also checks readiness against the pinned probe and finalizes exec tokens so dry runs leave no sandbox temp directories.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 1, 2026, 6:29 PM ET / 22:29 UTC (Revision 6). ClawSweeper reviewWhat this changesThe Windows MXC sandbox plugin probes its selected executor, sends compatible command configuration, and explains recovery for outdated executor overrides. Merge readiness⛔ Blocked before merge - 3 items remain This PR remains necessary: current main and the latest release retain the reported defects. The follow-up addresses the earlier documentation and recovery-coverage request; maintainer acceptance of the stricter executor-override contract remains outstanding. Priority: P1 Review scores
Verification
How this fits togetherMXC is OpenClaw's optional Windows sandbox plugin. It takes agent commands and filesystem policy, checks the selected executor's readiness, and launches isolated tool processes. flowchart LR
A[Agent sandbox settings] --> B[MXC plugin]
B --> C[Selected executor probe]
C --> D{Isolation available?}
D -->|No| E[Actionable activation error]
D -->|Yes| F[Command and sandbox policy]
F --> G[MXC executor]
G --> H[Isolated tool result]
Decision needed
Why: The contributor has documented and tested the proposed boundary, but accepting activation failure for existing overrides requires maintainer intent. Before merge
Agent review detailsSecurityNone. PR surfaceSource +27, Tests +227, Docs +27. Total +281 across 9 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the selected executor as the readiness authority and retain compatible MXC command configuration, with an explicitly approved override upgrade contract. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the failure path: current main rejects hosts without IsoEnvBroker and sends obsolete raw executor fields. This review did not execute Windows code; the contributor reports successful after-fix Gateway execution. Is this the best way to solve the issue? Yes, delegating readiness to the selected executor and correcting configuration at its producer is focused and maintainable. The remaining choice is whether to accept the documented compatibility boundary for older overrides. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2f4808320cf8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Require the selected MXC executor to satisfy the 0.8.0 probe contract and explain recovery for older overrides. Cover rejection before backend registration and recovery with a compatible executor. Co-authored-by: Copilot <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…#158303) * fix(mxc): probe IsolationSession service for Windows readiness Current Windows builds replaced the IsoEnvBroker service with the demand-started IsolationSession service, so the readiness check failed with "IsoEnvBroker service is not installed" on hosts that can run MXC. Probe IsolationSession instead and make the test fake host name-aware so probing a retired name fails. * fix(mxc): send wire-compatible container config to MXC SDK 0.8.0 The plugin passes a raw ContainerConfig to spawnSandboxFromConfig, which forwards it unmapped to wxc-exec. wxc-exec 0.8.0 rejects filesystem.clearPolicyOnExit (an SDK-only alias) and processContainer.name (removed from the wire), so every MXC command failed with a configuration parse error after the 0.7.0 -> 0.8.0 bump. Clear policy through lifecycle.preservePolicy, drop the removed name, and cap containerId at 64 characters because MXC now uses it as the AppContainer profile name. Add a Windows integration test that runs the pinned wxc-exec --dry-run against the generated config. * fix(mxc): gate Windows readiness on the MXC host probe A Windows service name is the wrong readiness signal: IsoEnvBroker was renamed to IsolationSession, and MXC ProcessContainer depends on neither. Run wxc-exec --probe on the executor the backend launches and activate only when MXC selects an isolation tier, passing its error through and logging its degradation warnings. The SDK contract test also checks readiness against the pinned probe and finalizes exec tokens so dry runs leave no sandbox temp directories. * docs(mxc): clarify sandbox readiness comments * fix(mxc): document executor override recovery Require the selected MXC executor to satisfy the 0.8.0 probe contract and explain recovery for older overrides. Cover rejection before backend registration and recovery with a compatible executor. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
…#158303) * fix(mxc): probe IsolationSession service for Windows readiness Current Windows builds replaced the IsoEnvBroker service with the demand-started IsolationSession service, so the readiness check failed with "IsoEnvBroker service is not installed" on hosts that can run MXC. Probe IsolationSession instead and make the test fake host name-aware so probing a retired name fails. * fix(mxc): send wire-compatible container config to MXC SDK 0.8.0 The plugin passes a raw ContainerConfig to spawnSandboxFromConfig, which forwards it unmapped to wxc-exec. wxc-exec 0.8.0 rejects filesystem.clearPolicyOnExit (an SDK-only alias) and processContainer.name (removed from the wire), so every MXC command failed with a configuration parse error after the 0.7.0 -> 0.8.0 bump. Clear policy through lifecycle.preservePolicy, drop the removed name, and cap containerId at 64 characters because MXC now uses it as the AppContainer profile name. Add a Windows integration test that runs the pinned wxc-exec --dry-run against the generated config. * fix(mxc): gate Windows readiness on the MXC host probe A Windows service name is the wrong readiness signal: IsoEnvBroker was renamed to IsolationSession, and MXC ProcessContainer depends on neither. Run wxc-exec --probe on the executor the backend launches and activate only when MXC selects an isolation tier, passing its error through and logging its degradation warnings. The SDK contract test also checks readiness against the pinned probe and finalizes exec tokens so dry runs leave no sandbox temp directories. * docs(mxc): clarify sandbox readiness comments * fix(mxc): document executor override recovery Require the selected MXC executor to satisfy the 0.8.0 probe contract and explain recovery for older overrides. Cover rejection before backend registration and recovery with a compatible executor. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> (cherry picked from commit db24ac3) Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes: the Windows MXC sandbox fails to activate on builds without the retired
IsoEnvBrokerservice; even when activation succeeds, sandboxed commands fail because MXC 0.8.0 rejects the configuration sent to its executor.User Impact
User impact: Windows users who opt into MXC can activate the sandbox and run agent tools without installing the retired service. A configured
mxcBinaryPathmust select an MXC 0.8.0-compatible executor that supports--probe; older overrides stop activation until updated, or unset so the bundled SDK executor is used after restarting the Gateway. The current plugin also requires an OpenClaw plugin API of2026.9.6or newer.Why This Change Was Made
Readiness is checked against the same selected executor that runs commands. This avoids falling back to a different binary or a retired service-name check. When probing fails, the diagnostic preserves the host error and tells operators how to inspect the executor, update the override, or unset it and restart the Gateway.
The executor configuration uses MXC's accepted
lifecycle.preservePolicyfield, omits the removedprocessContainer.namefield, and keepscontainerIdwithin the AppContainer name limit. The pinned SDK 0.8.0 still sends its base64 request envelope on process argv; this change does not address that transport limitation.Evidence
77f05dc47d4774c6a83a0e230f5afd19e1015f7e): An isolated Windows x64 Gateway withIsolationSessionpresent andIsoEnvBrokerabsent loaded MXC, completed a sandboxedexecturn, and denied access to a host-readable file. This exercisedworkspaceAccess: "none";rwreceived executor dry-run validation only. The executor and Gateway were real; the model was mocked.77f05dc47d4774c6a83a0e230f5afd19e1015f7e):node scripts/run-vitest.mjs extensions/mxcpassed 140/140 tests. The PR's Windows-only wire-contract test exercised the pinned executor's--probeand--dry-run.CI=1 node scripts/run-vitest.mjs extensions/mxc/test/plugin.test.ts extensions/mxc/test/readiness.test.ts extensions/mxc/test/binary-resolver.test.ts --maxWorkers=1passed 31/31 tests. On the committed candidate5e51ac3681e80c8b3ef07fdd807f324065c5a84f, after those assertions,CI=1 node scripts/run-vitest.mjs extensions/mxc/test/plugin.test.ts --maxWorkers=1passed 10/10, including rejection before backend registration and recovery with the selected compatible override. That final plugin-test command took 110.27 seconds wall time, mostly cold worker transformation (92.86 seconds); the 10 tests themselves took less than one second. Windows CI seconds are not measured.git diff --checkpassed.scripts/check-changed.mjscould not complete because the configured pnpm launcher points to a missing installation path; its other selected lanes did not run.The source-checkout Gateway loaded bundled plugins from
distwithOPENCLAW_DISABLE_BUNDLED_SOURCE_OVERLAYS=1; the real OpenClaw profile was unchanged. The least-privilege container denied the host-readable file and used the isolated sandbox workspace. The SDK executor and Gateway were real; the model turn was issued by a local mock model.