Help test experimental Windows sandbox #6065
Replies: 4 comments 2 replies
-
|
I'm getting this conda.exe - application error each time codex tries to call the command I'm guessing. |
Beta Was this translation helpful? Give feedback.
-
|
I think participation would be greater if the documentation also described how to configure it: https://developers.openai.com/codex/windows#windows-experimental-sandbox config.toml |
Beta Was this translation helpful? Give feedback.
-
|
[Windows] Sandbox field report (runtime + source verification, codex-cli 0.101.0) Environment
codex sandbox windows --full-auto -- cmd /c echo SANDBOX_OK SANDBOX_OK experimental_windows_sandbox removed false Public source checkpoints
|
Beta Was this translation helpful? Give feedback.
-
|
Having a tough time reasoning about Windows sandboxing and I think approval_policy naming is part of it. I initially read 'approval_policy = "never"' as "auto-deny / block anything that would need approval". Could you consider:
-- Update What I eventually found is that this wasn’t an approval_policy = "never" issue at all - it was [features].unified_exec. I was running with:
Yet I could still write to C:\temp\Test\..., which is outside the workspace (with shell_tool: exec_command). First I sanity-checked the obvious: the directory ACLs weren’t “wide open” - C:\temp\Test was writable by normal users (e.g. Authenticated Users / my user), and importantly it was not relying on an Everyone:(M) permission edge-case. Then the key clue: the process identity. When I did a whoami inside the tool call that created the file, it ran as my normal login (domain\login), not the expected Windows sandbox identity (e.g. domain\codexsandboxonline / ...offline). That meant the command wasn’t actually being executed under the Windows sandboxed token, so it wasn’t surprising that writes to C:\temp\Test succeeded. After disabling unified_exec and restarting, the behavior changed immediately: whoami became the Codex sandboxed account, and attempts to write C:\temp\Test\... started failing with “Access is denied” (which is what I originally expected from workspace-write). So the underlying issue here was my configuration mistake: I had enabled [features].unified_exec = true, and on Windows that can cause exec_command / command execution to bypass the Windows sandboxed identity (at least in the version I tested), effectively breaking the guarantees I assumed I had from sandbox_mode = "workspace-write" + [windows] sandbox = "elevated". Takeaway / warning for others: if you care about Windows sandboxing semantics, be very cautious enabling unified_exec - verify with a simple whoami + “write outside workspace” test after enabling it, because it can change which Windows token / user your commands actually run under. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks, we have more Windows improvements coming your way, and we'd love help testing.
If you use the CLI on native windows, you can enable a highly experimental filesystem and network sandbox. Once it's stable, Codex agent mode will run more securely and safely, with far fewer approvals.
The current biggest caveat is that does not prevent file writes, deletions, or creations in any directory where the Everyone SID already has write permissions (for example, world-writable folders).
Various commands that you'd expect to succeed may fail, and we'd love your help identifying those and any other rough edges.
Run in PowerShell with
Docs (minimal so far) here: https://github.com/openai/codex/blob/main/docs/sandbox.md#platform-sandboxing-details
Happy testing and thank you!
Beta Was this translation helpful? Give feedback.
All reactions