Skip to content

Detect the Claude Code CLI bundled with the Claude desktop app #157

Description

@Classic298

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions