Skip to content

settings.json configuration lost after switching providers (cc-switch)

Quick fix

Extract shared fields into “Common Configuration” and enable writing them for each provider; v3.12.2 fixes the proxy-related BUG.

Error output
原本有几十行配置, 还有配置好的hook, 现在就剩7行了
English translation

The configuration originally had dozens of lines, including configured hooks; now only 7 lines remain.

When cc-switch switches providers, it fully rewrites ~/.claude/settings.json using the selected provider configuration. This is intentional behavior described in the README FAQ. Fields not belonging to a provider configuration, such as enabledPlugins, hooks, statusLine, and includeCoAuthoredBy, are lost unless placed in “Common Configuration”.

Earlier versions, including v3.12.1 with proxy takeover enabled and 3.11.0, also had a BUG that prevented common configuration from being written back. Some users found that “Extract from Current Provider” reads the database record rather than settings.json on disk, so manually added fields cannot be extracted. Codex ~/.codex/config.toml can also be overwritten in the same way.

  1. Open “Edit Provider” → “Common Configuration” → “Extract from Current Provider”, then extract shared fields such as enabledPlugins, hooks, and statusLine into Common Configuration.

    // ~/.claude/settings.json
    {
    "enabledPlugins": {
    "frontend-design@claude-plugins-official": true,
    "superpowers@claude-plugins-official": true,
    "code-review@claude-plugins-official": true,
    "typescript-lsp@claude-plugins-official": true,
    "gopls-lsp@claude-plugins-official": true,
    "pyright-lsp@claude-plugins-official": true
    },
    "includeCoAuthoredBy": false
    }
  2. Enable “Write Common Configuration” for every provider. It is enabled by default, and these fields will be written automatically when switching.

  3. If proxy takeover is enabled and common configuration is lost, upgrade to v3.12.2, which fixes the BUG that prevented common configuration from being written back under a proxy.

  4. If the configuration is already lost, recover it from the default provider imported at first launch, where the original configuration is stored.

  5. If settings.json still differs from the UI after saving, check whether local proxy takeover is enabled at 127.0.0.1; third-party proxy software may block writes.

ToolClaude Code
Version3.11.0 存在写入问题;v3.12.2 修复代理接管下通用配置丢失;v3.16.2 仍有用户反馈
PlatformsWindowsmacOSLinux

This page is distilled from 29 real issues

Why did my plugin configuration disappear after switching providers?
CC Switch uses the “Common Configuration Snippets” feature. In the Common Configuration panel when editing a provider, click “Extract from Current Provider” to extract shared data such as enabledPlugins. Then enable “Write Common Configuration” when creating or switching providers to synchronize it automatically.
Is this a design issue or a bug? Can it modify only env without changing enabledPlugins?
This is intentional behavior described in the README FAQ. The live configuration file is generated from the selected provider configuration and is rewritten on switching; Common Configuration is the official retention mechanism.
My conversation cannot be retained after switching models. What should I do?
Claude Code reads env once at startup and does not hot-reload during execution. An env change reinitializes the session; the original conversation remains under ~/.claude/projects/<cwd>/ and can be continued with claude --resume.
Why is settings.json still generated in the default directory after I changed the configuration directory?
settings.json records the cc-switch path and must remain in the default location; otherwise, logic problems can occur.
After saving, the key becomes masked characters and I cannot see its original value. Is this intentional?
When local routing takeover is enabled, the backend replaces credential fields in the configuration file with masked strings. The real key remains only in the cc-switch database.
After manually editing settings.json, the current provider configuration in cc-switch also changed. Is that normal?
This is the current design to keep the live configuration consistent with cc-switch state. Copy the configuration before editing it to avoid directly changing the active 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.