Migrate from CC Switch to magpie: import scope and old Codex sessions (November 2026)
As of 2026-11-10, magpie's README says Import brings in providers from CC Switch, Claude Code, Codex and Alma. To migrate: install magpie, open Providers, press Add provider then Import…, tick the providers to bring over, and pick models for Claude Code and Codex on the Agents page. If old Codex sessions are missing, use "Move to magpie…" under Sessions → Codex. magpie's author said on X on 2026-11-09 that CC Switch's config can be imported in one click and that using both also works. If QCode is already set up in CC Switch, check the anthropic, chat and responses addresses after importing.
Updated 2026-11-10
Point this tool at the QCode endpoint — one key for Claude, GPT and Chinese models.
- Billed per token — live rates on /models
- Pay by card (Visa / Mastercard), Apple Pay, Google Pay or crypto
- Self-service: top up and activate instantly
Four points from the official sources
CC Switch is an import source
magpie's README: Import brings in the providers from CC Switch, Claude Code, Codex and Alma. When you open the Providers page, magpie also checks those apps for local configurations it can import, and nothing is added until you confirm your selection.
Old Codex sessions can be moved over
Issue #887 reported that old Codex sessions drop out of view after moving over from CC Switch. magpie's author replied on 2026-10-05 that from v0.1.999, Sessions → Codex can move them to magpie by hand, changing only each session's provider marker while messages, session IDs, titles and archive state stay as they are. The issue was closed as completed on 2026-10-14.
CC Switch's Codex session grouping
CC Switch v4.0.28 (2026-11-08) says that from Codex desktop 26.1103 and CLI 0.167, sessions from the official subscription and from third-party providers are now fully split; you can use Routing or Aggregation mode, or turn on "Unified Codex session history".
Author: using both also works
magpie's author, yetone, replied on X on 2026-11-09 (in Chinese) that CC Switch's config can be imported in one click, that using both also works, and to try it before deciding. He puts the difference in where requests go: CC Switch mainly edits each agent's config, while magpie is a local gateway that every agent connects to.
What does moving from CC Switch to magpie involve?
As of 2026-11-10, the move comes down to four things: install magpie, use Import… to bring in your providers from CC Switch, pick a model for each client, and deal with old Codex sessions. What comes over is provider configuration, as a copy: magpie's docs say later changes in the source app are not copied again. Once you pick models, magpie writes them into each client's own config file: Claude Code connects to the local gateway at 127.0.0.1:3425, and Codex's config.toml gains a [model_providers.magpie] table. Only new sessions use the new settings, and the magpie gateway has to be running. Old Codex sessions are covered below.
2026-11-08: CC Switch v4.0.28 adapts to Codex's new session grouping
CC Switch v4.0.28 was published on 2026-11-08, and its release notes say it mainly deals with Codex's incompatible update of November 8. They state that Codex records sessions by provider ID: the official subscription is recorded under the built-in openai, and third-party providers written by CC Switch under custom. The new Codex can only continue sessions in the same group as the current provider; the other group is read-only, and continuing one reports "model provider mismatch". On magpie's side, the Sessions page flags the same thing: it says how many Codex sessions were made with another provider (such as custom) and no longer show in Codex's history, and offers to move them (see below).
Timeline
magpie issue #887: old Codex sessions used through CC Switch no longer show in Codex's history after connecting to magpie, and the reporter asks for a manual migration under Sessions → Codex. The author replies the same day that it has been added.
CC Switch v4.0.28 is published, adapting to session groups in the new Codex.
magpie's author explains the difference between the two tools on X and says CC Switch's config can be imported in one click and that using both also works.
What the docs state, and what they leave open
Documented by the projects
① README: Import brings in providers from CC Switch, Claude Code, Codex and Alma. ② Reference: when you open the Providers page, magpie checks Alma, CC Switch, Claude Code and Codex for local provider configurations that can be imported, and nothing is added until you confirm the selection; providers turned off in their source app and entries whose IDs collide are left out of the automatic hint but stay available through manual import. ③ Providers brought over are copies; later changes in the source app are not copied again. ④ After you pick models, magpie writes them into each client's own config file and touches only the keys it needs: for Claude Code that is ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and the model variables in the env block of ~/.claude/settings.json, and for Codex a [model_providers.magpie] table in ~/.codex/config.toml. ⑤ A running session keeps the model it started with and the next session uses the new settings; for Codex, restart the app too. ⑥ To go back, run magpie claude default and magpie codex default; magpie removes what it wrote and restores the values it replaced, such as an ANTHROPIC_BASE_URL you had before. ⑦ To uninstall, use the official command curl -fsSL https://usemagpie.ai/install.sh | sh -s -- --uninstall; magpie disconnects every client and puts back what each had first, your settings and providers stay in ~/.config/magpie, and --purge deletes them too.
What the docs leave open
As of 2026-11-10: ① magpie's README and docs say Import brings in providers; they do not itemize which fields come from CC Switch, or whether CC Switch's failover queue, Routing or Aggregation settings, MCP servers, Skills and Prompts come over. Decide in CC Switch which of these you still need before you move, and check each one in magpie after importing. ② For using both tools together there are no complete official setup steps; the author only says using both also works and to try it before deciding. ③ In his 2026-10-05 reply on issue #887 the author noted that this version had not yet been run against a real CC Switch history, only a Codex directory built for testing; the issue was closed on 2026-10-14 because no further feedback had come in since the release, and the author asked anyone still affected after updating to reply there. magpie's README, docs and reference do not mention the Codex 26.1103 session grouping.
Who does what, before and after
CC Switch (before)
README: switching replaces only the connection details (endpoint, key and model), and plugins, hooks, MCP and comments you added stay as they are. Direct connects the tool straight to the provider, Routing forwards requests through your machine, and there is also an Aggregation mode.
magpie (after)
README: the gateway at 127.0.0.1:3425 speaks OpenAI Chat, OpenAI Responses, Anthropic Messages and Gemini and translates between them; clients connect to the gateway and your key lives in magpie, in ~/.config/magpie/providers.json.
How to move from CC Switch to magpie
① Install: run curl -fsSL https://usemagpie.ai/install.sh | sh, or download the app from usemagpie.ai. ② Open Providers, press Add provider, then Import… at the top, tick the providers to bring over and confirm; the Providers page may also show an "Import local configurations" link, which likewise adds nothing until you confirm. ③ After importing, open the QCode entry and check its three addresses: anthropic https://api.qcode.cc/api, chat https://api.qcode.cc/openai/v1, responses https://api.qcode.cc/openai, filling in any that are missing; if there is no key, run magpie provider key qcode cr_xxx (qcode is the entry's id in magpie, as magpie providers lists it). ④ Pick models for your clients, for example magpie claude qcode/claude-sonnet-5-5 and magpie codex qcode/gpt-6.1-sol, then start a new session and restart the Codex app. ⑤ If old Codex sessions are missing, open Sessions → Codex, press "Move to magpie…" in the notice at the top of the list and confirm in the preview; the notice after the move has an Undo. ⑥ Keep the magpie gateway running; to go back to your previous setup, run magpie claude default and magpie codex default.
Using your QCode key after the move
As of 2026-11-10, one QCode key gives you both Anthropic- and OpenAI-compatible endpoints, billed per token, with per-model rates on /models. The three entries in magpie are: anthropic https://api.qcode.cc/api (Claude models go here, and Chinese models can too), chat https://api.qcode.cc/openai/v1 (GPT and Chinese models), and responses https://api.qcode.cc/openai (GPT). Three steps: ① register and top up (Alipay, WeChat Pay, cards, crypto and more); ② copy your API key, which starts with cr_; ③ if QCode was already set up in CC Switch, check the three entries above after importing, or press "Import to magpie" in the QCode dashboard; when magpie already has QCode, importing again does not replace the old key. The QCode docs article https://docs.qcode.cc/en/docs/ide/magpie has the full steps. Not ready for a monthly plan? Pay-as-you-go Packs start at $4 for a one-time quota you use within 7 days; if you already have a Personal Plan, add a booster pack when you need more quota. Details: /pay-as-you-go.
Frequently asked questions
Can magpie import my CC Switch config in one click?
It can import your provider configuration. magpie's README says Import brings in providers from CC Switch, Claude Code, Codex and Alma, and in Providers, under Add provider → Import…, nothing is added until you tick entries and confirm. Imported providers are copies, so later changes in the source app are not copied again. The author also said on X on 2026-11-09 that CC Switch's config can be imported in one click.
My Codex history disappeared after moving to magpie. What do I do?
Open Sessions → Codex in magpie, press "Move to magpie…" in the notice at the top of the list and confirm in the preview (available from v0.1.999). In issue #887 the reporter explained that they had used Codex through CC Switch, so old sessions carry model_provider custom; once Codex is connected to magpie its current provider is magpie, and Codex's default history list filters out sessions from the old provider, so the history looks gone while the session files are still there. The author replied on 2026-10-05: after you confirm, only the provider marker in the session files and in the threads table of state_*.sqlite changes, the originals are first backed up to magpie's trash folder, the notice has an Undo, sessions written to in the last minute are skipped, and nothing migrates automatically.
Can magpie and CC Switch be installed at the same time?
Yes. magpie's author wrote on X on 2026-11-09 (in Chinese) that using both also works and to try it before deciding. The two projects describe their own roles this way: CC Switch's README says switching replaces only the connection details (endpoint, key and model) in each tool's config; magpie's README and docs say clients connect to the local gateway at 127.0.0.1:3425, and magpie writes the model you pick into the client's own config file.
How do I go back to CC Switch after moving?
First run magpie claude default and magpie codex default: magpie removes what it wrote and restores the values it replaced, such as an ANTHROPIC_BASE_URL you had before. Then pick your provider in CC Switch again and switch. To uninstall magpie, run curl -fsSL https://usemagpie.ai/install.sh | sh -s -- --uninstall; it disconnects every client and puts back what each had first, your settings stay in ~/.config/magpie, and --purge deletes them. magpie's reference says the [model_providers.magpie] table stays in Codex's config.toml so that a thread started on magpie can still be opened.
Do I need to enter my QCode key again after moving?
First check whether the imported QCode entry has a key. magpie keeps keys in ~/.config/magpie/providers.json, readable by you alone, and its docs do not itemize what a CC Switch import carries over. If there is no key, run magpie provider key qcode followed by your cr_ key, or press "Import to magpie" in the QCode dashboard. When magpie already has QCode, importing again from the dashboard does not replace the old key, so change the key with the command above. Also check the three addresses: anthropic https://api.qcode.cc/api, chat https://api.qcode.cc/openai/v1, responses https://api.qcode.cc/openai.
If I only switch providers, is it worth moving?
Not necessarily. magpie's own comparison page says CC Switch fits when you mostly switch each tool between providers by hand and want its config left close to how you wrote it, and that magpie fits when you use several agents and want each on a different model. The author also says using both works, and to try it before deciding. For the trade-offs between the two tools, see our page “magpie vs CC Switch: how to choose”.
Sources
magpie: the README, docs/reference.md and the Sessions page's interface strings (internal/gui/assets/plugins/sessions/i18n.js) in the yetone/magpie repository on GitHub, the Get started, Add to magpie and comparison pages on usemagpie.ai, and issue #887 with its comments (GitHub API), all read on 2026-11-10. CC Switch: the README of the farion1231/cc-switch repository and the v4.0.28 release notes (Chinese, English and Japanese). The reply by magpie's author yetone on X on 2026-11-09, archived through fxtwitter. QCode: qcode.cc/models, qcode.cc/pricing and the magpie and Endpoints pages on docs.qcode.cc, retrieved on 2026-11-10.
Run Claude Code and Codex in magpie on one QCode key
Fill in the anthropic, chat and responses addresses and Claude, GPT and Chinese models all run on the same key; billed per token, with per-model rates on /models.
Related reading
Pay-as-you-go Packs
One-time quota packs valid for 7 days, no subscription; per-model rates are on /models.
magpie vs CC Switch: how to choose
Before you decide to move, see how the two differ in request path, clients and protocol translation.
magpie Claude Code setup: local gateway for Claude Code and Codex (2026-11)
magpie setup: install and uninstall commands, three ways to add a provider, picking models for Claude Code and Codex, and QCode's three addresses.
Crypto payment guide
Nine coins, 56 networks, zero platform fee for AI coding API credits.
Statements on this page were checked on 2026-11-10 against the official repositories and docs of magpie and CC Switch; the official pages prevail. Versions used for the check: magpie v0.1.3533 and CC Switch v4.0.28; menu names and options follow the version you install. QCode model availability follows /models.