Several installations detected, or shown as not installed - Codex/OpenCode
Quick fix
Upgrade CC Switch to v3.17.0 or newer, fixing npm path resolution on Windows and the wrapper script misdetection.
Symptom
Section titled “Symptom”检测到多处安装
命令行实际使用标「默认」的那处;升级可能写到了别处。Several installations detected. The command line actually uses the one marked "default"; the upgrade may have written somewhere else.
On Windows, CC Switch tool detection has two defects: 1. Version detection does not use standard PATH resolution (the `where` command) but scans the process-level PATH directly. If you customised the `npm prefix`, the GUI process cannot see the full shell PATH, so a tool installed under the custom path shows as "not installed". 2. A global npm install on Windows generates both a Unix shell script (no extension) and a Windows batch file (`.cmd`). Older versions mistook those two wrappers pointing at the same target for "several installations", and a defect in the path comparison logic wrongly marked the unrunnable Unix script as the "default".
Note: #1768 in this cluster concerns a wrong default endpoint in the New API usage query on macOS — a separate UI template problem tracked and fixed elsewhere.
Upgrade CC Switch to v3.17.0 or newer. That version fixed npm global install path resolution on Windows and filters out the extension-less Unix wrapper script to remove the misdetection.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 4 real issues
- Why does Claude Code detect fine while Codex and OpenCode show as not installed?
- Claude Code is usually installed into the default directory by a native script, while Codex/OpenCode mostly come from a global npm install. With a custom npm prefix, older CC Switch cannot resolve the Windows shell PATH correctly and only detects tools in the default path.
- The built-in New API usage query default endpoint points somewhere wrong. What now?
- A separate problem (#1768): the older template pointed at `/api/user/self`. It is tracked under #1857 — upgrade CC Switch to the latest version for the correct `Base URL + API Key` usage query template.
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.