Your access token could not be refreshed because your refresh token was already used.
The message
Your access token could not be refreshed because your refresh token was already used.What it means
Codex tried to swap its refresh token for a fresh access token, and OpenAI's login server said that refresh token had been spent already. Usually another copy of Codex on the same machine used it first.
What to do
Quit every Codex window, IDE extension and CLI session, run codex logout then codex login, and keep one account per machine. Update if you're older than 0.117.0.
Every command stops working, and each one gets the same reply:
Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.
When you sign in to Codex with ChatGPT, it keeps two tokens. The access token proves who you are and expires quickly. The refresh token gets swapped for a new pair before that happens, and each refresh token works once. We read the login code at tag rust-v0.157.1: this exact line is what Codex prints when OpenAI's token server answers with the code refresh_token_reused.
Who used it first
Something else on your machine did the swap, took the new tokens, and left this copy of Codex holding a dead one. The Codex auth docs say the CLI and the IDE extension share one cached login, stored in ~/.codex/auth.json or your OS credential store. Two programs reading the same file can race each other.
The long thread is openai/codex#9634 (46 comments since January). An OpenAI maintainer there asked early on whether "an older copy of codex (either the CLI or IDE extension)" had been running in the background. In March they spelled out the other cause: Codex "is not designed to support usage of multiple concurrent instances of Codex on the same system with different logins." Sign in to a second account and auth.json gets that account's tokens. Every session still running on the first account keeps going until its access token expires, then fails to refresh.
On March 29, 2026 the same maintainer wrote that they thought the single-account race was fixed in 0.117.0. Reports kept coming after that, on 0.118.0, 0.128.0 and 0.133.0, so it isn't gone.
Getting back in
The message tells you to log out and sign in, and that works once nothing else is holding the old tokens:
- Quit every copy: terminal sessions, the VS Code or Cursor extension, the desktop app. A background session left over from yesterday counts.
- Run
codex logout, thencodex login. - If you use two ChatGPT accounts (a personal Pro plan and a work seat, say), use one per machine or per user profile. Switching back and forth is the case the maintainer called unsupported.
- Run
codex --version. Anything below 0.117.0 predates the fix.
Machines count too. One commenter on 0.128.0 had a single account on three machines: the laptop that had logged in most recently worked, and two shared login servers threw this error.
The desktop app sign-out loop
A different cluster started in August 2026 in the macOS desktop app, where the refresh comes back as revoked (refresh_token_invalidated) within a minute or two of signing in. In #40267, several people tied it to changing how their account signs in, such as setting a ChatGPT password on an account created with Sign in with Apple or Google. One reported that signing in to ChatGPT in the browser with the original method first, then reopening the app, brought it back. That's a user's workaround, not an OpenAI fix, and the issue was still open on September 26.
If none of this clears it, OpenAI's maintainers ask for /feedback logs with the thread ID in a new issue. codex doctor also checks the auth setup locally.
Other lines the same feature prints
Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.
Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.Your access token could not be refreshed because your refresh token has expired. Please log out and sign in again.Your access token could not be refreshed because your refresh token was revoked. Please log out and sign in again.Your access token could not be refreshed. Please log out and sign in again.refresh_token_reused