cc-switch config not applied / not picked up after switching - Claude Code / Codex
Quick fix
Confirm the app actually reads the config path cc-switch writes to, then check routing and plugin toggles, duplicate keys, and version compatibility.
Symptom
Section titled “Symptom”切换对 Claude Code for VS Code 不生效 。
最新版的Claude Code for VS Code 使用GUI启动了,不再通过命令行启动,配置env好像不生效了。Switching has no effect on Claude Code for VS Code. The latest Claude Code for VS Code launches from a GUI rather than the command line, and the env config no longer seems to apply.
This cluster covers several different "config not applied" scenarios, and the root causes are not the same:
1. The config path cc-switch writes to does not match the one the target app actually reads. Hermes on Windows reads %LOCALAPPDATA%\hermes while older cc-switch wrote to ~/.hermes; WSL and Windows do not share one Claude Code config; a newer Claude Desktop may no longer read from the original Claude-3p/configLibrary path. 2. When switching provider or in routing mode, cc-switch rewrites the target config file, so fields you added by hand get overwritten or lost — hooks, coworkEgressAllowedHosts, supported_reasoning_levels inside cc-switch-model-catalog.json, and so on. 3. After the target app or the upstream format changes, the fields cc-switch generates are no longer recognised. The 1M context declaration stopped working after a Claude Desktop update and claude-opus-4-8 has to be rolled back to claude-opus-4-6; a Codex model catalogue with no reasoning-effort declaration degrades to none/high. 4. The config itself conflicts, or a feature toggle is off. Duplicate keys make saving fail, Claude Code for VS Code needs the 应用到Claude插件 (apply to the Claude plugin) option ticked, and special Codex TOML fields such as startup_timeout_sec could not be written correctly through the UI in older versions.
Confirm which config file the target app actually reads. On WSL, point cc-switch at the config path inside WSL under 设置 > 高级 > 配置文件目录 (Settings > Advanced > Config directory); Windows and WSL do not share one config.
If Claude Code for VS Code is not picking up the change, tick 应用到Claude插件 (apply to the Claude plugin) in cc-switch settings, then restart VS Code and the Claude plugin.
If saving or switching reports a duplicate key, clean up the duplicated key names in the provider or model mapping first, then save again.
If the 1M context stopped working after a Claude Desktop update, edit claudeDesktopModelRoutes in the cc-switch database as a stopgap, changing claude-opus-4-8 to claude-opus-4-6, then restart Claude Desktop.
.cc-switch/cc-switch.db # 在 claudeDesktopModelRoutes 字段中:# 将 claude-opus-4-8 改为 claude-opus-4-6If Hermes is not picking up config on Windows, upgrade cc-switch to v3.16.5 or newer. That version resolves the config directory as HERMES_HOME first, then the platform default path.
If Codex reasoning effort is down to none/high only, do not add mapped models by hand when adding a third-party Codex provider — let cc-switch use its default full model config. If you need supported_reasoning_levels, note that switching provider may overwrite that file.
If you have edited the Claude Code config by hand (hooks, for example), avoid switching straight from routing mode back to non-routing mode; that transition can currently lose your manual edits. Back the config file up first.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 28 real issues
- #113切换对 Claude Code for VS Code 不生效
- #831codex的startup_timeout_sec参数无法手动设置
- #1246cc-switch 如何完全删除
- #1338配置被篡改 claude code
- #1994代理模式下模型映射失败 请求异常注入
- #2735sswitch界面切换模型不生效问题
- #2736linux版本右上角关闭、放大、缩小按钮都不生效
- #3136Claude Desktop 配置会覆盖 coworkEgressAllowedHosts,导致 Code 会话远程 Git/网络沙箱不可用
- #3168herms 有问题
- #3236我的妈呀点哪都抱错
- #3406hermes配置文件路径问题
- #3581用ccswitch登录codex后,不显示原先的会话记录?
- #3592Codex 应用增强功能不生效
- #3751通过deeplink `ccswitch://v1/import` 导入 Codex provider 时,部分配置丢失
- #4421Claude desktop更新后1M上下文配置不生效
- #4547macos 版本打开自动云同步以后,每天第一次打开应用都会进行一次同步
- #4756OpenCode,OMO配置无法添加自定义subagent、无法添加fallback_models等配置、json修改无法保存等
- #4842新版claude code desktop貌似不从 3P 配置目录读取和存储配置文件了
- #5029mcp共享是不是有问题
- #5259ccswitch 生成的模型目录中推理强度只声明了 none 和 high
- #5467选择了统一Codex会员历史不生效
- #5850claude开启路由配置gpt模型,但是wsl系统内配置文件未生效
- #5941codex代理不生效
- #6021claude code 路由模式时,通用配置丢失
- #6034claude code 路由中 OpenAl Chat Completions模型不起作用
- #6090开启路由的时候没有上下文窗口信息
- #6244切换供应商cc-switch-model-catalog.json不留存
- #6588不知道是不是我的问题,我已经试过了我能重启的所有办法,且无数次确认上下文设置已经保存,但responses下的5.6sol更改1m上下文就是不生效,反而terra和luna可以
- Why doesn't Claude Code for VS Code pick up a cc-switch switch?
- Tick 应用到Claude插件 (apply to the Claude plugin) in cc-switch settings first. If it still does not apply, confirm VS Code is using the environment variables and config path cc-switch writes to, then restart VS Code.
- Why do hooks, general settings, or coworkEgressAllowedHosts I added by hand get overwritten?
- cc-switch rewrites the target config file when you switch provider or routing mode, and some fields are currently not preserved. Back the config up before switching, or wait for cc-switch to support merging user-defined fields.
- The 1M context config stopped working after a Claude Desktop update. What now?
- As a stopgap, edit claudeDesktopModelRoutes in .cc-switch/cc-switch.db, change claude-opus-4-8 to claude-opus-4-6, and restart Claude Desktop.
- Why doesn't the Claude Code config inside WSL update?
- Windows and WSL do not share one config file. Point cc-switch at the config path inside WSL under 设置 > 高级 > 配置文件目录 (Settings > Advanced > Config directory).
- Why can't Codex's startup_timeout_sec be set through cc-switch?
- In older versions the Codex config file format is unusual and some custom fields could not be written correctly through the UI. A maintainer said a sizeable refactor is needed. The stopgap is to not manage that MCP field with cc-switch, or to edit the Codex config by hand.
- Why is Codex reasoning effort down to none and high only?
- The model catalogue cc-switch generates may not declare low/medium/high/xhigh. When adding a third-party Codex provider, do not add mapped models by hand — let cc-switch use its full default config. Editing cc-switch-model-catalog.json by hand may be overwritten after switching provider.
- How do I remove cc-switch completely?
- Delete the cc-switch app itself and clean up its config directories by hand, for example ~/.cc-switch and ~/.codex. Session history usually lives in ~/.codex and is unrelated to cc-switch itself.
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.