Skip to content

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

Description

@chrisjenx

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions