Skip to content

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

Quick fix

Manually specify the full path to the claude executable in CC Switch settings, or ensure the path is added to 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.

The "Open Terminal" feature in CC Switch generates a temporary .bat script that calls the claude command to launch Claude Code. When the system environment variable PATH does not include the directory containing the claude executable, cmd.exe reports an error because it cannot find the command. This is especially common on Windows, because the claude installation path (e.g., C:\Users\<user>\.local\bin) may not have been correctly added to PATH, or the script generated by CC Switch may not inherit the complete user environment variables during execution. In addition, some versions (e.g., v3.16.0 - v3.16.1) have a command concatenation bug: the path is wrapped as '"...claude.exe"' (single quotes wrapped outside double quotes), and cmd.exe does not recognize single quotes, causing an error even when the path is correct.

  1. Verify whether typing claude directly in a normal PowerShell can start it normally. If it can, the issue is caused by missing environment variables in the CC Switch script or a path concatenation bug; if not, you need to fix the system PATH first.

  2. Look for an option in CC Switch settings to specify the path to the claude executable, and manually enter the full path (e.g., C:\Users\<user>\.local\bin\claude.exe).

  3. If there is no related option in settings, try adding the directory containing claude to the Windows system environment variable PATH, and restart CC Switch.

ToolClaude Code
Version3.16.0 - 3.17.0
PlatformsWindows
Why can I use claude normally in a normal PowerShell, but CC Switch reports an error when opening a terminal?
When CC Switch generates a temporary script to launch a terminal, it may not inherit the complete user environment variables, or there may be a path concatenation bug (e.g., v3.16.0 added an extra layer of single quotes around the path, causing cmd.exe to fail to recognize it).
After upgrading to v3.16, this error suddenly appeared. Is it a version bug?
Yes, versions v3.16.0 and later introduced a quoting issue during command concatenation, causing the path to be wrapped as '"...claude.exe"', which cmd.exe cannot parse correctly. It is recommended to follow official updates or try manually specifying the full path.

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.