openai / openai/codex

Windows/MSIX Codex executable Access Denied bug

Open
#45,023 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug windows-os
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)?

OpenAI.Codex 26.908.4834.0

What subscription do you have?

basic

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Subject: ChatGPT Windows app fails to start – Unable to locate Codex CLI binary

The ChatGPT Windows desktop app fails to start and displays:

"ChatGPT failed to start.
Unable to locate the Codex CLI binary or required runtime components. Check the installation or explicit runtime overrides."

I have already reinstalled/updated the app, but the issue persists.

My installed package is:
OpenAI.Codex 26.908.4834.0

I also verified that ChatGPT.exe exists in the installed WindowsApps package.

I tested the bundled Codex executable directly from PowerShell. The file exists at the expected location, but Windows returns:

"Program 'codex.exe' failed to run: Access is denied"

I also had an initial local database error:
"ChatGPT cannot access its local database"
with:
C:\Users\shiva.codex\sqlite\codex-dev.db

I corrected the permissions on the .codex folder and confirmed that my normal Windows user account can create files inside C:\Users\shiva.codex\sqlite. However, the Codex executable still returns "Access is denied" and the ChatGPT app continues to fail at startup.

Please investigate the Windows/MSIX package or Codex runtime issue causing the bundled codex.exe to be inaccessible.

Windows PowerShell test:
Get-AppxPackage OpenAI.Codex
→ OpenAI.Codex_26.908.4834.0_x64__2p2nqsd0c76g0

The issue is reproducible every time I launch the ChatGPT Windows app.

What steps can reproduce the bug?
  1. Install/update the ChatGPT Windows desktop app through the Microsoft Store.
  2. Launch the ChatGPT app normally from Windows.
  3. The app fails to start and displays:
    "ChatGPT failed to start. Unable to locate the Codex CLI binary or required runtime components."
  4. The issue occurs every time the app is launched.
  5. The installed package is OpenAI.Codex version 26.908.4834.0.
  6. I verified that ChatGPT.exe and the bundled codex.exe are present in the WindowsApps installation directory.
  7. Running the bundled codex.exe directly from PowerShell results in:
    "Program 'codex.exe' failed to run: Access is denied."
What is the expected behavior?

The ChatGPT Windows desktop app should launch normally without displaying any errors. It should successfully locate and execute its bundled Codex CLI/runtime components, initialize its local database, and open the ChatGPT interface so I can use the app normally.

Additional information

The issue persists after reinstalling/updating the ChatGPT Windows app.

I confirmed that the ChatGPT executable and Codex CLI files are physically present in the installed OpenAI.Codex package. However, attempting to execute the bundled codex.exe directly from PowerShell returns "Access is denied."

The app initially also reported that it could not access its local SQLite database at:
C:\Users\shiva.codex\sqlite\codex-dev.db

I fixed the permissions on the .codex directory and verified that my normal Windows user can create files in the sqlite folder. The database-related error was therefore not caused by my user account being unable to write to the folder.

After that, the app still fails with:
"Unable to locate the Codex CLI binary or required runtime components."

Installed package:
OpenAI.Codex 26.908.4834.0

The problem is reproducible every time I launch the Windows desktop app.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the launch failure with the OpenAI.Codex_26.908.4834.0_x64__2p2nqsd0c76g package and the PowerShell test for codex.exe. Check the installed ChatGPT.exe and codex.exe paths alongside C:\Users\shiva.codex\sqlite\codex-dev.db. Done means the app locates and executes its bundled runtime, initializes the database, and opens normally.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, sqlite
Domain
databases, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.