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.
Symptom
Section titled “Symptom”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.
Upgrade CC Switch to v3.17.0 or later, then verify the official Codex ChatGPT login and takeover scenarios again.
If the issue persists after upgrading, provide reproduction steps, including the Provider used and the order in which you changed the takeover setting.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
(No FAQ yet)
Related problems
Section titled “Related problems”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.