Skip to content

Windows Codex app fails to start: bundled codex.exe exists but cannot be executed due to access denied #28031

Open

Description

@woo13241324-hub

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?

  1. Install Codex from the Microsoft Store on Windows.
  2. Launch the Codex app.
  3. The app immediately fails with:
Unable to locate the Codex CLI binary.
  1. Reset the app from Windows Settings.
  2. Uninstall and reinstall Codex from Microsoft Store.
  3. Launch the app again.
  4. 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

Image

Activity

  1. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    on Jun 13, 2026
  2. github-actions commented on Jun 13, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. LineKwon commented on Jun 16, 2026

    @LineKwon

    Adding another repro with a slightly different failure mode on the same Store package version.

    Environment

    • Codex Store package: OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0
    • Package version: 26.609.4994.0
    • Install location: C:\Program Files\WindowsApps\OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0
    • Windows x64

    Symptom

    Launching the Store app creates the process, then it exits before showing a usable window.

    Observed from direct launch of the Store app executable:

    ExitCode: -529697949
    Hex: 0xE06D7363
    MainWindowHandle: 0
    

    The desktop log reaches app-server startup, then stops:

    Launching app ... packaged=true platform=win32
    [windows-store-updater] Checking Windows Store for package updates buildVersion=26.609.4994.0 manifestBuildVersion=26.609.9530.0 packageIdentity=OpenAI.Codex
    Appshot hotkey inactive configured=true enabled=true platform=win32
    [AppServerConnection] Initializing app-server transport
    [AppServerConnection] Starting app-server connection hostId=local transport=stdio
    [AppServerConnection] app_server_connection.state_changed cause=start_process ... next=connecting ...
    

    It never reaches a successful stdio_transport_spawned / app-server handshake in the Store package case.

    Important local check

    The bundled app-server executable exists, but cannot be run directly from the WindowsApps package path:

    & "C:\Program Files\WindowsApps\OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0\app\resources\codex.exe" --version

    Result:

    Access is denied.
    

    I also tried setting CODEX_CLI_PATH to a runnable Codex CLI under %LOCALAPPDATA%\OpenAI\Codex\bin\...\codex.exe; the Store app still exited before completing the app-server startup.

    Control test that narrows this to WindowsApps/AppX packaging

    I copied the entire Store app app directory out of WindowsApps to a normal temporary directory and launched that copied Codex.exe.

    In that copied location:

    • resources\codex.exe --version runs successfully.
    • The app stays running.
    • A main window is created.
    • resources\codex.exe is spawned as a child process.
    • The app logs continue past app-server startup and show normal routed app-server responses.

    This strongly suggests the installed Store package is failing because the app needs to spawn app\resources\codex.exe from inside C:\Program Files\WindowsApps\..., but that packaged child executable is not executable from this context. The same bits work when placed outside WindowsApps.

    Workaround

    A manually downloaded standalone Codex build still works on the same machine. In this case, Codex-win-x64-26.602.30954 launches normally and its bundled resources\codex.exe --version reports:

    codex-cli 0.135.0-cometix
    

    So this appears specific to the Microsoft Store / WindowsApps packaging path for the newer 26.609.4994.0 build rather than the machine being unable to run Codex generally.

  4. a62977386 commented on Aug 26, 2026

    @a62977386

    Environment

    • Codex Desktop: 26.820.7780.0
    • Codex CLI workaround version: 0.149.1
    • Platform: Windows x64
    • Installation: Microsoft Store / MSIX

    Issue

    Codex Desktop was working normally before the update.

    I clicked the update button inside Codex. The update completed and the application restarted, but after restart Codex failed to start with:

    Unable to locate the Codex CLI binary.
    Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
    

    I have never enabled WSL mode.

    The bundled CLI does exist:

    C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe
    

    PowerShell confirms:

    Test-Path $cli

    Result:

    True
    

    However, executing the bundled CLI:

    & $cli --version

    fails with:

    程序“codex.exe”无法运行: 拒绝访问。
    CategoryInfo: ResourceUnavailable
    FullyQualifiedErrorId: NativeCommandFailed
    

    Workaround

    I installed the standalone Codex CLI using the official installer:

    powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

    This installed:

    C:\Users\<USER>\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe
    

    and:

    codex --version

    works correctly:

    codex-cli 0.149.1
    

    I then set:

    [Environment]::SetEnvironmentVariable(
        "CODEX_CLI_PATH",
        "C:\Users\<USER>\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe",
        "User"
    )

    After restarting Codex Desktop, the application works normally again.

    Observation

    This appears to be a regression in the Windows MSIX update/package permissions.

    The bundled app\resources\codex.exe is physically present, but Windows refuses to execute it from the WindowsApps package directory.

    The standalone CLI installed under the user profile executes normally, and explicitly pointing CODEX_CLI_PATH to it restores Codex Desktop.

    The issue appeared immediately after updating Codex Desktop to 26.820.7780.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions