unexpected status 401 Unauthorized

Open 💬 0 comments Opened Jul 16, 2026 by 123noobwang

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

桌面最新

What subscription do you have?

plus

What platform is your computer?

Microsoft Windows [版本 10.0.22631.5335]

What issue are you seeing?

Hello OpenAI Support,

I would like to report a Codex Desktop authentication issue that occurred immediately after I renewed my ChatGPT Plus subscription.

Environment:

  • Operating system: Windows
  • Product: Official Codex Desktop app
  • Login method: Sign in with ChatGPT
  • Subscription: ChatGPT Plus, active
  • Network: VPN required to access OpenAI services

Error:

401 Unauthorized
Missing scopes: api.responses.write

Request ID:
req_f55940d861d8483b9a24fa51a985e041

Symptoms:

  1. Codex Desktop could no longer submit any requests.
  2. My existing projects were still visible, but all previous tasks appeared as “No tasks”.
  3. Signing out and signing back in did not fix the issue.
  4. Reinstalling Codex did not fix the issue.

Troubleshooting performed:

  • Confirmed there was no OPENAI_API_KEY environment variable.
  • No .codex/.env file was present.
  • config.toml had already been moved aside.
  • My local sessions, archived_sessions, session_index.jsonl, and state_5.sqlite files were still present.

Resolution:
I backed up and renamed:

C:\Users\new user\.codex\auth.json

After launching Codex and signing in with ChatGPT again, Codex started working normally.

This strongly suggests that Codex retained a stale, corrupted, or incorrectly scoped authentication token in auth.json. Reinstalling the application did not clear this credential.

Please investigate why the cached authentication token lost or failed to refresh the api.responses.write scope, especially around the time of the ChatGPT Plus subscription renewal. Please also consider improving Codex so that a 401 scope error automatically triggers a clean token refresh instead of showing that all project tasks are missing.

Thank you.

What steps can reproduce the bug?

让codex修改重连5次的问题后出现

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗