openai / openai/codex

Codex Desktop OAuth token_exchange_failed immediately after automatic update to 26.810.41047 on macOS

Open
#38,482 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app auth bug connectivity
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.810.41047 Released Aug 14, 2026

What subscription do you have?

Pro

What platform is your computer?

MacBook Air M2 (Apple Silicon) macOS 15.6.1

What issue are you seeing?

Codex Desktop was working normally for more than a month. After the app automatically updated, existing conversations began repeatedly showing "Reconnecting" and eventually failed with:

stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)

I signed out to troubleshoot. Since signing out, I can no longer sign back into Codex Desktop.

Browser authentication proceeds to the localhost callback, but Codex then displays:

token_exchange_failed

Token exchange failed: error sending request for url (https://auth.openai.com/oauth/token)

ChatGPT in Chrome continues to work normally.

The issue reproduces with two different ChatGPT accounts, on both Wi-Fi and a mobile hotspot.

Codex is correctly listening on the OAuth callback port:

codex ... TCP 127.0.0.1:1455 (LISTEN)

curl http://localhost:1455 returns Not Found, confirming the local callback server is responding.

env | grep -i proxy returns nothing, so no proxy environment variables are configured.

The problem started immediately following the automatic Codex Desktop update. No network, account or system configuration changes were made beforehand.

What steps can reproduce the bug?

Open Codex Desktop 26.810.41047 on macOS 15.6.1 / Apple Silicon M2.
Select Sign in with ChatGPT.
Complete authentication in Chrome.
Browser redirects to localhost:1455/auth/callback.
Codex fails to complete authentication.
Error displayed: token_exchange_failed.
Retrying produces the same result.

Reproduces using two separate ChatGPT accounts and both Wi-Fi and mobile hotspot.

What is the expected behavior?

After completing authentication in the browser, Codex Desktop should exchange the OAuth code, sign into my ChatGPT account and open normally.

Additional information

Troubleshooting already completed:

• Restarted Codex Desktop
• Force quit all Codex processes through Activity Monitor
• Signed out and attempted fresh authentication
• Tested a second ChatGPT account, same failure
• Tested Wi-Fi and mobile hotspot, same failure
• Chrome/ChatGPT web works normally
• Tested Chrome Incognito, same failure
• Confirmed Codex is listening on 127.0.0.1:1455
• Confirmed localhost callback server responds
• Confirmed no proxy environment variables are configured
• macOS: 15.6.1
• Hardware: MacBook Air M2 / Apple Silicon
• Codex Desktop: 26.810.41047, released Aug 14, 2026

Codex had been working normally on this Mac for more than a month. The issue began immediately after the automatic Desktop update.

I have deliberately not deleted Codex application data or project files because I do not want to risk losing local project/thread information.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Sign in with ChatGPT flow in Codex Desktop 26.810.41047 and inspect the localhost:1455/auth/callback entry point and the request to https://auth.openai.com/oauth/token. Compare the callback and token-exchange behavior after the automatic update. Done means authentication completes successfully and the app opens without token_exchange_failed or repeated Reconnecting errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
authentication, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.