AI
Codex Windows Sandbox: MXC, elevated and unelevated
The three Codex sandbox modes on Windows, when to use each, and how to enable and test MXC or fall back to a legacy mode.
Last reviewed:
The idea
Codex on Windows runs through the ChatGPT desktop app, the CLI or the IDE extension. The app can run natively in PowerShell with a Windows sandbox instead of WSL or a virtual machine, with bounded file and network permissions. The permission profile sets which paths are readable or writable and whether network is allowed. The approval policy separately sets when Codex asks for more access.
The three modes
- mxc: recommended on compatible devices, native process isolation.
- elevated: the preferred legacy fallback. Needs administrator-approved setup; commands run without administrator privileges; uses lower-privilege sandbox users and firewall rules.
- unelevated: a legacy fallback when elevated is unavailable and policy permits. Weaker network isolation and no denied read paths.
Enable MXC
- In the desktop app: MXC is preferred automatically for consumer accounts when the device supports it.
- For enterprises or standalone CLI: in config.toml set prefer_mxc = true under [features].
- Keep windows.sandbox set to a legacy mode your organization permits (elevated or unelevated) as a fallback.
- To block MXC in an organization: set allow_mxc = false under [windows] in requirements.toml.
Compatibility limits
- The device needs Microsoft Execution Containers capabilities, which Microsoft is rolling out to Windows 11 devices.
- Explicit windows.sandbox = mxc fails if capabilities are missing or policy blocks it.
- Remaining child processes stop when the foreground command exits, so test workflows that rely on detached dev servers.
- Deny-read globs are evaluated when each process starts, so matching files created later stay readable to that process.
Windows versions
- Windows 11: recommended.
- Recent, fully updated Windows 10: best effort, 1809 or newer required.
- Older Windows 10 builds: not recommended.
- winget should be available.
Troubleshooting
If a command cannot read a folder, check the active permission profile, managed requirements and Windows file permissions. In the CLI use /status and /debug-config. Ask an administrator to review a managed restriction rather than disabling the sandbox. OpenAI warns that full access mode can perform unintentional destructive actions.
Common mistakes
- Disabling the sandbox instead of reviewing the managed restriction.
- Assuming Windows 11 means MXC is available. The guide says the version matrix does not establish MXC on a given device.
Next steps
- For sandbox and approvals in general: the sandbox and approvals page.
- For the config file: config basics.
Latest updates
No dated update on this topic was found on the official page read on 2026-11-30. We add updates when they appear.
Similar tools
Standalone pages for similar items are added after their official sources are read. We name nothing without a full page.
Related pages
Sources
- OpenAI Developers: Windows sandbox · read on
Wording is ours, from the official source. Images and video belong to their owners and are credited with a link to the official page.