'/d' is not recognized as an internal or external command: Claude Code
Quick fix
On Windows, first avoid choosing a Chinese working directory; the issue is not confirmed fixed, so verify the actual directory after startup.
Symptom
Section titled “Symptom”'/d' is not recognized as an internal or external command,
operable program or batch file.When launching Claude Code via CC Switch's "Open Terminal" on Windows and selecting a Chinese working directory, the temporary batch script's line-ending and encoding handling makes the `cd /d` command fail to parse, so the terminal cannot enter the selected directory. Reports indicate the script mixes LF with CRLF, and Chinese paths written as UTF-8 may be misinterpreted by the default GBK code page.
Reports are inconsistent for pure English directories: one report says English directories launch normally, while another says the command may not error but still fails to switch directories. Therefore, an English directory is only a temporary workaround to avoid the error; after startup, still check the current working directory.
In the directory picker of "Open Terminal", temporarily choose a pure English path as the working directory; if you still need a Chinese directory, first enter it manually in the terminal and then run Claude Code.
Confirm the terminal's current directory is indeed the selected project directory; if it still reproduces, add the CC Switch version, Windows version, default terminal, and reproduction path in the original issue.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- Is there still a plan to fix this bug now?
- In existing discussions, users still report the issue is unfixed, and no released fixed version was provided.
- Why might there be no error when choosing an English working directory?
- One report indicates `cd /d` may be silently swallowed by the script parsing issue: Claude Code starts in the current directory but never enters the selected directory.
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.