login_with_chatgpt subprocess failed on windows login with web

Resolved 💬 12 comments Opened Aug 9, 2025 by jovicdev97 Closed Aug 20, 2025
💡 Likely answer: A maintainer (ae-openai, contributor) 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?

-

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

1: npm install -g @openai/codex
2: open codex
3: login with account (not api key)

What is the expected behavior?

Opening the default Win Browser

What do you see instead?

Terminal Output:
login_with_chatgpt subprocess failed

Additional information

Seems like to open an browser in an emulated Linux Enviroment

pip install --upgrade openai codex-cli does not help

View original on GitHub ↗

12 Comments

LuciferMornens · 11 months ago

You want to use WSL for this, obviously. Pretty sure it says windows not support.

If you are using WSL - then make sure you have the browser in the PATH. A friend of mine had the same issue.

KamelOtmani · 11 months ago

Encountering a similar issue with windows returns Error logging in: program not found

> codex --version
codex-cli 0.20.0

@LuciferMornens well there is a windows exe in the latest release 🤷‍♂️

MercyMeow · 11 months ago

Workaround that worked for me

If you’re running into this issue, try the following steps:

  1. Install version @openai/codex@0.16.0

``bash
npm install @openai/codex@0.16.0
``

  1. Log in with your account

``bash
codex
``

  1. Upgrade back to the latest version

``bash
npm install @openai/codex@latest
``

This isn’t a permanent fix, but it got things working for me earlier today.

juferdinand · 11 months ago

Workaround works for me. Thank you

Lutra-Fs · 11 months ago
Workaround that worked for me If you’re running into this issue, try the following steps: 1. Install version @openai/codex@0.16.0 npm install @openai/codex@0.16.0 2. Log in with your account codex 3. Upgrade back to the latest version npm install @openai/codex@latest This isn’t a permanent fix, but it got things working for me earlier today.

After doing this, my session shows:

👤 Account
 • Signed in with ChatGPT
 • Login:
 • Using API key. Run `codex login` to use ChatGPT plan

So if using the step listed in this reply, it might use API instead of the plan, is anyone using this meet this issue?

chubibyy · 11 months ago

Still having the issue 'login_with_chatgpt subprocess failed'

another-ai · 11 months ago

Same problem Error logging in: login_with_chatgpt subprocess failed:
SOLVED: In the Python installation directory, copy python.exe, paste it in the same directory, and rename the copy to python3.exe

masterbraintesting · 11 months ago

Same problem here!

dahi7470 · 11 months ago
Same problem Error logging in: login_with_chatgpt subprocess failed: SOLVED: In the Python installation directory, copy python.exe, paste it in the same directory, and rename the copy to python3.exe

It's the best. It's been solved in a ridiculous and surprising way.

sdudnic-ingerop · 11 months ago

what a shame openAI, the login does not work....

<img width="1015" height="443" alt="Image" src="https://github.com/user-attachments/assets/2ecc7718-8486-4731-ab4f-5af2b4257a7c" />

0.16.0 works "better":

<img width="1179" height="493" alt="Image" src="https://github.com/user-attachments/assets/de267f21-dd64-4423-91b4-0f188da2c885" />

however i maked it work switching back to latest codex version in npm

npm install -g @openai/codex

sdudnic-ingerop · 11 months ago

the tool is useles for Windows

<img width="753" height="789" alt="Image" src="https://github.com/user-attachments/assets/6b76100a-3a87-48c3-8243-5a5c09b54099" />

ae-openai contributor · 11 months ago

We fixed this—python no longer required