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.
Symptom
Section titled “Symptom”会话已过期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.
Keep the account signed in in the original Chrome, and sign in only to the affected target account in another browser.
Start Codex OAuth login again for the target account in CC Switch.
Close the Chrome authorization window opened by default, copy the authorization URL into the separate browser, and complete authorization there.
Restart CC Switch and confirm the target account no longer shows “Session expired”.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- 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.
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.