Detect the Claude Code CLI bundled with the Claude desktop app
Currently the claude_code agent profile only probes claude on PATH. Users of the Claude desktop app never have a PATH-callable claude, so for them the agent silently never appears in settings, even though a fully working CLI is on disk.
The desktop app maintains a standard Claude Code CLI at a well-known location:
- Windows:
%APPDATA%\Claude\claude-code\<version>\claude.exe (verified: responds to --version with 2.1.215 (Claude Code))
- macOS: presumably the equivalent under
~/Library/Application Support/Claude/claude-code/<version>/
It shares ~/.claude with the standalone CLI, including .credentials.json, so it is already authenticated and works as a drop-in cli_path for the agent SDK.
Proposal: when claude is not found on PATH, fall back to globbing the desktop app's claude-code/<version>/ directory and use the highest version found. The version directory is replaced on every desktop-app auto-update, so it must be resolved fresh on each detection pass rather than persisted.
Detect the Claude Code CLI bundled with the Claude desktop app
Currently the
claude_codeagent profile only probesclaudeon PATH. Users of the Claude desktop app never have a PATH-callableclaude, so for them the agent silently never appears in settings, even though a fully working CLI is on disk.The desktop app maintains a standard Claude Code CLI at a well-known location:
%APPDATA%\Claude\claude-code\<version>\claude.exe(verified: responds to--versionwith2.1.215 (Claude Code))~/Library/Application Support/Claude/claude-code/<version>/It shares
~/.claudewith the standalone CLI, including.credentials.json, so it is already authenticated and works as a drop-incli_pathfor the agent SDK.Proposal: when
claudeis not found on PATH, fall back to globbing the desktop app'sclaude-code/<version>/directory and use the highest version found. The version directory is replaced on every desktop-app auto-update, so it must be resolved fresh on each detection pass rather than persisted.