Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.1007.21434
What subscription do you have?
Plus
What platform is your computer?
Windows 10 Pro Version 10.0.19045 Build 19045
What issue are you seeing?
Problem description
Codex consistently fails to execute local commands through its unified execution tool.
Even a harmless command such as:
Get-Location
fails before PowerShell starts.
The error is:
Failed to create unified exec process:
CreateProcessAsUserW failed: 5 (Access is denied.)
The failure occurs when Codex attempts to create the subprocess, not during execution of the PowerShell command.
Expected behavior
Codex should successfully launch a permitted PowerShell process and execute Get-Location within the configured sandbox.
If the sandbox cannot initialize or an executable cannot be launched, the error should identify the failing component or prerequisite where possible.
Actual behavior
Codex attempts to launch:
C:\Users<USER>\AppData\Local\Microsoft\WindowsApps\pwsh.exe
Process creation fails with Windows error 5.
No PowerShell output is produced.
The reported launch details include:
env_u16_len=5293
si_flags=256
creation_flags=134743040
Reproduction steps
Open VS Code on Windows.
Start a new Codex conversation.
Use the configured Windows sandbox:
[windows]
sandbox = "unelevated"
Ask Codex to execute:
Get-Location
Observe that unified execution fails before the command runs.
This failure has been reproduced across multiple Codex conversations.
Control tests
The following commands execute successfully in the VS Code integrated PowerShell terminal:
Get-Location
whoami
They also execute successfully in standalone Windows PowerShell.
The exact WindowsApps PowerShell alias used by Codex was independently tested:
& "$env:LOCALAPPDATA\Microsoft\WindowsApps\pwsh.exe" -NoProfile -Command "Get-Location"
Result: PASS.
PowerShell 7 also resolves to an installed application:
C:\Program Files\WindowsApps
Microsoft.PowerShell_7.6.6.0_x64__8wekyb3d8bbwe
pwsh.exe
These results indicate that PowerShell itself works outside Codex's execution context.
Additional finding: Explicit executable selection
An attempt was made to direct Codex's execution tool to use:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
However, the recorded launch still selected:
C:\Users<USER>\AppData\Local\Microsoft\WindowsApps\pwsh.exe
Therefore, the alternate executable was not actually tested.
This may indicate a separate executable-selection or shell-parameter handling issue.
Sandbox diagnostics
The configured Windows sandbox is:
[windows]
sandbox = "unelevated"
The active session reports:
workspace-write
However, the available runtime information does not independently confirm which Windows sandbox backend was used for the failed process.
An existing sandbox setup diagnostic reports:
helper_firewall_policy_ineffective
local firewall policy modifications do not
apply to every current profile
LocalPolicyModifyState result=HRESULT(0x00000001)
This warning was recorded before the current failures.
No causal relationship between the firewall warning and the process-creation failure has been established.
Diagnostic timeline
All times are America/New_York.
Date/time Event
September 13, 12:39:12 Earliest retained firewall setup warning
October 7, 01:08:59 Firewall setup warning repeated
October 7, 01:14:43 Earliest retained CreateProcessAsUserW failure
October 7–10 Some Codex filesystem-helper launches succeeded
October 11, 10:13:57 Current sandbox log records launch attempt
October 11, 11:20:28 Unified execution error recorded
October 11, 11:25:54 Alternate executable attempt also fails
Relevant diagnostic records
The local Codex diagnostic database contains:
3212
144144
144688
The latter two records correspond to the October 11 diagnostic attempts.
Relevant local files include:
%USERPROFILE%.codex\config.toml
%USERPROFILE%.codex.sandbox
sandbox.2026-10-11.log
%USERPROFILE%.codex.sandbox
setup_error.json
%USERPROFILE%.codex\logs_2.sqlite
These files have not been attached to this report.
Requested investigation
Please investigate:
Which Windows sandbox backend was actually selected for the failing unified execution attempts?
Which process token was passed to CreateProcessAsUserW?
Which access check or Windows object caused error 5?
Why was the requested Windows PowerShell executable not honored?
Is this a known compatibility issue involving the unelevated sandbox backend and WindowsApps PowerShell?
Is there a supported diagnostic or configuration correction that does not require disabling Windows security protections?
Safety and troubleshooting history
No Windows security settings were disabled.
No privilege elevation was attempted.
No Roblox processes were terminated.
No project source files were modified during these diagnostics.
Repeated execution attempts have been paused pending further guidance.
What steps can reproduce the bug?
Ask Codex to execute:
Get-Location
Observe that unified execution fails before the command runs.
This failure has been reproduced across multiple Codex conversations.
Control tests
The following commands execute successfully in the VS Code integrated PowerShell terminal:
Get-Location
whoami
What is the expected behavior?
No response
Additional information
Environment
Component Details
Operating system Windows 10
Development environment VS Code with Codex
Workspace Local Roblox development project
Configured sandbox backend unelevated
Effective sandbox backend Unverified
Workspace policy workspace-write
Network Restricted
Approval handling auto_review for sandbox escalations
PowerShell 7 7.6.6
Windows PowerShell Available and working
Roblox Studio MCP Connected and responding
Codex extension version: 26.1007.21434
Windows build number: Version 10.0.19045 Build 19045
Additional investigation identified that Codex selects the Microsoft Store-packaged PowerShell 7 executable through the WindowsApps pwsh.exe alias.
The alias works correctly from a normal VS Code PowerShell terminal, but Codex's unified execution fails with CreateProcessAsUserW error 5.
A previous attempt to specify the Windows PowerShell executable through the execution tool still resulted in Codex selecting pwsh.exe, so the alternate executable has not actually been tested.
Could maintainers confirm whether the unelevated Windows sandbox backend has known compatibility issues with Microsoft Store-packaged PowerShell, and whether there is a supported method to select a different shell for diagnostic purposes?
Activity
github-actions commentedon Oct 11, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Sempai-Dami1 commentedon Oct 18, 2026
Using the new ChatGPT desktop app with the Codex Tab works fine. VS Code not needed as the middle man. Added permissions to the local project folder and Codex is able to work using MCP or StreamLit tools/skills.