codex login not working on Windows OS

Resolved 💬 7 comments Opened Jul 2, 2025 by bares43 Closed Aug 12, 2025
💡 Likely answer: A maintainer (seratch, member) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.2.0

Which model were you using?

_No response_

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

  • I'm on Windows, WSL Ubuntu
  • I installed codex using brew
  • Then codex login

What is the expected behavior?

Login to Codex

What do you see instead?

  File "<string>", line 20
SyntaxError: future feature annotations is not defined
Error logging in: login_with_chatgpt subprocess failed:

Additional information

_No response_

View original on GitHub ↗

7 Comments

SuperstrongBE · 1 year ago

Same for me on mac os Sequoia 15.1.1 (24B91)

  • Installed straigth from homebrew
❯ codex login
Starting local login server on http://localhost:1455
If your browser did not open, navigate to this URL to authenticate:
https://auth.openai.com/oauth/authorize?....
Error logging in: login_with_chatgpt subprocess failed:

Web page throw a 500
!Image

SuperstrongBE · 1 year ago

@bares43
Did you try the NPM version instead of homebrew ?
Working for me
#1099

hamza-cskn · 1 year ago

@SuperstrongBE I tried both. None of them worked.

m407 · 1 year ago

Same for me. Npm uses rust version of codex under the hood. So getting binary does not solve the issue.
I'm on Linux.

atomashevic · 11 months ago

I had SyntaxError: future feature annotations is not defined issue because of Python 3.6.8. When I switched to any version more recent than Python 3.7.x this issue was resolved and I was able to login.

seratch member · 11 months ago

Since this issue is old, let us close this. For common causes of authentication failures, please refer to:

angeloc-dl · 11 months ago
Since this issue is old, let us close this. For common causes of authentication failures, please refer to: [[Windows] Sign in with ChatGPT still generates & requires an API key (Pro user) → API charges; revoking key breaks CLI #2000](https://github.com/openai/codex/issues/2000) [urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate #2044](https://github.com/openai/codex/issues/2044)

I have exactly this problem still present.
Even if Python standard release is installed and in the path, I had to manually add a symlink for the non-existing python3.exe codex was looking for.