Skip to content

Switching providers resets claude settings.json - Claude Code

Quick fix

Before switching, extract the current provider’s configuration in “General Configuration” and select “Write to General Configuration” for the new provider.

Error output
当有多个供应商,互相切换时会重置claude settings.json,虽然可以创建通用配置,但是随着claude code新增插件市场等,会产生新的配置。cc-switch只会更新当前选中的供应商,再次切换到其他供应商时,新配置就没了,除非每次有新配置产生,都及时同步到通用配置。期望能自动加载新配置到通用配置中,或者每次切换至替换已有的配置,而不是整体覆盖。感谢~
English translation

When multiple providers are available and you switch between them, claude settings.json is reset. Although you can create a general configuration, new settings are created as claude code adds features such as a plugin marketplace. cc-switch only updates the currently selected provider. When you switch back to another provider, the new settings are gone unless you promptly synchronize every new setting to the general configuration. The expectation is to automatically load new settings into the general configuration, or to replace existing settings on every switch rather than overwrite the entire file. Thanks~

This cluster incorrectly combines several distinct “live configuration/import synchronization” issues that cannot share one fix. When Claude Code switches providers, it fully writes `~/.claude/settings.json`; maintainers said field-level merging caused state conflicts, so shared plugin, hooks, and similar settings must be passed between providers through “General Configuration”. When the current provider is re-enabled, manual changes may also be overwritten by an older configuration stored in the database; the provider edit feature reads the live file configuration.

The remaining reports are variants involving other applications or mechanisms: atomic replacement failure on a WSL path, delayed Claude Code extension-toggle synchronization, repeated import of the `default` provider when Codex starts, missing import of Gemini CLI JSONL sessions, continued live-configuration writes after OpenClaw is hidden, and plaintext credential storage. These issues cannot be resolved with the General Configuration steps. Codex repeated import was reported fixed in v3.15.0, and Claude Code extension-toggle synchronization was reported fixed in v3.13.0.

  1. After changing Claude Code plugins, hooks, or other shared settings, edit the current provider and click “Extract from Current Provider” in the “General Configuration” panel.

  2. When creating or switching providers, select “Write to General Configuration” (maintainers stated this option is selected by default) to pass shared settings such as plugins and hooks.

  3. If you need to update the configuration saved for a provider after editing it manually, use the provider edit feature to read the live file configuration.

ToolClaude Code
VersionUnknown
PlatformsWindowsmacOS
Will manually changed settings be lost after re-enabling the current provider?
Yes. The report says manual changes may be overwritten by the older version stored in the database when the current provider is re-enabled; maintainers recommend using the edit feature to read the live file configuration after manual updates.
Why can the extension still not connect after enabling “Apply to Claude Code extension”?
This issue was reported in v3.12.3. Maintainers stated it was fixed in v3.13.0; after upgrading, this toggle should immediately synchronize the current provider settings when enabled.
Will its configuration still be written after OpenClaw is hidden?
The report shows `visibleApps.openclaw=false` only hides the UI and may still synchronize and write `~/.openclaw/openclaw.json`; this issue did not provide a confirmed fix.

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.