Program Not Found - Windows
Resolved 💬 29 comments Opened Aug 9, 2025 by SinkHoleLabs Closed Aug 19, 2025
💡 Likely answer: A maintainer (bolinfest, collaborator)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.20.0
Which model were you using?
Any
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What steps can reproduce the bug?
Fresh install with npm install g -g @openai/codex results in a program not found error on initiation.
Attempted uninstall and reinstall as well as uninstall, clear npm cache, then reinstall
<img width="716" height="390" alt="Image" src="https://github.com/user-attachments/assets/448aafc2-1e90-464b-9e44-a97b6b25b7f4" />
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
29 Comments
It appears to only be downloading the version.json and the codex-tui.log
I am running Node v20.15.1, python 3.10, and Windows 10 and this worked for me.
What do you mean by that? Do you have
python3installed? If so, what doespython3 --versionsay?I am running Python 3.13.6.
After install when I look in the .codex folder there is only the version.json and the log folder with the codex-tui.log.
After some more poking around it looks like the login function specifically isn't working. I can call other functions like
codex logoutand get a message that I am not logged in as well as help and debug.Just typing in 'codex' launches to the selection between sign-in and API but selecting sign-in generates a program not found error.
I have the same problem, it also says that the program was not found, even though I have it installed on Windows.
Python 3.10.9
Node v23.10.
same problem
<img width="750" height="368" alt="Image" src="https://github.com/user-attachments/assets/42098942-0c54-430b-8f29-2a120c519985" />
same problem here
<img width="990" height="516" alt="Image" src="https://github.com/user-attachments/assets/5dd9c205-50ad-4c9a-93c7-cf0c45e27c3a" />
<img width="1372" height="759" alt="Image" src="https://github.com/user-attachments/assets/39f7f0a5-a26a-42e5-ad74-ad8a3d30b45e" />
I think similar issue
Node v24.5.0
codex-cli 0.20.0
Python installed on conda env
<img width="1171" height="333" alt="Image" src="https://github.com/user-attachments/assets/e1140cc0-7034-48b0-a510-18d07ec36fc1" />
How to resolve this issue.
<img width="952" height="427" alt="Image" src="https://github.com/user-attachments/assets/1a8f5778-c3f5-4fb2-ba24-504d7fe1d82c" />
@Wasauchimmer01 @michaelcheng0407 @QaiserMajeed @danieldanila96 @brian95827 @SinkHoleLabs temporary fix whilst they fix it:
Run
npm i @openai/codex@0.19.0to download the previous version
And then
npx codexThat worked for me
<img width="1066" height="193" alt="Image" src="https://github.com/user-attachments/assets/6cd9c5bd-b2ee-4ebc-9ee4-9562123fff14" />
in 0.19.0 codex cli asking API key it not fixed yet.
There is a workaround that worked for me in #2075
Edit: Scratch that - This workaround gets codex up and running but only on API. Still getting 'Error logging in: program not found'
Same issue.
Says python not found, even though python.exe is in PATH. I noticed that the app execution aliases were enabled, but disabling them just changed the message to "program not found" instead of "Python not found..."
I've fixed by installing "Python 3.13" from the Microsoft store. Figured out by running "python3" in a cmd/powershell, while switching toggle for Python in "App execution aliases".
Looks like there might some dependency on python3 being installed from MS store - This installs Python in "C:\Program Files\WindowsApps"
same "Python was not found" issue:
<img width="1002" height="598" alt="Image" src="https://github.com/user-attachments/assets/810756fa-2458-485d-9f02-d3609207c900" />
Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe
This worked! Thank you!
Thanks a lot! It works.
this worked for me too
Thank you! it works.
@bolinfest @pakrym-oai @tompakeman-oai
<img width="1096" height="796" alt="Image" src="https://github.com/user-attachments/assets/55ec40df-b51f-4025-9937-4a120be085ad" />
i am still facing this issue. i am using windows 10. i already try codex 0.19.0 and it asking API access . not required when you are plus account.
how i can fix this.
<img width="576" height="174" alt="Image" src="https://github.com/user-attachments/assets/f010ad54-a61a-4d01-9f14-0876156a66e0" />
Check the location of your python program
<img width="750" height="561" alt="Image" src="https://github.com/user-attachments/assets/2e754610-7fba-450d-9183-9cc104869bd3" />
If you don't have python3.exe, copy python.exe and create a copy as python3.exe.
make sure python is installed and you can access
python3command in cmd terminal, you may require to put python directory into the PATH environment variable. GTP 5 will easily help you getting this done. Just copy a link to this issue and ask GPT to help.I dont know why we need a python dependency now. I thought it is build on node/rust.
I was fiddling with this for a couple of hours. This what worked for me:
Path variables of user and system environment variables are too long. I needed some PS scripts to dedupe what is duplicated and remove older application version paths. Ask chatgpt to do this PowerShell for you to automate it. It asked me to run a script that saved them into a csv file. Then it wrote me a PS script to clean/backup them. This was a long standing issue in my ~15 years old system that I kept upgrading windows without a clean installation.
Then I had to turn off all Microsoft Store app's python, IDLE, PIP from 'Manage App execution alias' and install Python3.13 from Python.org (make sure to check Add to path in env. variable).
Then I had to copy python.exe to a new file named python3.exe: https://github.com/openai/codex/issues/2057#issuecomment-3173704244
Only then it worked. Thanks for everybody here!
Thanks!
It works. Thank you.
I think the real problem is that there is a dependency on Python at all.
Ideally, the Codex CLI can work independently and Python should be only optional for executing Python scripts, rather than a hard dependency of the CLI.
How I Fixed the Codex CLI "program not found" Login Issue on Windows
When trying to log in to the Codex CLI on Windows (via option 1. Sign in with ChatGPT), I kept getting:
program not found
This happened after pressing Enter to continue, which prevented the OAuth login flow from opening in the browser.
Root Cause
The CLI attempts to open a browser automatically for OAuth login. On Windows, this is done via a platform-specific command. In my case, the Windows build failed to run the correct command, so the process aborted with program not found before I could log in.
Solution: Copying the Auth Token from Another Machine
Since the CLI just stores an auth token locally, you can authenticate on any machine where the login works, then copy the token file over.
Steps:
Install Codex CLI on another machine (macOS, Linux, or Windows where login works).
Run:
codex
Choose 1. Sign in with ChatGPT and complete the login in your browser.
After login, the CLI will save an auth file here:
%USERPROFILE%\.codex\auth.json (Windows)
~/.codex/auth.json (macOS/Linux)
Copy that auth.json file to the problem Windows machine into:
%USERPROFILE%\.codex\
Create the folder if it doesn’t exist.
On the Windows machine, run:
codex
It should now work without asking for login.
If you are getting "program not found" because of the Python issue, update to 0.22.0 or later, as we rewrote the Python in Rust:
https://github.com/openai/codex/releases/tag/rust-v0.22.0
If you are having problems because you are trying to connect to a container or some sort of "headless" machine from Windows, see:
https://github.com/openai/codex?tab=readme-ov-file#connecting-on-a-headless-machine