Skip to content

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io

13.2 KB
Raw Blame

CC Switch v4.0.43

This release adds a "Query quota automatically" switch to the Accounts page: when it is off, official account quotas are queried only when you click refresh, which suits you if you go online through a proxy and don't want requests going straight to official services before the proxy is ready. You can also switch Antigravity official accounts directly from the tray, with each account's remaining quota shown next to it. The Apps page now recognizes OpenCode 2 and correctly checks for updates, upgrades and uninstalls it; OpenCode 2.4 sessions now show the assistant replies too. Speed in usage statistics counts only successful requests, and drops outliers from relays that buffer the output and send it all at once.

Fixes include: Codex sessions that couldn't continue after using a Chat Completions provider and then switching back to official ChatGPT in direct mode, the macOS menu bar icon position being reset after every quit, quoted values in ~/.gemini/.env, OpenClaw configs with block comments being corrupted on write, shell configs losing their final newline after an environment variable was deleted, and two Pi issues: plugins not being recognized, and updates installing a second copy.


New

"Query quota automatically" switch on the Accounts page

(#9325, see #8990)

Opening the Accounts page, the timed refresh of the current official card and hovering over the tray all query official services for account quotas automatically. If you go online through a proxy and the proxy isn't ready yet, these requests go out directly. The Accounts page now has a "Query quota automatically" switch at the top, below "Open the browser when signing in"; it is on by default.

  • When it is off: quotas of official accounts such as Claude, ChatGPT (Codex), xAI, Kimi, Antigravity, GitHub Copilot, WorkBuddy and CodeBuddy are queried only when you click ↻ on an account row or "Refresh all". Opening the Accounts page, timed card refreshes and hovering over the tray no longer send requests automatically; results already fetched are still shown.
  • Accounts that were never queried: show "Click refresh to query quota" and a refresh button instead of a blank space.
  • At startup: no quota is queried until the settings have been read, so if you turned the switch off, no request slips out at the moment of launch.
  • Not affected: balance scripts of third-party providers refresh as usual; DeepSeek account balances are shown together with the sign-in status and aren't affected by this switch either.

In addition, "Refresh all" now refreshes every account on the page (also with automatic queries off), and for WorkBuddy and CodeBuddy it also skips the 5-minute backend cache to get the latest numbers.

Switch Antigravity official accounts from the tray

The tray gains an Antigravity section listing the Antigravity accounts saved on the Accounts page, with each account's remaining quota next to it (grouped as Gemini, Claude/GPT and Argon, showing the lowest tier in each group).

  • The checked account is the one agy is currently signed in with. Click another account to switch to it; like switching on the Accounts page, this writes to the system keychain. When agy is running, you are told that open sessions need a restart for it to take effect.
  • The current account's quota refreshes together with the tray, and other accounts refresh at most every 5 minutes, each with its own sign-in, so you don't have to switch to them first. Quota fetched on the Accounts page is also synced to the tray.
  • "Manage accounts…" opens the Accounts page; a failed switch also opens the Accounts page.
  • When no Antigravity accounts are saved on the Accounts page, the section isn't shown and the keychain isn't read.

OpenCode 2 support on the Apps page

(supersedes #8727)

OpenCode 2 is a separate npm package (@opencode/cli; on Homebrew it is anomalyco/tap/opencode-v2) that lives alongside 1.x's opencode-ai. The Apps page used to know only opencode-ai, so if you had OpenCode 2 installed you ran into the following:

  • The latest version was taken from 1.x, which is lower than the local 2.x, so 2.x updates could never be offered;
  • Upgrading installed opencode-ai@latest: npm failed with EEXIST, while pnpm on Windows reported no error but replaced opencode with a 1.x that wasn't fully installed, breaking the command;
  • Uninstalling didn't recognize versions installed with npm or opencode-v2, and left behind the opencode2 alias created by the install script.

CC Switch now tells 1.x from 2.x by where it is actually installed, and the update check, upgrade command, npm install-script settings and Node version requirement all use the matching package. Uninstalling finds the npm package it belongs to (including in WSL), recognizes opencode-v2, and removes opencode2 only when it really was created by the install script. New installs still get 1.x, and CC Switch won't switch you between the two lines; installs made with Volta can't be told apart and are still treated as 1.x.


Changes

  • More accurate speed statistics (#9952, closes #9950): pass-through streaming responses now detect the real first output token for each protocol (Anthropic, OpenAI Responses, OpenAI Chat, Gemini), instead of taking metadata events as the first token. Speed and time to first token count only successful (2xx) requests; anything above 10,000 tok/s is treated as output that a relay buffered and sent all at once, isn't counted toward speed, and the request details explain why. Speed summarized by provider and model is still total output tokens divided by total generation time.
  • Claude session log durations start from when the request was actually sent: when a request hangs, Claude Code resends the same request. Previously, without routing, imported durations and time to first token were counted from the message that triggered the reply, so the stalled stretch (often more than ten minutes) was included and pulled the estimated speed down. Newer Claude Code records the time each request is actually sent, and timing now starts from that moment. Older logs are calculated as before, and records already imported are unchanged.
  • The app filter in usage statistics follows the sidebar order (#10006, closes #10005): including an order you dragged on the Apps page.
  • Codex "Keep official Fast tier" explanation (see #10000): on a card without a model list, this switch couldn't be saved even when turned on; it is now locked, with a note to add GPT models to the model list first. The description also explains that the Codex desktop app shows Fast only when signed in with ChatGPT; with a third-party card, turn on "Keep official login for direct switches" in Settings (or use routing mode), and requests still go to this card; the CLI doesn't need a sign-in (/fast).
  • The Plugins page shows which project a plugin belongs to (#9963, closes #9962): Claude Code's local / project plugins show their project directory below the row, and you can search by directory. After deleting same-named plugins from several projects, rows that can't be deleted are no longer left behind.
  • Linux supports the system default terminal (#9987, closes #9986): when none of the known terminals is found, "Open Terminal" also tries x-terminal-emulator and xdg-terminal-exec in turn, and the preferred terminal still comes first.
  • Explanation for the Pi column on the Skills page (#9971): it now explains that Pi also reads ~/.agents/skills, so skills there can be used directly even when unchecked.

Fixes

  • Codex sessions couldn't continue after switching back to official ChatGPT in direct mode (see #9054): when a Chat Completions provider was used first, the converted reasoning item ID was rs_<response id>. Some upstreams' response IDs are exactly 32 hex characters, the same shape as the IDs the official backend looks up, so after switching back to official ChatGPT in direct mode Codex reported Item with id 'rs_resp_...' not found and the session couldn't continue. A sequence number is now appended to the ID, so the official backend no longer looks it up. Item IDs already stored in old sessions don't change, and those sessions still fail in direct mode; please start a new session.
  • The macOS menu bar icon position was reset after every quit (see #6631): when quitting from the tray, quitting by closing the main window, and restarting, CC Switch first removed the tray icon, and on removal macOS deletes the position you ⌘-dragged the icon to, which also broke the groups of tools like Hidden Bar. On macOS the icon is no longer removed explicitly; the system takes it away when the process exits.
  • OpenCode 2.4 sessions didn't show assistant replies (see #9982): OpenCode 2.4 stores the parts of an assistant reply in a new session_part table, and session management used to read only the old table, so only your prompts were visible. Both tables are now read together, and searching and deleting sessions also cover the new table.
  • Quoted values in ~/.gemini/.env (#9928, closes #9926): Gemini CLI's official documentation writes them with quotes; previously, after import, the Key and URL kept the quotes and trailing comments, and routing sent them upstream as is. They are now stripped, the same way Gemini CLI does.
  • OpenClaw configs with block comments were corrupted on write (#10002, closes #10001): when openclaw.json contained /* ... */, any write by CC Switch dropped the closing /, and the file could no longer be read.
  • Shell configs lost their final newline after deleting a conflicting environment variable (#9929, closes #9927): a line appended to the end of the file afterwards ran into the last line. Now everything except the deleted line (including CRLF line endings and the final newline) is kept as is.
  • Plugins weren't recognized for Pi installed through Vite+ (#9976, see #9960): CC Switch launched from the desktop doesn't get variables such as VP_HOME from the shell config, so pi list actually ran as vp list. It now picks up the few directory variables Vite+ uses from the login shell.
  • Updating a Pi installed by Pi's official installer installed another copy with npm (#10015, closes #10013): it now uses Pi's own pi update.
  • When switching accounts on an Antigravity card failed, cloud sync could upload a binding that never took effect (#9978): WebDAV / S3 now wait for the switch to finish or roll back before taking a snapshot.

Thanks

Thanks to @funkpopo (automatic quota query switch, Skills explanation), @allenxu09 (automatic quota query switch, Pi installs and plugins, Antigravity cloud sync), @SnowGlow-aww (speed statistics), @HEOJUNFO (Gemini .env, OpenClaw block comments, shell config newlines), @jimpablo (project directories on the Plugins page, usage filter order), @liusheng2020 (Linux terminal) for their contributions.

Special thanks to @xwil1 (who found and fixed OpenCode 2's version check and upgrade commands in #8727) and @luantu (who pointed out in #6631 why the macOS menu bar icon position was lost); the fixes in this release follow their approach.

Thanks to @wlc534, @Duosl, @crazyi, @tomorrow1109, @BWrong, @lonelyman0108, @yyw-code for issue reports and reproduction details.

For the full technical details, see the CHANGELOG.