Claude Code no longer hot-reloads the env configuration in settings.json after switching providers
Quick fix
Restart Claude Code after switching so it reads settings.json again; clash-for-ai can avoid this limitation.
Symptom
Section titled “Symptom”现在切换后,`settings.json` 文件确实已更新,但 Claude Code 的 `/status` 仍显示旧的 URL,必须重启才能生效。After switching, the settings.json file has indeed been updated, but Claude Code’s /status still shows the old URL. A restart is required for it to take effect.
The original issue comments state that Claude Code does not hot-reload settings.json: it reads this configuration only once at startup. Therefore, although cc-switch has updated the file, Claude Code in the current terminal window still shows the old ANTHROPIC_BASE_URL.
After switching providers, restart Claude Code, then use /status to confirm whether the new ANTHROPIC_BASE_URL has taken effect.
To avoid this limitation, the original issue comments recommend clash-for-ai; the reporter replied that this solution met their needs.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- Is this a behavior change in a recent Claude Code version?
- The original issue did not confirm whether this was a recent behavior change; the comments only state that Claude Code reads settings.json once at startup and does not hot-reload it.
- Or does cc-switch need an adjustment to make Claude Code reload the configuration?
- The original issue provides no cc-switch adjustment that can trigger a configuration reload; the confirmed approach is to restart Claude Code.
Related problems
Section titled “Related problems”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.