anthropics / anthropics/claude-code-action
Marketplace install fails on non-ephemeral self-hosted runners: 'already installed'
- Dominant language
- TypeScript
- Stars
- 8.9k
- Forks
- 2.1k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
## Problem
When using `claude-code-action` on **non-ephemeral self-hosted runners**, the marketplace install step fails on the second run because the state from the previous run persists in `~/.claude/`:
```
✘ Failed to add marketplace: Marketplace 'claude-code-plugins' is already installed.
Please remove it first using '/plugin marketplace remove claude-code-plugins' if you want to re-install it.
```
## Expected behavior
The action should handle "already installed" gracefully — either skip the install if the marketplace is already present, or remove and re-install it.
## Reproduction
1. Use a non-ephemeral self-hosted runner
2. Configure the action with `plugin_marketplaces` and `plugins`
3. First run succeeds
4. Second run on the same runner fails
## Workaround
None that's safe for concurrent jobs. Deleting `~/.claude` between runs risks breaking concurrent jobs on the same runner.
## Environment
- Runner: self-hosted, non-ephemeral (GCP MIG)
- Action version: `b113f49a56229d8276e2bf05743ad6900121239c`
- Config: `plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'`
Contributor guide
Assessment
This issue has not been assessed yet.