Where Are CC Switch Configuration Files? Fix Claude Code, Codex, and MCP Changes That Do Not Apply

When a Provider, MCP, or Skill change in CC Switch does not apply, troubleshoot the active configuration, target tool, process restart, and sync conflicts in that order.

When a CC Switch change does not take effect, the most common cause is not that it failed to save. The file you are inspecting, the client currently running, and the live configuration written by CC Switch may not be the same. Do not delete configuration first; find the source that is actually active.

Distinguish three kinds of configuration

  • CC Switch data: Provider records, sync, backups, and management metadata.
  • Target-tool live configuration: the settings Claude Code, Codex, and other tools actually read when starting.
  • Project-level configuration: repository-specific MCP, environment variables, or instructions that can override user-level settings.

CC Switch is intended to write or read back a target tool’s live configuration, but actual paths can vary by tool, operating system, and version. Do not copy a fixed directory from the internet. Check the currently selected tool in CC Switch, then verify it with the target CLI’s settings output or logs.

Troubleshooting order when changes do not apply

  1. Confirm that the intended Provider, MCP, or Skill is saved in CC Switch and that the correct workspace is selected.
  2. Fully close the target CLI and every related terminal, then start them again. Many CLIs do not hot-reload Provider settings.
  3. Check whether a project file or environment variable overrides the user-level setting.
  4. Inspect the MCP server’s own logs; it may be loaded but fail to start.
  5. If cloud sync is enabled, confirm that another device has not written back an older version.

Do not hand-edit and let sync overwrite it

You can compare a backed-up configuration during troubleshooting, but avoid editing the same item simultaneously in CC Switch, a text editor, and a sync folder. Pause sync, export or back up the current configuration, make one minimal change, restart and verify it, then restore sync.

API keys, MCP commands, and local paths can be sensitive. Redact them before sharing screenshots or logs. See the CC Switch guide for Provider, cloud-sync, and backup details. If an MCP call itself returns an error, continue with MCP tool-call troubleshooting.

Summary

When CC Switch changes do not apply, confirm where it wrote, what overrides it, whether the process restarted, and whether the service starts. A minimal verification is safer than reinstalling everything or deleting configuration.

Start with a configuration-source inventory

Before debugging, list every potential source: the current CC Switch record, user-level target-client configuration, project configuration, terminal environment variables, system environment variables, and cloud-sync copies. Do not assume the last file you edited is the active one; many CLIs read environment variables at startup, while project settings can override user settings.

Item What to record
Current client Name, version, and launch method
Current workspace Repository root and trust state
Provider Base URL and model alias, never the full key
MCP Server name, command, and startup-log location
Sync Whether it is enabled and the last device synced

When a Provider did not switch

Use target-client request logs or server logs to confirm the endpoint actually contacted. If it is still the old address, investigate write failures, overrides, or a process that was not restarted. If it is the new address but fails, check the new Provider’s key, model name, and service status. Separating those cases avoids changing the wrong layer repeatedly.

Also watch for old terminal windows. A running shell can retain old environment variables even after CC Switch updates system settings. Close it, open a clean terminal, and run a minimal request.

When an MCP change did not apply

MCP has two gates: whether the client reads the configuration, and whether the server can start. If the server is absent from the tool list, configuration was not loaded or is invalid. If it appears but calls fail, inspect its command, working directory, dependencies, port, and stderr log.

On Windows, paths with spaces, nested quotes, or Node/Python executables from different environments are common causes. Do not put a long untested shell command into configuration; run it alone in the same terminal first.

How to recover safely

If configuration is already confused, export or copy the readable state and pause cloud sync. Remove only a test item you know is managed by CC Switch, leaving unrelated tool configuration intact. Create one simple Provider or MCP server, verify write, restart, and call behavior, then import old content gradually.

FAQ: Can I delete every configuration directory?

It is not recommended. You can lose key references, MCP settings, sessions, and project preferences that are hard to reconstruct. Back up first, identify ownership, and recover with the smallest possible change.

FAQ: Why does switching behave differently on another computer?

Check sync versions, client versions, and system environment variables first. Sync copies files; it does not guarantee identical local models, paths, executables, or permissions.

记录并分享
Built with Hugo
Theme Stack designed by Jimmy