Windows limited-access mode attempts unavailable sandbox and fails with CreateProcessAsUserW error
What version of the Codex App are you using (From “About Codex” dialog)?
26.727.6591.0
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Windows 11 Pro, x64 Windows build 26200 PowerShell 7.6.4
What issue are you seeing?
After Windows-native setup failed, I selected "Continue with limited access."
An existing Codex chat was then able to perform a read-only task, but it first attempted to launch the unavailable Windows sandbox and failed with:
CreateProcessAsUserW failed: 5 (Access is denied.)
Codex then retried the operation outside that sandbox and completed successfully.
Limited-access mode apparently knows that the full sandbox is unavailable, but still attempts to use it before falling back. This creates unnecessary failures, latency, confusing diagnostics, and uncertainty about which permission model actually executed the command.
What steps can reproduce the bug?
- Configure the Agent environment as Windows native.
- Allow the Windows-native setup process to fail with:
Windows setup didn't finish
- Select:
Continue with limited access
- Open an existing local Codex chat.
- Submit a read-only task such as:
Report the current working directory and shell, verify that two folders are readable, and read the title from a Markdown file. Do not modify anything.
- Observe that the first sandbox launch fails with:
CreateProcessAsUserW failed: 5 (Access is denied.)
- Observe that Codex retries the task and completes it successfully.
What is the expected behavior?
When the user selects limited-access mode, Codex should directly use the supported limited-access execution path.
It should not first attempt a sandbox configuration that the application already knows was not installed successfully.
Codex should also state clearly:
- which security restrictions apply in limited-access mode
- whether commands run under the user's normal Windows account
- whether filesystem writes require approval
- what isolation is unavailable
- whether each command ran sandboxed or through fallback execution
A failed sandbox attempt should not occur on every task.
Additional information
The recovery test ultimately succeeded and returned:
Current working directory:
D:\Projects\EOE
Active shell:
PowerShell 7.6.4
D:\Projects\EOE readable:
Yes
D:\Projects\PFOS readable:
Yes
Markdown title:
PFOS Governance TODO
The only reported error was:
Initial sandbox launch failed with CreateProcessAsUserW failed: 5 (Access is denied.). Read-only retry succeeded.
This indicates that the project and chat were healthy. The failure was specific to Codex's Windows-native sandbox initialization.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action