Windows Codex app fails to start: bundled codex.exe exists but cannot be executed due to access denied
What version of the Codex App are you using (From “About Codex” dialog)?
26.609.4994.0
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What issue are you seeing?
What issue are you seeing?
The Windows Codex app fails to start immediately after launch.
Initial error:
Codex failed to start.
Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
I installed Codex from the Microsoft Store, then tried app reset, uninstall/reinstall, and clearing CODEX_CLI_PATH. The issue still happens.
PowerShell shows that the Microsoft Store package is installed:
Get-AppxPackage *Codex* | Select-Object Name, PackageFullName, Version, InstallLocation
Result:
Name: OpenAI.Codex
PackageFullName: OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0
Version: 26.609.4994.0
InstallLocation: C:\Program Files\WindowsApps\OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0
I also checked the package contents:
$pkg = (Get-AppxPackage *Codex*).InstallLocation
Get-ChildItem $pkg -Recurse -ErrorAction SilentlyContinue | Where-Object { $_.Name -match "codex" } | Select-Object FullName, Length
The package contains:
app\Codex.exe
app\resources\codex-command-runner.exe
app\resources\codex.exe
app\resources\codex-notification.wav
app\resources\codex-windows-sandbox...
app\resources\plugins\...
However, running the bundled CLI directly fails:
& "$pkg\app\resources\codex.exe" --version
Result:
Failed to run 'codex.exe'. Access is denied.
CategoryInfo: ResourceUnavailable
FullyQualifiedErrorId: NativeCommandFailed
I also tried setting CODEX_CLI_PATH manually to the bundled codex.exe. After doing that, the error changed to:
Codex failed to start.
(code=126, signal=null).
Most recent error: /usr/bin/bash: line 1: /mnt/c/Program Files/WindowsApps/OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0/app/resources/codex...
Permission denied
This suggests the bundled CLI exists, but the app either cannot execute it due to WindowsApps permissions or is trying to launch it through WSL/bash incorrectly.
What steps can reproduce the bug?
What steps can reproduce the bug?
- Install Codex from the Microsoft Store on Windows.
- Launch the Codex app.
- The app immediately fails with:
Unable to locate the Codex CLI binary.
- Reset the app from Windows Settings.
- Uninstall and reinstall Codex from Microsoft Store.
- Launch the app again.
- The same error still appears.
Additional troubleshooting performed:
Get-ChildItem Env: | Where-Object { $_.Name -match "CODEX" }
No CODEX-related environment variables were set.
Then I cleared CODEX_CLI_PATH:
[Environment]::SetEnvironmentVariable("CODEX_CLI_PATH", $null, "User")
[Environment]::SetEnvironmentVariable("CODEX_CLI_PATH", $null, "Machine")
I confirmed that the package contains app\resources\codex.exe, but executing it directly gives Access denied.
When I manually set CODEX_CLI_PATH to the bundled codex.exe, the app tries to execute it through /usr/bin/bash and fails with Permission denied.
What is the expected behavior?
What is the expected behavior?
The Windows Codex app should start normally after installation from the Microsoft Store.
If the CLI binary is bundled inside the app package, Codex should locate and execute it automatically.
If the bundled CLI cannot be executed because of WindowsApps permissions, the app should either install the CLI in an executable location or provide a clear repair/reinstall instruction.
Additional information:
The error message says the app cannot locate the Codex CLI binary, but the Microsoft Store package does contain app\resources\codex.exe.
However, running that bundled codex.exe directly from PowerShell fails with Access denied.
It may be a Windows Store packaging, permissions, or path resolution issue. It may also be related to the app incorrectly trying to use WSL/bash to execute the WindowsApps packaged binary after CODEX_CLI_PATH is set manually.
Additional information
<img width="695" height="170" alt="Image" src="https://github.com/user-attachments/assets/5be7fdb7-d912-4f66-a9cb-f2f9390ffb7f" />
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗