-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed as duplicate
Closed as duplicate
Copy link
Labels
area:installationbugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already existsinstallationp2Non-showstopper bug or popular feature requestNon-showstopper bug or popular feature requestperformance
Description
Description
The Claude Code installation in GitHub Actions fails intermittently with a lock contention error, even when there's no obvious concurrent installation happening.
Error Message
Installation attempt 1...
Setting up Claude Code...
[~2 minute hang]
Installation failed, retrying...
Installation attempt 2...
Setting up Claude Code...
✘ Installation failed
Could not install - another process is currently installing Claude. Please try
again in a moment.
Try running with --force to override checks
Environment
- GitHub-hosted runner (ubuntu-latest)
- Action version: anthropics/claude-code-action@v1
- Claude Code version: 2.0.74
Analysis
The first installation attempt appears to hang for ~2 minutes before failing, then subsequent retry attempts hit the lock contention error. This suggests:
- The first attempt may leave a stale lock file when it times out/fails
- GitHub Actions runners are shared infrastructure, so lock files in global paths can persist across jobs
- The retry logic doesn't account for self-inflicted lock contention from the previous failed attempt
Suggested Fixes
- Use
--forceflag on retry attempts after the first failure - Clean up lock files before installation attempts
- Use a job-specific or unique installation path to avoid cross-job conflicts
- Add better lock file timeout/cleanup logic
Metadata
Metadata
Assignees
Labels
area:installationbugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already existsinstallationp2Non-showstopper bug or popular feature requestNon-showstopper bug or popular feature requestperformance