Installation lock bug: --force flag doesn't work when Claude is running
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
- Start a Claude Code session
- Run
claude install latest --forcefrom within Claude or another terminal - 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:
- Installing to a new version path and updating the symlink (allowing next restart to use the new version)
- Properly documenting that users must exit all Claude sessions before upgrading
- 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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗