Codex Windows App fails to start: bundled Codex CLI binary exists but cannot be executed
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.820.7780.0
What subscription do you have?
ChatGPT Pro
What platform is your computer?
Windows 11 Home China, OS Build 26200, 64-bit (x64)
What issue are you seeing?
The Codex Windows App fails to start with the following error:
ChatGPT failed to start.
Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
However, the Codex CLI binary is present inside the installed application package.
I located the following binaries:
C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\Codex.exe
C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe
I then manually set CODEX_CLI_PATH to the bundled CLI:
$env:CODEX_CLI_PATH="C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe"
When attempting to execute it:
& $env:CODEX_CLI_PATH --version
PowerShell returns:
程序“codex.exe”无法运行: 拒绝访问。
CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
FullyQualifiedErrorId : NativeCommandFailed
The Chinese error message means that codex.exe cannot be executed because access is denied.
Therefore, the bundled CLI binary appears to exist, but the Codex App cannot locate or execute it successfully.
What steps can reproduce the bug?
- Install or update the Codex Windows App to version
26.820.7780.0. - Launch the Codex App.
- The app fails to start and displays:
Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
- Open PowerShell and locate the bundled CLI:
$pkg = Get-AppxPackage OpenAI.Codex
Get-ChildItem $pkg.InstallLocation -Recurse -Filter "codex.exe" -ErrorAction SilentlyContinue | Select-Object FullName
- Observe that
app\resources\codex.exeexists. - Set
CODEX_CLI_PATHto that executable. - Run:
& $env:CODEX_CLI_PATH --version
- PowerShell returns an
Access deniederror and the executable cannot be launched.
I have not modified the permissions or ACLs under C:\Program Files\WindowsApps.
What is the expected behavior?
No response
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Windows app's CLI binary discovery and process launch using CODEX_CLI_PATH, the packaged app/resources/codex.exe path, and the Electron resources layout. Reproduce the failure with the supplied PowerShell command and AppX installation steps. Done when the installed app locates and successfully launches its bundled CLI without the access-denied failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, rust
- Domain
- build-system, cli, desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100