Skip to content

切换路由状态失败:{{detail}} - cc-switch

Quick fix

Upgrade to v3.16.2 or later. The route panel then shows the real backend error detail.

Error output
切换路由状态失败:{{detail}}
English translation

Failed to switch route state: {{detail}}

Before cc-switch v3.16.2, when ProxyPanel failed to switch the Claude Code route, it did not pass the backend error detail into the message. The i18n string “切换路由状态失败: {{detail}}” therefore showed the literal {{detail}} placeholder. The route switch on the main screen used another code path that already passed the value correctly, so it could show the real reason, for example “切换路由状态失败: Claude 配置文件不存在”.

The issue was fixed in v3.16.2 (#3656, commit ce538265). After the fix, both paths inject the real backend error detail and show consistent messages. If the local .claude folder or Claude config file is missing, upgraded users should see the specific reason instead of {{detail}}.

  1. Confirm the current cc-switch version is earlier than v3.16.2 and reproduce the “切换路由状态失败:{{detail}}” message in the route panel.

  2. Upgrade cc-switch to v3.16.2 or later.

  3. Toggle the Claude Code route in the route panel again and confirm the message now shows the real error detail, for example “切换路由状态失败: Claude 配置文件不存在”.

  4. If the message says the Claude config file does not exist, check whether the local user directory has the .claude config directory or config file required by Claude Code. If it is missing, initialize or configure Claude Code first, then switch the route.

Toolcc-switch
Version< 3.16.2(v3.16.2 修复)
PlatformsWindows

This page is distilled from 1 real issues

Why does the main-screen route switch show the real reason while the route panel shows {{detail}}?
They use different code paths. The route panel did not pass the backend error detail into the message, so the {{detail}} placeholder was shown literally. The main-screen path already passed the value correctly.
Which version fixes this?
Upgrade to v3.16.2 or later. The maintainer confirmed the issue was fixed in v3.16.2 by #3656.
What should I do after seeing “Claude 配置文件不存在”?
This means the real backend error is that the Claude Code config file does not exist. Ensure the local Claude Code config directory or config file exists, then switch the route 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.