'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.
Symptom
Section titled “Symptom”'claude' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
找不到批处理文件。'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.
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.
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.
Confirm that entering claude directly in a clean PowerShell starts normally, to rule out Claude Code installation or environment variable problems.
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.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 31 real issues
- #406Claude Code 重大更新,现在可以热切换供应商了,无需再重启终端
- #2653支持window wsl上安装吗 是安装Linux方式去安装即可?
- #2150更新v3.13后,打开终端功能变成打开资源管理器了?
- #60libwebkit2gtk-4.1-0的依赖可以降低吗?
- #947claude code显示已经安装skills,但switch skills管理这里不显示
- #3638路由模式下“打开终端”按钮使用的配置文件不正确
- #2149请问能支持WSL下openclaw的API切换和管理吗
- #2668可以直接在终端使用吗?
- #2036点击终端按钮无法唤起终端(设置中已配置)
- #2305Windows 下生成的 .bat 文件编码问题导致含中文的路径无法识别
- #1079裝了CC switch 但是在Terminal 啟動不了
- #3344[Bug] Windows 下检测/启动 claude.exe 时命令带外层单引号,cmd 报 "is not recognized
- #4039WSL2里面通过运行CC-Swich时,切换到“关于页”,进程会进入“Stoped”状态
- #1015用cc switch切换api后,插件有时候会消失掉
- #1877mac下不能全局配置文件,必须要手动在工具上点打开终端,才能显示配置模型
- #2051windows版更新到最新版后,点击打开终端弹出来的是文件浏览器而不是终端
- #3272Windows环境设置默认终端为Powershell,总是打开Windows Powershell而不是Powershell(pwsh),即便我已在系统内设置了默认终端程序是pwsh
- #3877又是某一供应商打开终端问题
- #2589Ubuntu 26.04无法打开终端
- #2565cc-switch如何管理hermes多智能体配置文件
- #3271Windows环境设置默认终端为Powershell,总是打开Windows Powershell而不是Powershell(pwsh),即便我已在系统内设置了默认终端程序是pwsh
- #3460升级到3.16后打开终端显示'claude' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
- #4526Remote-WSL适配问题,在VScode远程环境下无法跳过Claude登录
- #4818Claude Code 无法在运行环境 Windows + 项目路径 WSL 的情况下跳过 GUI 模式下的 VS Code 插件登录
- #5322[Bug] v3.16.5–v3.17.0: Windows Terminal ignores the default profile and hardcodes cmd
- #2421macOS 下点击“打开终端”按钮无反应
- #2496会话位置bug
- #3085关于ccswitch 配置 我觉得ccswitch 有点问题就是 不能给某个终端单独热加载配置 之类的 有没有佬友有好的方案
- #3630使用D:\Program Files\ 为开头的项目文件夹违法他用过打开终端按钮直接打开
- #3907xfce4 中无法打开终端
- #6702GLM5.2 openAI网关通过路由接入CC,reasoning_content缺失,没有回传,有办法解决吗?
- 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.
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.