Windows Desktop hangs after successful OAuth and incorrectly reports "Your access token could not be refreshed because your refresh token was revoked

Open
#35,673 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

Start by reproducing the Sign in with ChatGPT flow on Windows 11 and compare the fresh %USERPROFILE%.codex\auth.json with the desktop behavior; the report says Codex CLI succeeds while ChatGPT.exe hangs. Review the mentioned .codex-global-state.json and the desktop authentication/session initialization path. Done means the desktop completes OAuth and opens normally without the revoked-refresh-token message.

Written by the indexing model from the issue text.

Description

app auth bug windows-os
What version of the Codex App are you using (From “About Codex” dialog)?

OpenAI.Codex 26.721.4979.0 ChatGPT.exe 150.0.7871.128 Codex CLI v0.146.0-alpha.3.1

What subscription do you have?

Pro

What platform is your computer?

Windows 11 x64

What issue are you seeing?

Summary

After successfully authenticating through the browser, the Windows ChatGPT/Codex desktop application immediately reports:

Your access token could not be refreshed because your refresh token was revoked. Please log out and sign in again.

However:

Browser OAuth completes successfully.
A fresh %USERPROFILE%.codex\auth.json is created.
Codex CLI authenticates successfully and works normally.

Only the desktop application fails.

Environment
Windows 11 x64
OpenAI.Codex 26.721.4979.0
ChatGPT.exe 150.0.7871.128
Codex CLI v0.146.0-alpha.3.1
ChatGPT Pro subscription
Reproduction
Launch Codex Desktop.
Choose Sign in with ChatGPT.
Browser opens.
Authenticate successfully.
Browser displays "Signed in to Codex".
Return to the desktop application.
Expected

Desktop completes authentication and opens normally.

Actual

Desktop immediately displays:

Your access token could not be refreshed because your refresh token was revoked. Please log out and sign in again.

The desktop app never becomes usable.

Diagnostics

Verified during troubleshooting:

Browser OAuth succeeds.
A fresh auth.json is created.
Codex CLI authenticates successfully and works normally using the same account.
Desktop package was completely uninstalled and reinstalled.
Repair and Reset were both performed.
Windows Event Viewer records:
Application Hang
Event ID: 1002

The program ChatGPT.exe version 150.0.7871.128
stopped interacting with Windows and was closed.

Task Manager shows ChatGPT.exe and multiple Codex helper processes remain running while the UI is hung.

Troubleshooting already attempted
Logout/login
Browser reauthentication
Deleted auth.json
Deleted .codex-global-state.json
Cleared Windows Credential Manager
Repair
Reset
Complete uninstall/reinstall
Windows reboot
Fresh OAuth login

No change.

Additional observation

The same authentication works correctly in the Codex CLI.

This suggests the browser is successfully issuing valid credentials and that the failure is isolated to the Windows desktop application's authentication/session initialization path rather than the refresh token actually being revoked.

Image Image Image Image
What steps can reproduce the bug?

See above

What is the expected behavior?

No response

Additional information

No response

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

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.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.