Refresh token was already used after session timed out

Resolved 💬 21 comments Opened Nov 11, 2025 by matssk Closed Jan 8, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.56

What subscription do you have?

Pro

Which model were you using?

_No response_

What platform is your computer?

Linux 6.14.0-32-generic x86_64

What issue are you seeing?

If I leave a session idle for a couple days, I get the following message:

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

I don't need to log out and log in again to fix it, simply closing codex and opening it again works.

I do always have multiple sessions open in different terminals. Perhaps that's why the refresh token was already used?

What steps can reproduce the bug?

Leave a session idle for a few days

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

21 Comments

github-actions[bot] contributor · 8 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #6448
  • #6393

Powered by Codex Action

VigneshNextrive · 7 months ago

any update on this issue?

keiwaya · 6 months ago

any update ?

sujarniel · 6 months ago

In my case i just need to reload the vs code, press crtl + shift + p and type reload window.

<img width="661" height="65" alt="Image" src="https://github.com/user-attachments/assets/b8f3e208-70ce-4e56-92a0-80ac21daa763" />

ghoshsap · 6 months ago

codex auth logout
codex auth login

vitalij555 · 6 months ago
"Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again."

The only thing which worked for me (in Mint Linux) is to remove ~/.codex/auth.json and then to restart VSCode and login into ChatGPT again...

etraut-openai contributor · 6 months ago

This will be fixed in the next release.

Aqualie · 6 months ago

just ran into this problem with the latest release 0.5.58......

treymathews · 6 months ago

I just ran into the same problem with 0.5.58. I was running into this on 0.4.58 as well, for the past week. I am really struggling here. I have logged out and back in from everything. I have restarted. Not sure what to do so that I can continue working.

etraut-openai contributor · 6 months ago

The fix is not in 0.5.58. It will be in 0.5.59 and 0.4.59.

The workaround is to log in again, so this shouldn't block you from working. If you're blocked (unable to log in again), then you're experiencing a different problem.

treymathews · 6 months ago

I can log out and log back in, but it doesn't fix the problem. i get the same error. Any other possible workarounds? Also, when will 0.5.59 and 0.4.59 be available?

etraut-openai contributor · 6 months ago

If logging out and logging back in doesn't work, then you're experiencing a different problem. It's unlikely that the next version will fix it for you. Please use the /feedback slash command to upload your logs, open a new bug report and post your thread ID.

ShiroTian · 6 months ago
> "Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again." The only thing which worked for me (in Mint Linux) is to remove ~/.codex/auth.json and then to restart VSCode and login into ChatGPT again...

Thanks, it worked

samuli-sellforte · 5 months ago
> "Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again." The only thing which worked for me (in Mint Linux) is to remove ~/.codex/auth.json and then to restart VSCode and login into ChatGPT again...

Thank you, this worked for MacOS

alik472 · 5 months ago

You are probably using old version of codex. also try to signin in the terminal first, then you can use the macos app.

jdsalasca contributor · 5 months ago

Still happening with codex-cli 0.98.0

BrianMcBrayer · 5 months ago

Yes, this is happening frequently to me. v0.104.0 and previous versions over the past week

i2vworld · 3 months ago

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

xxlbb3274 · 2 months ago

I still encounter the same problem now.

matssk · 2 months ago
I still encounter the same problem now.

is it perhaps another new issue? I haven't experienced the original issue since it was fixed back in January at least

7632486856348765873426584326 · 1 month ago

我也显示
Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.