Installed but cannot run in current environment, please check CC Switch
Quick fix
Upgrade to CC Switch v3.16.1+ to fix Windows cmd /C quote handling that misreports installed CLI as broken.
Symptom
Section titled “Symptom”已安装,但无法在当前环境中运行,请检查Installed but cannot run in current environment, please check
CC Switch v3.16.0 performs local environment checks on Windows by invoking the CLI's `--version` via `cmd.exe /C`. To prevent terminal windows from popping up, commit `f26a0113` changed direct execution to be wrapped with `cmd /C`, adding internal escaped quotes around the path, generating commands like `cmd /C "\"C:\Users\...\codex.cmd\" --version"`. `cmd.exe` fails to parse these nested quotes correctly, treating `"\"path\""` as a single filename. This causes version detection to fail, marking all installed tools as `installed_but_broken = true`, and the UI displays "Installed but cannot run in current environment, please check".
This issue affects all CLI tools (Claude Code, Codex, Gemini CLI, OpenCode, OpenClaw, Hermes). Some users also see interface garbled text, while others do not; the root cause is always failed version detection. The fix removes the internal quotes around the path: change `.args(["/C", &format!("\"{}\" --version", tool_path.display())])` to `.args(["/C", &format!("{} --version", tool_path.display())])`.
Upgrade CC Switch to v3.16.1 or later. This version fixes the `cmd /C` quote handling and restores Windows local environment checks.
Reopen Settings > About and observe if the local environment check shows version numbers and normal status. If it still shows "Installed but cannot run in current environment, please check", run `codex --version` or `claude --version` in the terminal to confirm the CLI itself is usable, then reply with version, OS, reproduction steps, and logs.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- Both codex desktop and claude desktop are installed, but neither is displayed. Does this only show CLI?
- Local environment checks only display CLI tools (Claude Code, Codex, Gemini CLI, etc.), not desktop applications.
- It runs fine in the terminal, why does cc-switch still report it cannot run?
- This is a Windows version detection bug in v3.16.0: an extra layer of quotes was added to the path in the `cmd /C` command, causing `cmd.exe` parsing to fail. Upgrade to v3.16.1 or later to resolve.
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.