Skip to content

Local Environment Check Fails: Claude Code / Codex / OpenCode

Quick fix

On Windows, upgrade to CC Switch v3.16.1 or later. The Ubuntu report linked only a fix PR and provided no verification result.

Error output
已经安装了相关的工具,但是在本地环境检查中不通过
English translation

The related tools are installed, but they do not pass the local environment check.

These reports involve installed CLI tools being missed or misidentified by the local environment check. The Ubuntu 24.04LTS report states that a shell session started with `sh -l` does not load user environment variables, so `codex` and `opencode` cannot be detected. It also states that Node paths managed by `fnm` through dynamic directory mounts leave fallback detection incomplete. The issue links a fix PR, but provides no post-fix verification result.

On Windows 11, Claude Code 2.1.159 was shown as installed but unavailable, although the user reported it worked normally. A maintainer stated that the issue was fixed or implemented in CC Switch `v3.16.0` / `v3.16.1`, and advised upgrading and providing more information if it remains reproducible.

  1. If Claude Code is incorrectly identified as unavailable on Windows, upgrade to CC Switch `v3.16.1` or later, then check again.

  2. If tools are installed on Ubuntu 24.04LTS but fail detection, verify whether the current shell session loads user environment variables and review the linked fix PR; the original report provides no verifiable solution or post-fix verification result.

ToolClaude Code / Codex / OpenCode
VersionCC Switch v3.16.0 / v3.16.1(维护者称已修复或实现)
PlatformsWindowsLinux
Could this be caused by a Chinese path?
A user raised the possibility of a Chinese path in the discussion, but another user said their case had no Chinese path. The original report did not confirm this as the cause.

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.