claude-code - 💡(How to fix) Fix Claude does not check if tool/software is already installed before attempting reinstall

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Claude Code does not verify whether a tool/software is already installed on the system before attempting to download and install it again. In the same session:

  1. User needed gh CLI - Claude found it's not in bash PATH
  2. Claude downloaded gh_2.74.0_windows_amd64.zip (~50MB), extracted it to a temp folder
  3. It worked from the extracted path
  4. 10 minutes later, a find command revealed gh.exe was already installed at C:\Program Files\GitHub CLI\gh.exe AND authenticated

Root Cause

Claude Code does not verify whether a tool/software is already installed on the system before attempting to download and install it again. In the same session:

  1. User needed gh CLI - Claude found it's not in bash PATH
  2. Claude downloaded gh_2.74.0_windows_amd64.zip (~50MB), extracted it to a temp folder
  3. It worked from the extracted path
  4. 10 minutes later, a find command revealed gh.exe was already installed at C:\Program Files\GitHub CLI\gh.exe AND authenticated

Code Example

# Before any install, search for existing installation
existing=$(find /c/Program\ Files /c/Program\ Files\ \(x86\) -name "tool.exe" -type f 2>/dev/null | head -1)
if [ -n "$existing" ]; then
    echo "Found existing installation: $existing"
else
    echo "Not found, proceeding with install..."
fi
RAW_BUFFERClick to expand / collapse

Bug Report

Category: waste (unnecessary resource consumption) Severity: Major Claude Code Version: 2.1.84 OS: Windows 11 Pro

Description

Claude Code does not verify whether a tool/software is already installed on the system before attempting to download and install it again. In the same session:

  1. User needed gh CLI - Claude found it's not in bash PATH
  2. Claude downloaded gh_2.74.0_windows_amd64.zip (~50MB), extracted it to a temp folder
  3. It worked from the extracted path
  4. 10 minutes later, a find command revealed gh.exe was already installed at C:\Program Files\GitHub CLI\gh.exe AND authenticated

Expected Behavior

Before any installation attempt, Claude should:

  1. Run find / where.exe / Get-Command to search common paths
  2. Check standard locations (C:\Program Files\, %APPDATA%, etc.)
  3. Only install if the tool is genuinely not found

Actual Behavior

Claude skips the verification step entirely and goes straight to download + install. When gh was not found via bare gh command in bash, Claude assumed it was not installed instead of searching with full paths.

Steps to Reproduce

  1. Have a tool installed in a standard location (e.g., C:\Program Files\GitHub CLI\gh.exe)
  2. Ensure it's NOT in the bash PATH (common on Windows with Git Bash)
  3. Ask Claude to use the tool
  4. Claude will attempt to install it again instead of finding the existing installation

Impact

  • ~5 minutes wasted on unnecessary download + extract
  • ~50MB disk space wasted (duplicate installation)
  • ~500+ tokens wasted on download/extract commands
  • User frustration

Suggested Fix

Add a "check before install" pattern:

# Before any install, search for existing installation
existing=$(find /c/Program\ Files /c/Program\ Files\ \(x86\) -name "tool.exe" -type f 2>/dev/null | head -1)
if [ -n "$existing" ]; then
    echo "Found existing installation: $existing"
else
    echo "Not found, proceeding with install..."
fi

This applies to any tool installation: gh, node, python, java, etc.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING