Skip to content

Session expired - Codex OAuth multiple accounts

Quick fix

Complete Codex OAuth authorization again in a separate browser session signed in only to the target account, then restart CC Switch to verify.

Error output
会话已过期
English translation

Session expired

Reports show that when two ChatGPT accounts remain in the same Chrome profile, the account added later may work temporarily after signing in again but shows “Session expired” after restarting CC Switch; the first account works normally. Diagnostics previously returned `refresh_token_invalidated`, indicating that account's refresh token had become invalid.

After CC Switch restarts, it restores accounts from persisted data and uses the refresh path when authentication is needed. This is why the error appears after restart. Available evidence cannot determine whether invalidation is caused by browser multi-account sessions, CC Switch interaction, or both, nor can it establish that later-added accounts will always fail.

  1. Keep the account signed in in the original Chrome, and sign in only to the affected target account in another browser.

  2. Start Codex OAuth login again for the target account in CC Switch.

  3. Close the Chrome authorization window opened by default, copy the authorization URL into the separate browser, and complete authorization there.

  4. Restart CC Switch and confirm the target account no longer shows “Session expired”.

ToolCodex
Version3.20.4(报告的受影响版本)
PlatformsWindows
After configuring multiple GPT accounts, why does it say “Session expired, please run the codex_oauth command to refresh login”?
The affected account's refresh token previously returned `refresh_token_invalidated`. Try completing authorization again in a separate browser session signed in only to that target account.
Can this be confirmed as caused by Chrome multi-account login?
No. The available result is only a single-machine comparison: reauthorizing through an independent Edge login session restored normal operation. Complete testing of variables such as account order and browser engine has not yet been performed.

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.