Summary
On Windows with @microsoft/mxc-sdk@0.6.1, processcontainer can successfully execute a simple PowerShell command, but attempting to execute Bun through the same SDK runner exits nonzero with no stderr. I also hit a separate env handling failure when passing the host PATH through the SDK env parameter.
This may be a Bun/runtime compatibility issue, but the current failure mode is hard to diagnose.
Environment
- OS: Windows
- SDK:
@microsoft/mxc-sdk@0.6.1
- Containment:
process resolving to processcontainer
- Spawn mode:
spawnSandboxFromConfig(..., { usePty: false })
getPlatformSupport() reported:
The local capability wrapper resolved the backend as processcontainer.
What worked
Running PowerShell inside the MXC process container worked:
await runner.exec(
"C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe",
["-NoLogo", "-NoProfile", "-Command", "Write-Output mxc-smoke"],
{
cwd: tempDir,
readonlyPaths: ["C:/Windows/System32"],
readwritePaths: [tempDir],
timeoutMs: 30_000,
},
);
Result:
{"stdout":"mxc-smoke\r\n","stderr":"","code":0}
What failed
Running Bun through the same runner failed:
await runner.exec(
process.execPath,
["-e", "console.log('mxc smoke')"],
{
cwd: tempDir,
readonlyPaths: [process.execPath],
readwritePaths: [tempDir],
timeoutMs: 30_000,
},
);
Result:
{"stdout":"","stderr":"","code":66}
There was no stderr or diagnostic text explaining whether this is expected, unsupported, missing filesystem access, env-related, or a child runtime failure.
Env-related failure
Before removing inherited PATH, passing PATH via the SDK env parameter produced:
Process error: CreateProcessW failed: The system could not find the environment option that was entered. (0x800700CB)
{"error":{"code":"backend_error","message":"Process error: CreateProcessW failed: The system could not find the environment option that was entered. (0x800700CB)"}}
That may be expected if PATH contains entries that are invalid inside the container, but it would be useful for the SDK/backend to document or diagnose that case clearly.
Expected behavior
Either:
- Bun works under Windows
processcontainer when the executable path is readable and no broad env is passed, or
- MXC reports a clearer diagnostic explaining why that runtime cannot start in this containment mode.
For the env case, it would help to document whether callers should avoid passing host PATH and instead provide a container-safe env block.
Summary
On Windows with
@microsoft/mxc-sdk@0.6.1,processcontainercan successfully execute a simple PowerShell command, but attempting to execute Bun through the same SDK runner exits nonzero with no stderr. I also hit a separate env handling failure when passing the hostPATHthrough the SDK env parameter.This may be a Bun/runtime compatibility issue, but the current failure mode is hard to diagnose.
Environment
@microsoft/mxc-sdk@0.6.1processresolving toprocesscontainerspawnSandboxFromConfig(..., { usePty: false })getPlatformSupport()reported:{"isSupported":true}The local capability wrapper resolved the backend as
processcontainer.What worked
Running PowerShell inside the MXC process container worked:
Result:
{"stdout":"mxc-smoke\r\n","stderr":"","code":0}What failed
Running Bun through the same runner failed:
Result:
{"stdout":"","stderr":"","code":66}There was no stderr or diagnostic text explaining whether this is expected, unsupported, missing filesystem access, env-related, or a child runtime failure.
Env-related failure
Before removing inherited
PATH, passingPATHvia the SDK env parameter produced:That may be expected if
PATHcontains entries that are invalid inside the container, but it would be useful for the SDK/backend to document or diagnose that case clearly.Expected behavior
Either:
processcontainerwhen the executable path is readable and no broad env is passed, orFor the env case, it would help to document whether callers should avoid passing host
PATHand instead provide a container-safe env block.