Skip to content

General config has no effect and gets overwritten by earlier config - Codex CC Switch

Quick fix

Upgrade to CC Switch v3.17.0+ to fix Codex general-config merging. If an old snapshot still overwrites it, switch to another provider and back to self-heal.

Error output
通用配置勾选不生效
English translation

Ticking the general config option has no effect

Root cause: older CC Switch ran parse → merge → stringify over the whole Codex `config.toml` in the front end using smol-toml. That path handles nested tables such as `[mcp_servers.<id>.tools.<tool>]` badly, losing comments and scrambling key order, so what gets written after ticking 通用配置 (general config) is stripped or overwritten (#2656). On top of that, CC Switch treats the provider snapshot (`providers.settings_config.config`) and the `mcp_servers` table as the source of truth and writes them back to the live `~/.codex/config.toml` when you switch provider, restart, or take over local routing — so MCP entries, plugins, and desktop settings you later changed or deleted in Codex get resurrected from the old snapshot (#956/#4697/#4699/#5149/#5049).

These reports are not all one bug. v3.17.0 moved merging to toml_edit in the backend and fixed the nested-table problem for general config, but #6344 still reports on 3.19.2 that the MCP panel toggle does not write `[mcp_servers]`, so the MCP write path is not fully covered. #1440, where v3.12.0/3.12.1 wiped the config down to just base_url, is a separate earlier path. Other variants: a model catalogue missing the `model` field or the `models` array so /model shows nothing (#3668/#4970/#4971); `model_provider` forcibly rewritten so session history is lost (#2844, fixed in v3.16.0); and the 1M context being read from the catalogue rather than the top-level config (#2614).

  1. Upgrade to CC Switch v3.17.0 or newer, which fixes the old smol-toml merge that broke Codex general config.

  2. If an old provider snapshot still overwrites it after upgrading, switch to another Codex provider and then back to the current one, which triggers snapshot self-healing on `providers.settings_config` and strips the stale `[mcp_servers]`.

  3. In the CC Switch MCP panel, delete historical MCP entries you have already uninstalled (codegraph, for example) so they are not written back on every save.

  4. If you need to keep Codex plugins or desktop settings, import them into 通用配置 (general config) by hand rather than relying on the live `~/.codex/config.toml` alone.

ToolCodex
Version3.12.0 - 3.19.2(受影响范围;v3.17.0 修复通用配置合并路径,MCP 面板写入问题在 3.19.2 仍报告)
PlatformsWindowsmacOS

This page is distilled from 21 real issues

I ticked general config and it does nothing — my hand-written config is still stripped after every switch. What now?
Upgrade to CC Switch v3.17.0 or newer. If it still misbehaves, switch to another provider once and back to the current one to trigger the stale snapshot cleanup.
Why does an MCP I deleted in Codex come back after saving?
Because the CC Switch MCP panel still holds the entry and rewrites it on every save. Delete it in MCP management, then save again.
My Codex plugins disappear after switching provider. How do I keep them?
Import the plugin config into CC Switch 通用配置 (general config) by hand so it is stored in the database; only then is it restored after a switch or restart.
Why is there only a base_url left in config.toml after upgrading?
That is an early write problem in v3.12.0/v3.12.1, fixed in v3.16.1+ or v3.17.0. If it persists, check whether general config has any content and save it again.

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.