Skip to content

settings.json overwritten by proxy takeover causing plugin config loss - Claude Code

Quick fix

Place custom fields such as hooks and statusLine into the "General Configuration" panel, or upgrade to v3.12.2+ to fix the legacy backup restore logic.

Error output
settings.json 文件会因为cc switch代理模式重置,导致plugin每次重启都是禁用,因为enabledPlugins 配置没了
English translation

The settings.json file gets reset due to cc-switch proxy mode, causing plugins to be disabled on every restart because the enabledPlugins configuration is lost.

The local proxy (takeover) mode of cc-switch works by taking over `~/.claude/settings.json`. When switching providers or enabling/disabling the proxy, the program writes the provider's configuration to make the proxy work. Early versions (before v3.12.2) used stale snapshots when restoring backups, causing custom fields such as `statusLine`, `permissions`, and `enabledPlugins` to be lost. This issue was fixed in v3.12.2 by refactoring the Proxy Takeover Restore Flow.

However, even after upgrading to the latest version, the core design remains unchanged: cc-switch adopts a strategy of fully overwriting the live file using the database template as the source, rather than field-level merging. This means that if a third-party tool (such as Orca) or a user manually writes top-level fields into `settings.json` that do not belong to any provider template, those fields will still be overwritten when switching providers. The maintainer explicitly stated that a field-level merge was attempted in v3.11.0 but was reverted in v3.11.1 due to complex state conflict issues it introduced. The currently recommended approach is to pass shared configuration across different providers via the "General Configuration" feature.

  1. Upgrade cc-switch to v3.12.2 or higher to get the refactored Proxy Takeover Restore Flow and avoid issues caused by restoring stale snapshots.

  2. Edit the current Claude provider in cc-switch and enter the "General Configuration" panel.

  3. Click "Extract from Current Provider" to extract custom fields such as `hooks`, `statusLine`, `permissions`, and `enabledPlugins` from `~/.claude/settings.json` on disk into the general configuration.

  4. Save the configuration. Ensure that "Write General Configuration" is checked when creating or switching providers (usually checked by default), so that shared data such as plugins is preserved during switching.

  5. If you need to modify configuration such as environment variables while the proxy is enabled, first disable the proxy feature in cc-switch, make the changes, and then re-enable it to ensure the configuration is synchronized correctly.

ToolClaude Code
Version3.12.2 之前的版本受影响,3.12.2 及之后版本修复了备份恢复逻辑;但全量覆盖策略在 3.20.0 等版本中依然存在
PlatformsWindowsmacOSLinux

This page is distilled from 15 real issues

After upgrading to the latest version, why do my hooks configurations still get lost when switching providers?
Although the latest version fixes the stale snapshot restoration bug, the underlying layer still uses a full overwrite strategy. If fields such as `hooks` are not in the provider configuration or "General Configuration", they will be overwritten during switching. Please extract these fields written by third-party tools into "General Configuration".
After enabling the proxy, why are the provider's environment variable modifications not synchronized to settings.json?
This is a known issue in early versions. Try turning the Claude proxy switch off and then back on to trigger a configuration update. It is recommended to upgrade to v3.12.2+ for a more stable proxy synchronization experience.
What should I do if the configuration in settings.json is cleared after disabling the proxy or restarting the computer?
This is usually because the restore flow used a stale backup snapshot when the proxy was disabled or the service restarted. Upgrading to v3.12.2+ resolves this issue. If you are already on the latest version, check whether fields written by third-party tools were overwritten because they were not added to "General Configuration".
Why not just modify the code to only overwrite proxy-related fields such as env and keep all other configurations?
The maintainer stated that a field-level merge approach was attempted in v3.11.0, but it introduced more complex state conflict issues, so it was reverted in v3.11.1. The current design requires the request URL and API Key to be provider-specific, while other shared configurations are passed via "General Configuration".

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.