Homebrew cask install: installMethod detected as native, checks wrong binary path

Resolved 💬 3 comments Opened Feb 2, 2026 by michaelprather Closed Feb 2, 2026

Description

When Claude Code is installed via the Homebrew cask (claude-code), the CLI reports an error on startup:

installMethod is native, but claude command not found at /Users/<user>/.local/bin/claude

Environment

  • Install method: brew install --cask claude-code
  • Version: 2.1.29
  • Platform: macOS (Apple Silicon)
  • Binary location: /opt/homebrew/bin/claude (symlinked from /opt/homebrew/Caskroom/claude-code/2.1.29/)

Context

Claude Code was originally installed using the native (standalone) install method, then removed and reinstalled via Homebrew cask. The ~/.claude/install-method file does not exist, so the stale install method detection may be persisted elsewhere or inferred from leftover native install artifacts.

Root Cause

The CLI detects the install method as native (the standalone installer), which then checks for the binary at ~/.local/bin/claude. Since the native install was removed and replaced with a Homebrew cask install, the binary lives at /opt/homebrew/bin/claude and the check fails.

This appears to be a stale state issue — the install method from the previous native install persists across the reinstall via Homebrew.

Expected Behavior

Switching install methods should not leave the CLI in a broken state. Either:

  1. The Homebrew cask install should overwrite any persisted install method state from a previous native install, or
  2. The CLI should detect the actual install method dynamically rather than relying on persisted state.

Steps to Reproduce

  1. Install Claude Code via the native/standalone installer
  2. Remove the native install
  3. Install via Homebrew: brew install --cask claude-code
  4. Run claude
  5. Observe the error about installMethod is native and missing binary at ~/.local/bin/claude

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗