Authentication should show login again if token expired or other token error
Resolved 💬 6 comments Opened Oct 25, 2025 by matssk Closed Nov 15, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.49
What subscription do you have?
Pro
Which model were you using?
_No response_
What platform is your computer?
_No response_
What issue are you seeing?
It's not working.
Every requests results in the error: exceeded retry limit, last status: 401 Unauthorized, request id: 99438b5929d256ae-OSL
What steps can reproduce the bug?
Try to do anything
What is the expected behavior?
Something should work
Additional information
_No response_
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Deleting auth.json and logging in again fixed the issue. I guess the login token had expired? Should show the login screen again if the token is expired instead of just showing an error.
Thanks for the bug report. I'm glad to hear that deleting
auth.jsonworked for you. If this happens again, you can also log out (using the/logoutcommand in the CLI or the "Log out" menu item in the extension).I presume you're logging with ChatGPT? Are you using the Codex CLI or the IDE extension? In either case, if your token expires, we should seamlessly refresh it for a new one.
Logging in with ChatGPT in Codex CLI
@etraut-openai i think something is wrong with the refresh logic, I got the same thing today (reconnecting 5/5 and throws 401) I had to logout and login again to make it work
In recent versions, we've updated the refresh logic to surface the error.