Cannot login to Codex CLI using "Sign in with ChatGPT"

Resolved 💬 8 comments Opened Aug 12, 2025 by m061i6 Closed Aug 14, 2025
💡 Likely answer: A maintainer (theg1239, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.21.0

Which model were you using?

gpt-5

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

I can't sign in to ChatGPT via the codex CLI. When I press Enter, there's no response and the browser doesn't open the login page. My default browser is Brave.

Python 3.13.6 still not working

!Image

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

8 Comments

donghaozhang · 11 months ago

I have the same issue

DragonBaiMo · 11 months ago
_ Welcome to Codex, OpenAI's command-line coding agent
Sign in with ChatGPT to use Codex as part of your paid plan

or connect an API key for usage-based billing

1. Sign in with ChatGPT

Usage included with Plus, Pro, and Team plans

  1. Provide your own API key

Pay for what you use

Press Enter to continue

program not found

yanlin96 · 11 months ago

Same issue here

<img width="1082" height="412" alt="Image" src="https://github.com/user-attachments/assets/d17d1ba4-d76b-4e13-b366-577304254488" />

theg1239 contributor · 11 months ago

Same issue on codex login
program not found

theg1239 contributor · 11 months ago

The issue was identified in https://github.com/openai/codex/issues/2000#issuecomment-3172258040

Run where python to identify where the python executable is installed
Then run this with elevated cmd mklink "C:\Windows\System32\python3.exe" "C:\Path\To\Your\python.exe" and it should work

kevin-leeeeee · 11 months ago

same issue
using wsl instead can work

robBinlzX · 11 months ago
The issue was identified in #2000 (comment) Run where python to identify where the python executable is installed Then run this with elevated cmd mklink "C:\Windows\System32\python3.exe" "C:\Path\To\Your\python.exe" and it should work

this worked

m061i6 · 11 months ago
The issue was identified in #2000 (comment) Run where python to identify where the python executable is installed Then run this with elevated cmd mklink "C:\Windows\System32\python3.exe" "C:\Path\To\Your\python.exe" and it should work

It worked!
Codex CLI calls python3 when running, but on Windows, Python is installed as python by default without python3. As a result, the system can’t find the command and fails.
The solution is to create a python3 command that points to the existing python, so the CLI can run properly.

Codex CLI 在執行時會呼叫 python3,但 Windows 安裝 Python 預設只有 python 沒有 python3,所以系統找不到這個指令而出錯。
解法是建立一個 python3 指向現有的 python,讓 CLI 能正常運作。

<img width="959" height="282" alt="Image" src="https://github.com/user-attachments/assets/b4b2d6ec-1e05-4100-b1e4-fb26d42a011c" />