Skip to content

fix: treat 'already installed' marketplace as success on persistent runners#1175

Open
qozle wants to merge 1 commit intoanthropics:mainfrom
qozle:fix/marketplace-already-installed
Open

fix: treat 'already installed' marketplace as success on persistent runners#1175
qozle wants to merge 1 commit intoanthropics:mainfrom
qozle:fix/marketplace-already-installed

Conversation

@qozle
Copy link
Copy Markdown
Contributor

@qozle qozle commented Apr 5, 2026

Fixes #1057.

Problem

Non-ephemeral self-hosted runners (e.g. GCP MIGs) retain ~/.claude state across workflow runs. On the second run, claude plugin marketplace add exits 1 with:

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.

The action treats any non-zero exit as a hard failure and stops before installing any plugins.

Fix

addMarketplace now captures stdout/stderr (while still mirroring it to the parent process so logs remain visible), and resolves instead of rejecting when the output contains "already installed". Any other non-zero exit still propagates as an error. Makes the marketplace install step idempotent on persistent runners.

Tests

  • Updated existing marketplace assertions for the new stdio tuple (["inherit", "pipe", "pipe"])
  • Added test: "already installed" output → resolves
  • Added test: other failure output → still rejects

…unners

Non-ephemeral self-hosted runners retain ~/.claude state across workflow
runs. On the second run, 'claude plugin marketplace add' exits 1 with
"already installed" and the action fails before any plugins are installed.

Capture stdout/stderr in addMarketplace (mirroring to parent process so
output remains visible), and resolve instead of rejecting when the output
contains "already installed". Any other non-zero exit still propagates as
an error.

Tests: update assertions for the new stdio tuple, add two new cases
covering the idempotent skip and non-matching failure passthrough.

Fixes anthropics#1057.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Marketplace install fails on non-ephemeral self-hosted runners: 'already installed'

2 participants