Codex CLI: 0.151.0, installed from the official @openai/codex npm package.
#41821
nattapong18-en
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
OS: CachyOS Linux x86_64
Codex CLI: 0.151.0, installed from the official
@openai/codexnpm package.Exact error:
Token exchange error: error sending request for url (https://auth.openai.com/oauth/token)
Error logging in: Token exchange failed: error sending request for url (https://auth.openai.com/oauth/token)
I have already tested
codex login --device-auth; it fails as well.This is not a corporate network. There is no proxy, VPN, or SSL inspection.
HTTP_PROXY,HTTPS_PROXY,ALL_PROXY,CODEX_CA_CERTIFICATE, and related environment variables are unset. I have also tested a different network/mobile hotspot, disabled IPv6, reinstalled Codex, tried multiple CLI versions, and used a clean~/.codexdirectory.The system clock is synchronized by NTP. Browser authorization succeeds and the callback reaches
localhost:1455, so the loopback redirect is working.Direct connectivity to the exact token endpoint also works:
POST https://auth.openai.com/oauth/tokenreturnsHTTP/2 400with an expected invalidgrant_type=testresponse, through Cloudflare BKK. This confirms DNS, TCP, TLS, HTTP/2, and the OpenAI token endpoint are reachable from this machine.The
mcp_oauth_callback_portsettings apply to MCP-server OAuth, not the Codex account login flow, and the localhost callback has already succeeded.This matches openai/codex issue #41434. The automated troubleshooting has been exhausted. Please create a support ticket and escalate this to a human technical agent as a Codex CLI OAuth/token-exchange defect. This is a personal paid ChatGPT Plus account and there is no workspace administrator.


All reactions