Switching with cc-switch has no effect - Codex
Quick fix
Codex does not hot-switch. Restart the Codex app completely after switching relay in cc-switch; a migration tool can recover lost sessions.
Symptom
Section titled “Symptom”在不关闭codex app的情况下用cc-switch切换, 发现无效Switching with cc-switch without closing the codex app has no effect
This is mainly because the Codex app itself does not support hot switching config. After switching relay in cc-switch, without restarting Codex it keeps its connection to the old relay vendor and the switch does nothing. Restarting Codex directly then loses your earlier session records, because session data is bound to the specific relay vendor config.
Note the cluster also holds other config-not-applying variants: Claude Code losing settings.json plugin config after switching relay; the skip-first-install confirmation not being written under WSL; and front-end cache overwriting the usage query config. All of them come down to the config directory not syncing correctly, or front-end state not refreshing, when switching relay.
After switching relay in cc-switch, close and restart the Codex app completely so the new relay config applies.
If earlier sessions disappear after the restart, clone and use the community codex-provider-history-migrator tool to recover the history.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 4 real issues
- Why did my Claude Code plugin and settings config disappear after switching relay?
- Creating a relay overwrites or resets the config directory. Migrate enablePlugins and other settings from settings.json in the original relay directory into the newly configured relay directory by hand.
- Why does entering Claude Code after switching relay under WSL still ask for first-install verification?
- A known problem under WSL where cc-switch does not write the rule that skips the first-install confirmation automatically. Write the rule into the JSON config file by hand.
- Why does editing the usage query config for several relays overwrite the form with the last one?
- A front-end cache problem: in early versions, editing usage query config showed the last edited config rather than the current relay. Fixed in later versions.
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.