Skip to content

[Windows 26.820] Codex Desktop cannot start: bundled codex.exe relocation from WindowsApps fails #40700

Description

@bevis7781

What version of the Codex App are you using (From “About Codex” dialog)?

26.820.7780.0 (from Get-AppxPackage; the app cannot start to open the About Codex dialog)

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

After updating Codex Desktop to version 26.820.7780.0, the app can no longer start.

The startup dialog reports:

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

However, the bundled Windows CLI is present at:

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

The startup logs show that the actual failure occurs earlier, while Codex attempts to relocate the bundled Windows executable from the WindowsApps package into the per-user runtime directory.

Relevant log fields:

bundled_executable_relocation_failed
operation=copy_file
executableName=codex.exe
failedExecutableName=codex.exe
sourceKind=windowsapps

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

destinationPath:
C:\Users<user>\AppData\Local\OpenAI\Codex\bin.staging-...\codex.exe

originalError:
errno=-4094
code=UNKNOWN
syscall=copyfile

Immediately afterwards, AppServerConnection fails with:

Unable to locate the Codex CLI binary.

The bundled files:

app\resources\codex.exe
app\resources\codex

both report the Windows file attributes:

Archive, Encrypted

A manual copy test of the bundled codex file from WindowsApps to a normal temporary directory also fails with:

The specified file could not be encrypted.

During the same startup sequence, Codex also fails to relocate the bundled cua_node runtime using copy_directory.

The app worked before the update and stopped starting immediately after updating to 26.820.7780.0.

What steps can reproduce the bug?

  1. Update/install Codex Desktop from the Microsoft Store to version 26.820.7780.0 on this Windows x64 machine.

  2. Launch Codex Desktop.

  3. The app attempts to relocate the bundled codex.exe from the WindowsApps package into:
    %LOCALAPPDATA%\OpenAI\Codex\bin\

  4. The relocation fails during copy_file.

  5. Codex then displays:
    "Unable to locate the Codex CLI binary."

Potentially relevant AppX environment details:

Get-AppxDefaultVolume reports:

D:\WindowsApps

Get-AppxPackage OpenAI.Codex reports:

Version:
26.820.7780.0

InstallLocation:
C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0

A directory for the same Codex package/version is visible under both:

C:\Program Files\WindowsApps
D:\WindowsApps\

I have not modified WindowsApps permissions, ownership, ACLs, package files, encryption settings, Codex configuration, or CODEX_CLI_PATH.

What is the expected behavior?

Codex Desktop should successfully locate or relocate the bundled Windows Codex CLI and start normally.

If WindowsApps / Application Protected / encrypted package resources cannot be copied to the per-user runtime directory using the current copy mechanism, Codex should use a Windows-compatible relocation method and surface the underlying Windows error instead of reporting that the CLI is missing.

Additional information

This appears related to existing Windows bundled-runtime relocation issues, but the impact in this case is more severe: the Windows-native codex.exe relocation failure prevents the entire Codex Desktop app from starting.

Potentially related issues:

#25571 - WindowsApps package on a non-system AppX volume / protected bundled executable relocation failures
#38696 - encrypted bundled Codex relocation failure in the WSL path
#34764 - Application Protected cua_node relocation failure

The same startup sequence on this machine shows both codex.exe copy_file relocation failures and cua_node copy_directory relocation failures.

The "Check for Updates" button in the startup error dialog still works and currently reports:

ChatGPT is up to date.

No workaround or local modification has been applied after reproducing the issue, so the failing installation state is currently preserved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething 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