Skip to content

windows下无法找到claude cli #400

Description

@samever7

如下图:
Image

实际claude cli已经安装:

E:\>claude --version
2.1.220 (Claude Code)

E:\>

诊断信息如下:

===== Codeg environment diagnostics =====
generated: 2026-07-31 11:56:28 +0800
agent: ClaudeCode
verdict [not_installed]: This agent does not appear to be installed.

Runtime

[-- ] os / arch: windows / x86_64
[-- ] app version: 0.22.2
[-- ] fix_path_env: no failure logged
↳ app imports the login-shell PATH at startup; a failure leaves a narrow GUI PATH
[-- ] PATH: 70 entries (full list in copied text)

Node / npm

[OK ] node: v24.13.0 (D:\Program Files\nodejs\node.exe)
[OK ] npm: 11.6.2 (D:\Program Files\nodejs\npm.cmd)
[OK ] npx: 11.6.2 (D:\Program Files\nodejs\npx.cmd)

npm global prefix

[-- ] npm prefix -g: C:\Users\q\AppData\Roaming\npm (373 ms)
[-- ] npm root -g: C:\Users\q\AppData\Roaming\npm\node_modules
[-- ] npm config get prefix: C:\Users\q\AppData\Roaming\npm
[-- ] cached prefix: C:\Users\q\AppData\Roaming\npm

Agent: Claude Code (npx)

[FAIL] claude-agent-acp (resolve_npx_command): NOT RESOLVED
↳ this is exactly what the new-session page checks
[-- ] package: @agentclientprotocol/claude-agent-acp@0.63.0
[-- ] <npm prefix -g>/bin/: absent
[-- ] ~/.codeg/npm-global/bin/: absent
[-- ] detect_npm_global_version: none
↳ covers both prefixes — what the Settings badge uses
[-- ] DB installed_version: none
[OK ] node_required: ≥ 22.0.0

Terminal comparison

[-- ] login shell probe: Windows: compare PATH manually in PowerShell

PATH (app process, in order)

C:\Users\q.codeg\npm-global
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0
C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin
C:\Program Files\IVI Foundation\VISA\Win64\Bin
C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin
C:\Program Files\Git\cmd
C:\Users\q.local\bin
C:\Users\q\AppData\Local\Programs\Python\Launcher
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0
D:\Windows Kits\10\Windows Performance Toolkit
D:\Program Files\CMake\bin
C:\Program Files\Git\cmd
C:\Users\q\AppData\Local\Programs\Python\Python312
C:\Users\q\AppData\Local\Microsoft\WindowsApps
D:\Programs\Microsoft VS Code\bin
C:\Users\q\AppData\Local\Microsoft\WindowsApps
C:\Users\q\AppData\Local\Programs\Python\Python312\Scripts
C:\Users\q\AppData\Roaming\npm
===== end =====

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions