fix: treat 'already installed' marketplace as success on persistent runners#1175
Open
qozle wants to merge 1 commit intoanthropics:mainfrom
Open
fix: treat 'already installed' marketplace as success on persistent runners#1175qozle wants to merge 1 commit intoanthropics:mainfrom
qozle wants to merge 1 commit intoanthropics:mainfrom
Conversation
…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>
ashwin-ant
approved these changes
Apr 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1057.
Problem
Non-ephemeral self-hosted runners (e.g. GCP MIGs) retain
~/.claudestate across workflow runs. On the second run,claude plugin marketplace addexits 1 with:The action treats any non-zero exit as a hard failure and stops before installing any plugins.
Fix
addMarketplacenow 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
stdiotuple (["inherit", "pipe", "pipe"])