Skip to content

Your access token could not be refreshed because your refresh token was already used - Codex

Quick fix

Upgrade CC Switch to v3.17.0 or later to fix official ChatGPT OAuth credential issues caused by the takeover route writing a placeholder.

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

In earlier versions, enabling Codex local route takeover wrote the `OPENAI_API_KEY = PROXY_MANAGED` placeholder to `auth.json`. When using the official ChatGPT subscription OAuth login, this could overwrite or corrupt existing credentials and cause refresh failures. If the takeover setting and backup were out of sync, the leftover placeholder could also be sent to the official endpoint, triggering a 401 error with `Incorrect API key provided: PROXY_MANAGED`.

The maintainer said that v3.17.0 refactored takeover routing for official ChatGPT sessions: it no longer writes the placeholder, preserves official login credentials, and removes leftover `PROXY_MANAGED`. A later comment reported a similar issue on v3.20.4, but with different error text. That comment provided no troubleshooting results, so it is unclear whether the root cause was the same or whether the fix applies to that version.

  1. Upgrade CC Switch to v3.17.0 or later, then verify the official Codex ChatGPT login and takeover scenarios again.

  2. If the issue persists after upgrading, provide reproduction steps, including the Provider used and the order in which you changed the takeover setting.

ToolCodex
Version3.14.1;评论另报告 v3.20.4 出现相似问题。维护者说明原问题自 v3.17.0 起修复。
PlatformsUnknown

(No FAQ yet)

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.