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_

View original on GitHub ↗

29 Comments

SinkHoleLabs · 11 months ago

It appears to only be downloading the version.json and the codex-tui.log

bolinfest collaborator · 11 months ago

I am running Node v20.15.1, python 3.10, and Windows 10 and this worked for me.

It appears to only be downloading the version.json and the codex-tui.log

What do you mean by that? Do you have python3 installed? If so, what does python3 --version say?

SinkHoleLabs · 11 months ago

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 logout and 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.

Pavliczech · 11 months ago

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.

brian95827 · 11 months ago

same problem

<img width="750" height="368" alt="Image" src="https://github.com/user-attachments/assets/42098942-0c54-430b-8f29-2a120c519985" />

danieldanila96 · 11 months ago

same problem here

<img width="990" height="516" alt="Image" src="https://github.com/user-attachments/assets/5dd9c205-50ad-4c9a-93c7-cf0c45e27c3a" />

QaiserMajeed · 11 months ago

<img width="1372" height="759" alt="Image" src="https://github.com/user-attachments/assets/39f7f0a5-a26a-42e5-ad74-ad8a3d30b45e" />

michaelcheng0407 · 11 months ago

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" />

Wasauchimmer01 · 11 months ago

How to resolve this issue.
<img width="952" height="427" alt="Image" src="https://github.com/user-attachments/assets/1a8f5778-c3f5-4fb2-ba24-504d7fe1d82c" />

kieradev · 11 months ago

@Wasauchimmer01 @michaelcheng0407 @QaiserMajeed @danieldanila96 @brian95827 @SinkHoleLabs temporary fix whilst they fix it:
Run
npm i @openai/codex@0.19.0
to download the previous version

And then
npx codex

That worked for me

<img width="1066" height="193" alt="Image" src="https://github.com/user-attachments/assets/6cd9c5bd-b2ee-4ebc-9ee4-9562123fff14" />

Wasauchimmer01 · 11 months ago
@Wasauchimmer01 @michaelcheng0407 @QaiserMajeed @danieldanila96 @brian95827 @SinkHoleLabs temporary fix whilst they fix it: Run npm i @openai/codex@0.19.0 to download the previous version And then npx codex That worked for me <img alt="Image" width="1066" height="193" src="https://private-user-images.githubusercontent.com/49366907/476276606-6cd9c5bd-b2ee-4ebc-9ee4-9562123fff14.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTQ3NDY0MTIsIm5iZiI6MTc1NDc0NjExMiwicGF0aCI6Ii80OTM2NjkwNy80NzYyNzY2MDYtNmNkOWM1YmQtYjJlZS00ZWJjLTllZTQtOTU2MjEyM2ZmZjE0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwODA5VDEzMjgzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU5ZGJiNGNjNTg0MDA1ZmMzMjAwMTMwNDY4Nzk3MTI2OTNlNWUxOTAyMDE1ODU4Y2VlNjhlOWQ3ODQxNTQyZGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.S6_oKUPxMgI0wEDgNfB8QrFLziQoUu1zSh4mqUXi42E">

in 0.19.0 codex cli asking API key it not fixed yet.

SinkHoleLabs · 11 months ago

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'

n00mkrad · 11 months ago

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..."

VincentPestana · 11 months ago

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"

  • For reference, I have python and python3 installed through the web installers.
  • Windows 10
  • codex --version = codex-cli 0.20.0
raulblanko · 11 months ago

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" />

insane66613 · 11 months ago

Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe

SinkHoleLabs · 11 months ago
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!

raulblanko · 11 months ago
Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe

Thanks a lot! It works.

kirtspaulding · 11 months ago
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 for me too

Pinkaru · 11 months ago
Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe

Thank you! it works.

Wasauchimmer01 · 11 months ago

@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.

Pinkaru · 11 months ago
@bolinfest @pakrym-oai [@tompakeman-oai] 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.

michaelcheng0407 · 11 months ago

make sure python is installed and you can access python3 command 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.

hwasiti · 11 months ago

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!

JonZavialov · 11 months ago
Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe

Thanks!

hs9021401 · 11 months ago
Just go to the directory that you have python installed, copy python.exe and paste it into the same folder renamed to python3.exe

It works. Thank you.

MovGP0 · 11 months ago

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.

Tiloran · 11 months ago

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.

bolinfest collaborator · 11 months ago

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