Installation lock bug: --force flag doesn't work when Claude is running

Resolved 💬 1 comment Opened Nov 18, 2025 by slapglif Closed Nov 18, 2025

Bug Description

claude install latest --force fails with a lock error even when using the --force flag, if Claude Code is currently running.

Steps to Reproduce

  1. Start a Claude Code session
  2. Run claude install latest --force from within Claude or another terminal
  3. Observe the error:
✘ Installation failed

Could not install - another process is currently installing Claude. Please try
again in a moment.

Try running with --force to override checks

Root Cause

The installation process acquires a lock on the running binary (~/.local/share/claude/versions/X.X.XX). When Claude is running, the binary is locked by the OS, preventing updates.

Debug logs show:

2025-11-18T18:17:01.214Z [ERROR] Lock acquisition failed for /home/kuro/.local/share/claude/versions/2.0.45

The --force flag doesn't bypass this OS-level lock.

##Expected Behavior

The --force flag should allow installation while Claude is running, either by:

  1. Installing to a new version path and updating the symlink (allowing next restart to use the new version)
  2. Properly documenting that users must exit all Claude sessions before upgrading
  3. Providing a clear error message explaining the actual issue

Current Behavior

The error message says "Try running with --force to override checks" but --force doesn't actually work.

Workaround

Exit all Claude Code sessions, then run the installation from a regular terminal:

claude install latest

Environment

  • Claude Code version: 2.0.45
  • Platform: Linux (Ubuntu)
  • Installation method: Native build

Impact

Users cannot update Claude Code while using it, and the --force flag provides false hope that there's a solution.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗