# CC Switch v4.0.11 This release adds uninstall: you can now install, update and uninstall coding apps from the "Apps" page. Before uninstalling, the confirmation dialog lists the installation path to be removed and the command that will run; only installations whose source can be confirmed are removed, and configuration and session data are kept. The menu also lists manual uninstall commands by install method. When you add a coding-plan provider (Kimi, Zhipu, MiniMax and others), every app now turns on the plan quota query by default, not only Claude Code, and the same goes for one-click import links. Codex usage stats get two fixes: forked sessions are no longer fully reread every minute, and usage from subagents forked after a long Codex Desktop session turns the page is now counted. It also fixes install and update commands not finding npm after CC Switch restarts from an auto-update on Windows, full-screen pages flickering when opened, and bulk Skills and MCP toggles reporting success even when every change failed. For everything new in 4.0, see the [v4.0 release notes](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-en.md). --- ## New **Installed tools can be uninstalled from the "Apps" page.** Each installed tool now has an "Uninstall" button. Clicking it first checks which installation is currently in use; the confirmation dialog lists the installation path to be removed and the command that will run, and nothing runs until you confirm. It checks again right before running and does nothing if the installation has changed. Only installations whose source can be confirmed are removed: - Global npm installs (the package name and install prefix are verified); - Claude Code and Codex (cask) and Gemini CLI and OpenCode (formula) installed with Homebrew; no other Homebrew package is ever touched; - Claude Code, Codex, Grok Build and OpenCode installed with the official install script: only the executable currently in use and its launcher are deleted, never a directory, and other old versions of Claude Code are kept; - Hermes runs its own `hermes uninstall --yes`; OpenClaw first runs the official command to uninstall the Gateway service, and uninstalls the CLI only after that succeeds. - On Windows, tools installed in WSL are uninstalled inside the corresponding distro, using the same shell as version detection, so tools installed with nvm and the like are found too. Configuration and session data are kept; when there are several installations, only the one currently in use is removed and the others are kept. Installations whose source can't be recognized are not uninstalled automatically; you are pointed to the manual commands instead. The "Apps" page menu adds "Manual uninstall commands", which lists each tool's uninstall commands by install method (npm, pnpm, Bun, Homebrew and so on) and environment, ready to copy into a terminal. **Presets:** Added StreamLake China, AIComing, SoruxGPT Coding Plan and GrooRoute Pro; fixed the addresses in the StreamLake international OpenCode, OpenClaw and Pi presets; AIGoCode moves to its new domain. ## Improvements **Plan quota queries are on by default in every app.** When adding a provider whose address belongs to a coding plan (Kimi, Zhipu, MiniMax, Volcengine, OpenCode Go, Command Code), only Claude Code used to turn on the plan quota query by default; apps such as Codex, OpenCode, Pi and Hermes needed it turned on manually. It is now on by default in every app. The same goes for one-click import links: when a link carries no usage query script and its address belongs to a coding plan, the query is on after import, and the confirmation dialog names the plan, as in "Plan quota: Kimi For Coding"; links that set `usageEnabled=false` still keep it off. ZenMux is still on by default only in Claude Code. Providers you have already added are not affected. **Full-screen pages no longer fade in and out.** v4.0.10 removed the fade from the add and edit provider pages, but pages such as "Add Pricing", "Configure Usage Query", "API Endpoint Management", universal providers and workspace files still flashed when opened on Windows. Now no full-screen page fades in or out, on macOS and Linux too; the Accounts page keeps its slide-in from the right. Workspace files and daily memory now open the editor only after the content has been read, instead of flashing a loading page first. ## Fixes - **On Windows, installing or updating tools couldn't find npm after CC Switch restarted from an auto-update** ([#8171](https://github.com/farion1231/cc-switch/issues/8171)). When CC Switch restarts automatically after the installer updates it, it doesn't get the full user PATH. Version detection already restored the PATH from the registry, so tools showed as installed; but install and update commands still ran with the incomplete PATH, so npm wasn't found. Commands now run with the restored PATH too, which also benefits uninstall. - **Codex forked sessions were fully reread every minute** ([#8217](https://github.com/farion1231/cc-switch/issues/8217), [#8209](https://github.com/farion1231/cc-switch/issues/8209)). For forked sessions created by subagents, "Branch to new chat" or rollbacks, if the parent session hasn't been written up to the fork point yet, usage import skips them and retries later. Since v3.18, every 60-second sync reread these sessions in full and then wrote a warning to the log; for users with many forked sessions, total disk reads could reach several TB, and the log quickly hit its rotation limit. CC Switch now remembers the state of the child and parent session files, skips them if the files haven't changed, and retries only when they have. Billing rules are unchanged: usage from sessions whose parent never got written up to the fork point (for example, when forking after a long idle period) is still not counted; this rule is still under discussion ([#5687](https://github.com/farion1231/cc-switch/issues/5687)). - **Usage from subagents forked after a long Codex Desktop session turned the page was lost entirely** ([#7084](https://github.com/farion1231/cc-switch/issues/7084), [#8210](https://github.com/farion1231/cc-switch/issues/8210)). Codex Desktop saves long sessions in pages, continuing in a new file once the first page is full. CC Switch used to find only the first page, so subagents forked after the page turn were always judged as "parent session hasn't reached the fork point yet", and their usage has gone uncounted since v3.20.1. The pages of the same session are now joined in order before that check. These subagent sessions were never imported before; after upgrading, the next sync picks them up automatically, as long as the session files still exist. Continuation pages of a forked thread itself, written after its own page turn, are still not counted; this will be handled in a later release ([#8161](https://github.com/farion1231/cc-switch/issues/8161)). - **Bulk enable and disable in Skills and MCP reported success even when every change failed.** An error toast is now shown when all of them fail and a warning on partial failure; undo also reports its actual outcome instead of always showing "Undone". - **The workspace editor could save the previous file's content into the current file.** When you opened a file, closed it and then opened another, if reading the second one failed, the editor kept showing the previous file's content under the new file name, and clicking Save then overwrote the new file. A failed read now returns to the file list. ## Upgrade Notes **The database schema is unchanged**, still at 20. - The Codex subagent usage backfill runs automatically in the first sync after the upgrade. It only covers child sessions that were always skipped because their parent session was paginated, and usage that was already imported is not counted twice. - Plan quota being on by default only affects newly added and newly imported providers. To turn it on for an existing provider, click "Configure usage query" on its card and choose the Token Plan template. --- ## Thanks Thanks to [@funkpopo](https://github.com/funkpopo) (uninstall on the "Apps" page, and npm not being found after an auto-update on Windows), [@NestorRay](https://github.com/NestorRay) (full-screen page flicker and workspace editor reads), [@Carl723000](https://github.com/Carl723000) (Codex forked sessions reread every minute), [@Lingbou](https://github.com/Lingbou) (joining paginated Codex sessions, and reporting the repeated reread warnings and the missing pagination index), [@jgwy](https://github.com/jgwy) (first reporting and implementing the joining of paginated sessions), [@xue-ding-e](https://github.com/xue-ding-e) (failure toasts for bulk Skills toggles) and [@mozzie49](https://github.com/mozzie49) (outcome toasts for bulk undo) for their contributions. Thanks to [@andyyxw](https://github.com/andyyxw), [@syanle](https://github.com/syanle), [@a790798959-hub](https://github.com/a790798959-hub), [@imsquner](https://github.com/imsquner), [@loulanyue](https://github.com/loulanyue) and [@YiMore7](https://github.com/YiMore7) for reporting issues, providing reproduction details and suggesting fixes. For the full technical details, see the [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md).