anthropics / anthropics/claude-code-action

Bug: Plugins are not handled second run, stop runner (self hosted)

Open
#983 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
8.9k
Forks
2.1k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

**Describe the bug**
Plugins are not cleared (or handled) so when setup claude runs again it fails because it won't reinstall plugins

**To Reproduce**
Run claude agent on a self hosted runner (or at least a machine that hangs around, can probaly run the action twice to emulate)

**Expected behavior**
Should install regardless of plugins already installed

**Workflow yml file**

```
- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ steps.app-token.outputs.token }}
claude_args: |
--model opus
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
```

**API Provider**

[x] Anthropic First-Party API (default)

**Additional context**

```
Claude Code installed successfully
Setting up Claude settings at: /home/runner/.claude/settings.json
Creating .claude directory...
Found existing settings: {
"enableAllProjectMcpServers": true,
"enabledPlugins": {
"code-review@claude-code-plugins": true
}
}
Updated settings with enableAllProjectMcpServers: true
Settings saved successfully
Adding 1 marketplace(s)...
Adding marketplace: https://github.com/anthropics/claude-code.git
Adding marketplace...
Refreshing marketplace cache (timeout: 120s)…
Cloning repository (timeout: 120s): https://github.com/anthropics/claude-code.git
Clone complete, validating marketplace…
Cleaning up old marketplace cache…
✘ 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.
Error: Action failed with error: Failed to add marketplace 'https://github.com/anthropics/claude-code.git' (exit code: 1)
Error: Process completed with exit code 1.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.