Windows Sandbox feature required but cannot be installed - Codex fails to initialize
What version of the Codex App are you using (From “About Codex” dialog)?
codex-cli 0.117.0-alpha.12
What subscription do you have?
Enterprise
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Codex fails to send messages with error "Unable to send message - Set up Agent sandbox to continue".
The sandbox initialization hangs indefinitely when attempting to execute commands. Investigation revealed:
- Sandbox log shows ACL helper process gets stuck: "read ACL helper already running; skipping spawn"
- Testing
codex sandbox windows echo "test"hangs indefinitely - Root cause: Windows Sandbox feature is not installed/enabled on the system
- Attempted to enable Windows Sandbox via Windows Features but installation failed after 90 minutes (likely blocked by corporate IT policies)
Error from sandbox log (C:\Users\dbradt\.codex\.sandbox\sandbox.log):
What steps can reproduce the bug?
- Use Windows 10 Enterprise with Windows Sandbox feature disabled/not installed
- Install Codex/Windsurf
- Open Codex and attempt to send any message
- Observe "Unable to send message - Set up Agent sandbox to continue" error
- Sandbox initialization hangs indefinitely
To verify Windows Sandbox status:
- Open "Turn Windows features on or off"
- Check if "Windows Sandbox" is unchecked
- Attempting to enable it may fail on corporate-managed systems
Configuration tested:
- config.toml with
sandbox = "elevated"(with admin rights) - config.toml with
sandbox = "none"andenabled = false - Cleared sandbox state directories (.sandbox, .sandbox-secrets, .tmp)
- Killed stuck sandbox processes
- All configurations result in same hanging behavior
Also tried to enable Windows sandbox. Machine attempted to do this update for 90 minutes and then it failed.
What is the expected behavior?
Codex should either:
- Detect that Windows Sandbox feature is not available and provide a clear error message explaining the requirement
- Provide alternative sandbox mechanisms (WSL, Docker, or restricted token mode) that don't require Windows Sandbox feature
- Allow graceful degradation or fallback when Windows Sandbox is unavailable
- Document Windows Sandbox as a system requirement in installation documentation
Expected error message example:
"Windows Sandbox feature is required but not installed. Please enable it via Windows Features or contact your IT administrator."
Additional information
- System: Windows 10 Enterprise 2009 (Build 26200)
- Codex version: 0.117.0-alpha.12
- Running with Administrator privileges
- Corporate-managed system where Windows Sandbox installation is blocked by IT policy
- Virtualization appears to be available (HyperVisorPresent check passed)
- Issue affects both Windsurf-integrated Codex and standalone Codex app
- Worked once briefly, then stopped working (suggesting sandbox state corruption)
This appears to be a common issue in enterprise environments where Windows Sandbox feature cannot be enabled due to corporate security policies. A workaround or alternative sandbox mechanism would greatly improve enterprise usability.
10 Comments
Interesting, what makes you think Codex's sandboxing is related to the native "Windows Sandbox" feature? I was looking into how Codex does sandboxing, and my conclusion is that what Codex is doing is just access control based sandbox that has nothing to do with VM or "Windows Sandbox" feature, based on my reading of
windows-sandbox-rsfolder. It uses a combination of local user accounts, restricted tokens, firewall rules etc to achieve sandboxing.In fact, with v0.118.0 on a Windows 11 machine, I was able to use the "elevated sandbox" without even turning on the "Windows Sandbox" feature.
~I am aware that OpenAI's sandboxing documentation says Codex uses the native Windows Sandbox, but that is inconsistent with my finding. Unless there is some non-public code paths or experimental flag, I suspect that the documentation is wrong.~ I misread the documentation. The documentation does not actually refer to the built-in Windows Sandbox or links to it.
I tried that because somebody in my organization tried turning on windows sandbox during troubleshooting and it fixed his issue.
Thanks. Have you by any chance observed similar issues on a Windows 11 machine?
Somebody else on my team is having the same issue and I think on a Windows 11 machine. I keep getting told the issue should be fixed soon but we are approaching 3 weeks with it still not working.
It works now never mind.
This appears similar to the linked duplicate issues. My environment is Windows desktop, and I see:
Please confirm whether this is the same root cause and whether there is a recommended workaround.
This was the same issue I had. The only fix for me was OpenAI fixing the issue in a release last week.
I got this get fixed by doing a minor change from working files I took assistance for chat gpt. But I am running through another problem my codex is running g very slow on responding to threads and commands its like taking hours. How to deal with it? Is it because i may be running a heavy project with back to back prompts on single chat?
Adding a separate root cause that produces this exact same "Set up Agent sandbox to continue" symptom, in case it helps others landing here — this is not the OP's Windows-Sandbox-can't-install scenario, but the surface error is identical.
Environment: Windows 11 Home, Codex desktop app, hit immediately after a recent app update.
Symptom chain:
Set up Agent sandbox to continue.Couldn't set up admin sandbox.Failed to resume chattoast reading:> failed to load configuration: legacy
profile = "full_access"config is no longer supported; use--profile full_accesswithfull_access.config.tomlinsteadActual root cause: after the update, the legacy top-level
profile = "..."key in~/.codex/config.toml(Windows:C:\Users\<you>\.codex\config.toml) is no longer supported. When that key is present, the entire config fails to parse, so Codex silently falls back to defaults that try to initialize the admin/Windows Sandbox — which can't be created on Windows Home — and you get stuck at the sandbox prompt. The sandbox message is a downstream symptom of the config not loading, not the underlying problem.Fix: remove the legacy
profile = "..."line and its[profiles.<name>]table, and promote the settings you care about to the top level. Mine went from:to:
Then fully quit Codex (end any lingering
codex.exein Task Manager) and relaunch. Config parses cleanly and the sandbox prompt disappears.(Alternatively, follow the message's own suggestion: move the profile into a separate
full_access.config.tomlselected via--profile full_access. For a single always-on setup, top-level keys are simpler.)Suggested product fix: a config-parse failure should surface a blocking, explicit error (or migrate the legacy
profile =key automatically) instead of silently degrading into an unrelated "set up sandbox" prompt — the current behavior sends people down the wrong debugging path.Yes, it is related to a configuration parsing failure. Codex returned to normal after I removed the following incompatible items from the configuration: