claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

VS Code Extension Automatically Creates Local Installation Without User Consent

Open fwends opened this issue 6 months ago • 2 comments

Bug Report: VS Code Extension Automatically Creates Local Installation Without User Consent

Summary: The VS Code extension (anthropic.claude-code) automatically creates a local Claude installation at ~/.claude/local/ without user permission, even when the user has explicitly chosen to use a global installation.

Environment:

  • Claude Code Version: 1.0.44
  • VS Code Extension Version: 1.0.44 (anthropic.claude-code-1.0.44)
  • Installation Method: npm global (npm install -g @anthropic-ai/claude-code)
  • OS: macOS 15.5 (24F74)
  • Node.js: 24.2.0

Steps to Reproduce:

  1. Install Claude Code globally: npm install -g @anthropic-ai/claude-code
  2. Install the VS Code extension
  3. Deliberately remove any local installation: rm -rf ~/.claude/local/
  4. Run any Claude command (e.g., claude --version)
  5. Check ~/.claude/local/ - it gets recreated automatically

Expected Behavior:

  • The VS Code extension should respect the user's choice of installation method
  • If a global installation exists and works, it should use that
  • Local installation should only be created with explicit user consent

Actual Behavior:

  • VS Code extension automatically creates ~/.claude/local/ directory
  • This happens repeatedly even after manual deletion
  • Creates confusion with multiple installations
  • claude doctor shows warnings about "Multiple installations found"

Impact:

  • User confusion about which installation is being used
  • Conflicting recommendations from claude doctor
  • Unnecessary duplicate installations taking up space
  • Breaks user's preferred setup choice

Additional Notes:

  • The global installation works perfectly fine
  • The local installation is created but not used (due to PATH precedence)
  • This seems to happen when the VS Code extension initializes or runs commands

Suggested Fix: The VS Code extension should:

  1. Check if a working global installation exists first
  2. Only create local installation if no global installation is found
  3. Ask user permission before creating local installation
  4. Provide a setting to disable automatic local installation creation

Claude CLI Diagnostic Currently running: npm-global (1.0.44) Path: /opt/homebrew/Cellar/node/24.2.0/bin/node Invoked: /opt/homebrew/bin/claude Auto-updates: No Config install method: local Config auto-updates: true Update permissions: Yes Recommendation: Run '/migrate-installer' to enable auto-updates This migrates to a local installation in ~/.claude/local Warning: Multiple installations found

  • npm-local at /Users/greg/.claude/local
  • npm-global at /opt/homebrew/bin/claude Warning: Local installation exists but not being used Fix: Consider using local installation: claude migrate-installer Press Enter to continue…

fwends avatar Jul 09 '25 09:07 fwends

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 05 '25 10:12 github-actions[bot]

This issue still persists currently on macOS.

MaximilianPavon avatar Dec 09 '25 13:12 MaximilianPavon