Skip to content

Allow Node Sandbox opt-out on unsupported Windows builds (restore host execution path)#496

Closed
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-node-sandbox-compatibility
Closed

Allow Node Sandbox opt-out on unsupported Windows builds (restore host execution path)#496
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-node-sandbox-compatibility

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

On Windows 10 build 19044, MXC sandboxing is unavailable, and the current behavior blocks all host=node command execution with no user override. This change restores a safe/explicit opt-out path: keep fail-closed when sandbox is enabled, but allow unsandboxed execution when users turn sandbox off.

  • Runtime gating (MxcCommandRunner)

    • Reordered execution checks to honor explicit opt-out first.
    • New behavior:
      • SystemRunSandboxEnabled == false → route to host runner, even if MXC is unavailable.
      • SystemRunSandboxEnabled == true && MXC unavailable → deny execution (fail closed) with updated guidance text.
  • Sandbox UX on unsupported systems (SandboxPage)

    • Keeps the sandbox toggle visible when MXC is unavailable.
    • Splits unavailable state messaging by toggle state:
      • Unavailable + ON: commands blocked.
      • Unavailable + OFF: unprotected host mode.
    • Updates action-bar copy to explicitly call out temporary unprotected mode as a workaround.
  • Behavioral test update

    • Updated MxcCommandRunner unit coverage to assert host routing when MXC is unavailable and sandbox is turned off.
if (!settings.SystemRunSandboxEnabled)
{
    return await _hostFallback.RunAsync(request, ct);
}

if (!_isSandboxAvailable())
{
    return Deny("Sandboxing is enabled but unavailable...");
}

Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Node Sandbox blocking commands on Windows 10 build 19044 Allow Node Sandbox opt-out on unsupported Windows builds (restore host execution path) May 21, 2026
Copilot AI requested a review from shanselman May 21, 2026 16:47
@shanselman
Copy link
Copy Markdown
Contributor

will use #487 instead

@shanselman shanselman closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows 10 (build 19044): Node Sandbox blocks all commands with no way to disable

2 participants