What version of the Codex App are you using (From “About Codex” dialog)?
Windows Codex Desktop fails to start: "Unable to locate the Codex CLI binary" even though codex.exe is installed and accessible
What subscription do you have?
After launching the Codex Desktop application, it immediately fails with: "ChatGPT failed to start. Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex."
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Title:
I encountered the same issue: Windows Codex Desktop fails to start with "Unable to locate the Codex CLI binary"
Description:
I encountered the same issue on Windows and would like to provide additional diagnostic information and a workaround.
After launching Codex Desktop, the application fails immediately with:
"ChatGPT failed to start.
Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex."
Environment:
- OS: Windows 11 x64
- Application package: OpenAI.Codex
- Version: 26.820.7780.0
Investigation:
I verified that the Codex CLI installation itself is working correctly.
Standalone Codex CLI path:
C:\Users\lenovo\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe
Running:
codex --version
returns:
codex-cli 0.149.1
I configured the environment variable:
CODEX_CLI_PATH
with:
C:\Users\lenovo\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe
The environment variable is correctly stored and the executable can be launched successfully.
Additional findings:
The installed Windows package contains:
app\resources\codex.exe
but does not contain:
app\resources\bin\codex
The application error message suggests it expects:
resources/bin/codex
but the installed package appears to provide:
resources/codex.exe
I also tested the bundled executable:
app\resources\codex.exe
but executing it directly results in:
ResourceUnavailable
NativeCommandFailed
Access denied
Workaround:
The issue can be temporarily bypassed by installing the standalone Codex CLI and setting:
CODEX_CLI_PATH
to the native executable:
C:\Users\lenovo\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe
After restarting the Windows session and launching Codex Desktop again, the application can locate the CLI successfully.
Expected behavior:
Codex Desktop should either:
- Correctly locate the bundled CLI binary automatically.
or
- Correctly respect CODEX_CLI_PATH during startup.
Possible root cause:
The Windows Electron/MSIX package or startup logic may have a mismatch between the expected CLI location:
resources/bin/codex
and the actual packaged file:
resources/codex.exe
Suggested fixes:
- Ensure the Windows package includes the expected resources/bin/codex binary.
- Fix the startup path resolution logic.
- Ensure CODEX_CLI_PATH is consistently respected on Windows.
- Provide a clearer error message or repair guidance when the bundled binary cannot be executed.
Thank you for investigating this Windows issue.
What steps can reproduce the bug?
Possible root cause:
The Windows Electron/MSIX package or startup logic may have a mismatch between the expected CLI location:
resources/bin/codex
and the actual packaged file:
resources/codex.exe
Suggested fixes:
- Ensure the Windows package includes the expected resources/bin/codex binary.
- Fix the startup path resolution logic.
- Ensure CODEX_CLI_PATH is consistently respected on Windows.
- Provide a clearer error message or repair guidance when the bundled binary cannot be executed.
Thank you for investigating this Windows issue.
What is the expected behavior?
Expected behavior:
Codex Desktop should either:
- Correctly locate the bundled CLI binary automatically.
or
- Correctly respect CODEX_CLI_PATH during startup.
Additional information
No response
What version of the Codex App are you using (From “About Codex” dialog)?
Windows Codex Desktop fails to start: "Unable to locate the Codex CLI binary" even though codex.exe is installed and accessible
What subscription do you have?
After launching the Codex Desktop application, it immediately fails with: "ChatGPT failed to start. Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex."
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Title:
I encountered the same issue: Windows Codex Desktop fails to start with "Unable to locate the Codex CLI binary"
Description:
I encountered the same issue on Windows and would like to provide additional diagnostic information and a workaround.
After launching Codex Desktop, the application fails immediately with:
"ChatGPT failed to start.
Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex."
Environment:
Investigation:
I verified that the Codex CLI installation itself is working correctly.
Standalone Codex CLI path:
C:\Users\lenovo\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe
Running:
codex --version
returns:
codex-cli 0.149.1
I configured the environment variable:
CODEX_CLI_PATH
with:
C:\Users\lenovo\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe
The environment variable is correctly stored and the executable can be launched successfully.
Additional findings:
The installed Windows package contains:
app\resources\codex.exe
but does not contain:
app\resources\bin\codex
The application error message suggests it expects:
resources/bin/codex
but the installed package appears to provide:
resources/codex.exe
I also tested the bundled executable:
app\resources\codex.exe
but executing it directly results in:
ResourceUnavailable
NativeCommandFailed
Access denied
Workaround:
The issue can be temporarily bypassed by installing the standalone Codex CLI and setting:
CODEX_CLI_PATH
to the native executable:
C:\Users\lenovo\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe
After restarting the Windows session and launching Codex Desktop again, the application can locate the CLI successfully.
Expected behavior:
Codex Desktop should either:
or
Possible root cause:
The Windows Electron/MSIX package or startup logic may have a mismatch between the expected CLI location:
resources/bin/codex
and the actual packaged file:
resources/codex.exe
Suggested fixes:
Thank you for investigating this Windows issue.
What steps can reproduce the bug?
Possible root cause:
The Windows Electron/MSIX package or startup logic may have a mismatch between the expected CLI location:
resources/bin/codex
and the actual packaged file:
resources/codex.exe
Suggested fixes:
Thank you for investigating this Windows issue.
What is the expected behavior?
Expected behavior:
Codex Desktop should either:
or
Additional information
No response