Skip to main content
Watch: I Built an AI App Without Leaving Databricks

OpenAI Codex CLI error

Codex CLI: Your access token could not be refreshed because your refresh token was...

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

Status: Fixed in releaseLast verified 2 documented fixes4 sources

What it means

Codex tried to refresh your ChatGPT sign-in, but the refresh token had already been consumed, so the session cannot authenticate until you sign in again.

Causes

  • Maintainer etraut-openai (#9634): an older copy of Codex (CLI or IDE extension) left running in the background can cause this.
  • A hole in token refresh logic for the app server used by the IDE extension, fixed in PR #11802.

How to fix it

  1. Fix 1.

    Update Codex. Maintainers said this is fixed in 0.117.0 and added more logging; PR #11802 (Fixed a hole in token refresh logic for app server) first shipped in 0.105.0.

  2. Fix 2.

    Log out and sign in again, as the message says, and close older Codex CLI or extension processes that may still be running.

    Terminal
    codex logout
    codex login

More Codex CLI errors

All 14 Codex CLI errors

FAQ

What does "Your access token could not be refreshed because your refresh token was..." mean in Codex CLI?

Codex tried to refresh your ChatGPT sign-in, but the refresh token had already been consumed, so the session cannot authenticate until you sign in again.

How do I fix "Your access token could not be refreshed because your refresh token was..."?

There are 2 documented fixes. Start with the first: Update Codex. Maintainers said this is fixed in 0.117.0 and added more logging; PR #11802 (Fixed a hole in token refresh logic for app server) first shipped in 0.105.0.

Is this Codex CLI error fixed?

Status: Fixed in release. A release fixed this. The affected versions note says where the fix landed. Affected versions: Reported on v0.88.0 (#9634); maintainers say fixed in 0.117.0

Sources

Last verified against 4 sources: official docs, maintainer replies and release notes.

Newsletter

Fixes for the tools you use, weekly

One email per week. New coding agent releases, what broke, and how developers are working around it.