CC Switch v4.0.21
This release adds switching between multiple official subscription accounts for Claude Code: add a few Claude accounts in Accounts, choose one for each official card, and Claude Code uses the account of whichever card you switch to; to use several accounts at once, use "Open Terminal" on a card, and that terminal stays on the card's account. Sign-in goes through Claude Code's official flow, tokens stay only in Claude Code on your machine, and CC Switch does not upload or refresh them, and does not sign out. Cards bound to an account and Accounts both show each account's plan and remaining quota. In addition, "Open Terminal" moves onto the card, Codex model lists can be reordered by dragging, and Lightweight mode persists across restarts. Fixes cover managed ChatGPT accounts wrongly reporting an expired sign-in after a restart, Codex requests going to a different address through routing, extra timeout / autoApprove in Codex's MCP configuration, OpenCode and Grok Build not installing properly under npm 12, wrong times in Kimi Code usage, and Oh My Pi's models.yml not being editable when it contains &, * or !. For everything new in 4.0, see the v4.0 release notes.
New
Switch between multiple official Claude subscription accounts
If you have more than one Claude subscription (say a personal Max and a company Team, or several Pro accounts), before you could only /logout and then /login in Claude Code, or create a configuration folder for each account yourself. Now you can manage several accounts in CC Switch (#1928).
Security and compliance. When a tool manages subscription accounts, what matters most is keeping tokens safe and not violating Anthropic's terms. This feature follows the approach in Claude Code's official documentation, and tokens always stay only in Claude Code on your own machine:
- Sign-in goes through the official flow. Adding an account runs Claude Code's own
claude auth login --claudeai, and the password and authorization are both completed on claude.ai's official page. CC Switch has no Claude sign-in of its own, and no OAuth client of its own. Anthropic's legal and compliance page requires that sign-in to Claude accounts be completed through Anthropic's own flow, and states explicitly that it does not restrict users from signing in to unmodified Claude Code with their own subscription. - Multiple accounts use the officially recommended method. Each account has its own configuration folder, told apart by
CLAUDE_CONFIG_DIR, the same method as in Claude Code's authentication docs, section "Log in with multiple accounts"; CC Switch only creates the folders and opens terminals for you. - Tokens do not leave your machine. Tokens are stored only where Claude Code itself keeps them (the Keychain on macOS,
.credentials.jsonon Linux and Windows); they are not uploaded, not cloud-synced, and not written into CC Switch's database. CC Switch itself records only account details such as email, organization and plan, plus the sign-in expiry time, and never the token. - No requests on your behalf. CC Switch has no server and does not use subscription tokens to call models; conversation requests are all sent straight to Anthropic by unmodified Claude Code on your machine, and usage counts against your own account. Quota is checked directly from your machine against Anthropic's official quota endpoint, the same data Claude Code's own
/usagequeries. - No refreshing, no signing out, no changes to Claude Code. Tokens are always refreshed by Claude Code itself. Deleting an account only deletes the folder CC Switch created for it (on macOS, together with that folder's Keychain entry), and does not sign that account out anywhere. CC Switch does not modify Claude Code's program files.
- Only your own accounts. Accounts are not rotated automatically based on quota, and there is no feature for sharing a subscription with others.
Switching accounts by switching cards moves the sign-in between Claude Code's storage locations on your machine (only in Claude Code's own format), a use the official docs do not specifically cover. If you only want the methods the docs describe, keep cards on "Follow Claude Code login" and use other accounts only through "Open Terminal" on a card.
How to use it:
- Add accounts. In the Claude group in Accounts, click "Add account". The browser opens claude.ai's official authorization page, and after you sign in, the account appears in the list automatically. If the browser cannot get back to your machine after authorizing, you can paste back the address from the address bar or the code shown on the page. Each account's folder is kept separate, and syncs what you have in
~/.claude: settings, MCP andCLAUDE.md(except sign-in credentials and routing-related settings). - Choose an account for an official card. The "Sign-in method" dropdown on Claude official cards works like the one on Codex official cards: signed-in accounts are at the top, and "Add or manage Claude accounts" (which jumps to Accounts) and "Follow Claude Code login" are at the bottom. One card per account is enough.
- Switching cards switches accounts. When you switch to an official card with an account selected, CC Switch puts that account's sign-in where Claude Code reads it by default, and puts the previous account back in its own folder.
claudein terminals, IDE extensions and scripts all switch to this account, and Claude Code instances that are already running switch along right away, without a restart. When you switch to an official card with an account selected, the current sign-in is first added to Accounts if it is not there yet. Claude Code's own lock is held during the switch; if CC Switch quits unexpectedly partway through, the switch is completed or rolled back automatically at the next switch or startup. Cards set to "Follow Claude Code login" leave the sign-in alone, and people who do not add accounts are not affected. - Use several accounts at once. Use "Open Terminal" on a card with an account selected; that terminal stays on the card's account, and later card switches do not affect it.
- Plan and quota. The card subtitle shows the account and plan (such as
Max 20x), with a hint when the sign-in needs renewing; the bottom of the card shows this account's remaining quota by default, and each account in Accounts has the same quota column. When the token of an account not in use has expired, CC Switch runs Claude Code's ownclaude -p /usageonce in that account's folder (at most once every 10 minutes per account), so Claude Code itself refreshes the sign-in and queries the quota, and CC Switch only reads the result./usagedoes not call a model and does not use conversation quota. Official cards without an account selected also show the plan of the current sign-in.
A few notes:
- After switching accounts, an active Remote Control session disconnects; the first message after switching has to rebuild the prompt cache, so it is a bit slower and uses a bit more quota.
- When the Claude configuration folder is overridden in the settings (including pointing it to WSL), switching cards does not switch the sign-in, and the interface suggests using "Open Terminal" instead.
Codex model lists can be reordered by dragging
Each row of the model list in the Codex provider form starts with a drag handle, and the order can be changed with the mouse or the keyboard (#8870). This order is the order of the /model menu in Codex. When the first row stands for the default model, the model dragged to the first row becomes the new default. Before, moving a model meant deleting it and adding it back.
Improvements
"Open Terminal" moves onto the card. It used to be in the ⋯ menu; now it is an icon button to the left of "Edit". The hover tooltip reads "Open Terminal with This Provider", and adds "(Isolated)" when the terminal is pinned to this card (cards with their own address and Key filled in, and official cards with a Claude account selected).
The "Add account" button of each group in Accounts stays to the right of the title. Before, when a group had no accounts, the button moved into the empty-state message, so the buttons of different groups sat at different heights. The ChatGPT login method is now a small dropdown next to the button. The "Delete all accounts" menu in the title is removed; accounts are deleted from the menu on their own row. The quota bars of all accounts are now aligned and the same length.
Lightweight mode persists across restarts. If you quit CC Switch while in Lightweight mode, it starts in Lightweight mode next time instead of showing the main window. A cold start from a ccswitch:// link still opens the main window, so the import dialog can be shown.
Hermes cards show "Default", and "Set as default" moves into the ⋯ menu. Hermes writes every added provider into config.yaml, and the current one is only the default, as with OpenClaw, OpenCode and Kimi Code. The old power-icon "Enable" button looked like a toggle.
The usage column no longer shifts sideways when a card becomes "In use".
When SSE is selected for an MCP server, a hint shows which apps do not support it (#8882). Codex only supports stdio and HTTP and treats an SSE address as an HTTP connection, which fails when the server only supports SSE; Pi and Antigravity report an error when saving. A hint now appears under "Write to" in advance.
When the Claude Desktop upstream address is githubcopilot.com, the upstream format shows "Selected automatically by routing" (#8838), the same as when a GitHub Copilot provider is selected.
OpenCode's OMO and OMO Slim cards no longer show "Connectivity check" (#8842). They only map agents to models and have no address to test; clicking it used to report an error.
Turkish translation completed (#8836).
Presets: DeepSeek presets all use the Flash model; the official Kimi presets add K3.1 Pro and K3.1 Pro HighSpeed, with low / high / max thinking levels (#8867); OpenClaw's MiniMax M3.1 Flash can select max; ClinePass (#8885) and TeamoRouter Claude (#8266) are added; Claude Desktop's OpenCode Go uses the address from the official docs, and its quota can now be queried (#8720, #8779).
Fixes
- Managed ChatGPT accounts showed "Sign-in expired" after a restart and could not be switched, then recovered on their own after a while (#8901). Before, any HTTP 403 while refreshing the sign-in was treated as an invalid sign-in, and network errors were also shown as expired. Now, as in Codex CLI, only a 401 or an explicit invalid-token error counts as expired; temporary network problems are retried as usual, and the quota keeps the previous result. After switching from the tray, quotas that failed to load in the main window are also queried again.
- When Codex went through local routing, requests were sent to a different address (#8849, #8848). When
config.tomlhad several provider tables, or an old address commented out above, the firstbase_urlin the text used to be taken, sending the selected provider's Key elsewhere. Now the address is taken from the table selected bymodel_provider. - Codex remote compaction usage was sometimes not recorded (#8879).
- Codex's MCP configuration had extra
timeoutandautoApprovefields, so Codex Desktop reported unknown settings and--strict-configrefused to load it (#8843). These two fields belong to other clients and used to be written intoconfig.tomlas they were; deleting them by hand did not help, because the next sync wrote them back. They are now dropped when writing for Codex, and other apps are not affected. - When Codex connected to several Azure resources through a relay, sessions failed partway with 400 "created under a different Azure OpenAI resource" and could not continue (#8877). Now, on this error, the request is retried once with the item IDs removed from the history. Normal requests are not affected.
- Upstreams such as ClinePass that wrap Chat Completions results in
datamade non-streaming requests fail with 422 "No choices in response" (#5658). - With npm 12, OpenCode installed from the "Apps" page reported "not compatible with the version of Windows you're running" on Windows, and Grok Build still ran the old version after an upgrade (#8863). npm 12 does not run install scripts by default, and these two packages rely on them to put the real program in place. Their install scripts are now allowed when installing and upgrading.
- On Windows, Hermes showed as two installations on the "Apps" page (#8839). A leftover
hermes.cmdin the same folder no longer counts as a separate installation. - In Kimi Code usage, every request in a conversation turn had the same time, so hourly statistics piled them into the last hour (#8899). Each request is now recorded at the time it completed. Records already imported are corrected the next time the session file changes.
- When Oh My Pi's
models.ymlhad a value such asname: Search & Fetchcontaining&,*or!, saving a provider reported "This YAML uses a layout or construct CC Switch cannot safely edit" (#8897). - When
~/.gemini/.envhadexport GEMINI_API_KEY=..., the Key was missing after import, and switching back to the default provider also deleted it from the file (#8862, #8861). - Switching from a project with a prompt enabled to a project without prompts did not disable the previous prompt.
- On the Usage page, the right edge of the trend chart jumped when expanding or collapsing the sidebar (#8548).
Thanks
Thanks to @L4XB (Codex routing address, Gemini export syntax), @syxscott (Codex remote compaction usage), @jlxzl (OpenCode Go address for Claude Desktop), @Railgun-wiki (Copilot address detection for Claude Desktop), @VipCrazyMaster (connectivity check on OMO cards), @allenxu09 (usage trend chart), @alkank (Turkish translation), @2867297362mjb-sketch (TeamoRouter presets), @zayokami (end-to-end routing tests), @Ming-Sir-69 (Windows build fix), @SaladDay (issue and PR templates, CI) for their contributions.
Thanks to @chunliang7258, @Lightly20110815, @Catcaca11j, @xovow, @Haoxuan1016, @karenepitaya, @lwdreamroom, @QingYunA, @bamboodew, @Little-TBS, @sojo-negai, @ppdragon2026, @smart-wcm, @oscarachiang for reporting issues and providing reproduction details and fix ideas.
Special thanks to @octo-patch: your PR found and fixed a real problem, and was closed only because the same problem was later fixed separately on the main branch.
For the full technical details, see the CHANGELOG.