What version of Codex is running?
codex-cli 0.146.0
Platform
- Windows 11 Home
- Version/build:
10.0.26200 / 26200
- Architecture: ARM64
- PowerShell: Store-packaged PowerShell 7.6.4 ARM64
- PowerShell path:
C:\Program Files\WindowsApps\Microsoft.PowerShell_7.6.4.0_arm64__8wekyb3d8bbwe\pwsh.exe
Configuration
approvals_reviewer = "auto_review"
[windows]
sandbox = "elevated"
[projects.'c:\users\<USER>']
trust_level = "trusted"
Issue
Every ordinary sandboxed shell command fails before PowerShell starts, including a harmless identity check:
Write-Output "sandbox-launch-ok"
whoami
The tool reports:
windows sandbox: runner failed during SpawnChild:
CreateProcessAsUserW failed: 5 (Access denied)
Running the same command through approved external execution succeeds. The external process runs under the normal user at medium integrity (S-1-16-8192).
Relevant sanitized sandbox log
Sandbox setup itself reports success and the copied command runner is resolved:
setup refresh: processed 31 write roots (read roots delegated); errors=[]
codex-windows-sandbox-setup.exe] setup binary completed
helper copy: reused command-runner source=C:\Users\<USER>\AppData\Local\Programs\OpenAI\Codex\bin\codex-command-runner.exe destination=C:\Users\<USER>\.codex\.sandbox-bin\codex-command-runner-0.146.0.exe
helper launch resolution: using copied command-runner path C:\Users\<USER>\.codex\.sandbox-bin\codex-command-runner-0.146.0.exe
codex-command-runner-0.146.0.exe] hide users: failed to hide current user profile dir (C:\Users\Default): SetFileAttributesW failed for C:\Users\Default: 5 (Access denied)
Immediately after that, the client reports CreateProcessAsUserW failed: 5. The sandbox log itself ends at the SetFileAttributesW line and does not record the subsequent process-creation error.
Reproduction
- Configure
[windows] sandbox = "elevated".
- Fully restart Codex.
- Run any trivial shell command in the sandbox, such as
whoami or Write-Output "test".
- Observe
CreateProcessAsUserW failed: 5 before PowerShell executes.
- Approve external execution of the same command; it succeeds.
Additional context
Expected behavior
A trivial PowerShell command should run through the elevated sandbox, or the runner should return a more actionable diagnosis identifying the denied object or missing right.
What version of Codex is running?
codex-cli 0.146.0Platform
10.0.26200/26200C:\Program Files\WindowsApps\Microsoft.PowerShell_7.6.4.0_arm64__8wekyb3d8bbwe\pwsh.exeConfiguration
Issue
Every ordinary sandboxed shell command fails before PowerShell starts, including a harmless identity check:
The tool reports:
Running the same command through approved external execution succeeds. The external process runs under the normal user at medium integrity (
S-1-16-8192).Relevant sanitized sandbox log
Sandbox setup itself reports success and the copied command runner is resolved:
Immediately after that, the client reports
CreateProcessAsUserW failed: 5. The sandbox log itself ends at theSetFileAttributesWline and does not record the subsequent process-creation error.Reproduction
[windows] sandbox = "elevated".whoamiorWrite-Output "test".CreateProcessAsUserW failed: 5before PowerShell executes.Additional context
codex-command-runner-0.146.0.exeexists and is selected.C:\Users\Default.Expected behavior
A trivial PowerShell command should run through the elevated sandbox, or the runner should return a more actionable diagnosis identifying the denied object or missing right.