Skip to content

'claude' is not recognized as an internal or external command - CC Switch

Quick fix

Configure the full claude.exe path in CC Switch settings, or ensure claude is on the system PATH.

Error output
'claude' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
找不到批处理文件。
English translation

'claude' is not recognized as an internal or external command, operable program or batch file. Cannot find batch file.

On Windows, this has several combined causes. The core issue is that CC Switch starts claude in a terminal through a generated .bat file, but that batch file cannot find the claude command in PATH. In some versions, such as v3.16.0, CC Switch added extra outer single quotes around the quoted claude.exe path when building the command, and cmd.exe does not recognize single quotes, causing the error. Also, if the project path contains Chinese characters or spaces, such as D:\Program Files\, the .bat file's UTF-8 encoding can conflict with the cmd GBK code page, or the path may lack double quotes, causing cd to fail and preventing claude from starting in the correct directory. In routing mode, clicking "Open Terminal" uses an independent configuration and does not apply routing rules, which can also cause a configuration mismatch.

  1. In CC Switch settings, check and configure the full absolute path to claude.exe. Make sure the path uses backslashes, is wrapped only in double quotes, and has no outer single quotes.

  2. If the project path contains Chinese characters or spaces, try moving the project to a path with only English characters and no spaces to avoid .bat file encoding problems.

  3. Confirm that entering claude directly in a clean PowerShell starts normally, to rule out Claude Code installation or environment variable problems.

  4. If you use routing mode, note that the CC Switch panel's "Open Terminal" is an independent launch feature and does not use the routing configuration. To use routing, start claude manually from a system terminal.

ToolClaude Code
Version3.14.1 - 3.16.1
PlatformsWindowsLinuxmacOS

This page is distilled from 31 real issues

Why can claude run in a clean PowerShell, but CC Switch's Open Terminal reports an error?
CC Switch starts claude by generating a .bat file. The .bat execution can fail because of path quoting during command construction, Chinese characters or spaces in the project path, or an incorrectly configured claude path.
What should I do if the project path contains Chinese characters or spaces and startup fails?
Move the project to a path without Chinese characters or spaces, or wait for CC Switch to fix the .bat file encoding and path quoting problems.
Is it a bug that clicking "Open Terminal" in routing mode uses the wrong configuration?
According to the maintainers, this is expected design. CC Switch's "Open Terminal" launches the selected channel configuration separately and is not tied to proxy or routing.
This problem appeared suddenly after upgrading to v3.16. How do I downgrade?
Some users reported that v3.16.0 introduced the extra outer single-quote path bug. Consider downgrading to v3.15.0 or waiting for an official fix.

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.