Avoid repeated marketplace upgrades for alternate layouts#24320
Merged
Conversation
canvrno-oai
approved these changes
May 26, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #24249.
Why
Codex already supports discovering marketplaces under both
.agents/plugins/marketplace.jsonand.claude-plugin/marketplace.json. The Git marketplace auto-upgrade no-op check only looked for the.agentslayout. That meant an installed.claude-pluginmarketplace with matching revision metadata still looked absent, so plugin list/startup upgrade work could stage and re-activate the same marketplace again.That matches the failure shape in #24249: the report called out repeated marketplace sync/cache refresh logs and a large recently-touched
.tmp/marketplaces/.stagingdirectory. This change makes the auto-upgrade path recognize the installed.claude-pluginmarketplace as already current, which should remove that staging/activation feedback loop.What changed
codex-rs/core-plugins/src/marketplace_upgrade.rsnow uses the existing supported marketplace manifest discovery helper when deciding whether an installed Git marketplace is already current. Existing local plugin source validation is unchanged;source: "./"still remains invalid.Confidence
Confidence is high that this fixes the repeated marketplace upgrade path: the old hardcoded layout check was definitely wrong for installed
.claude-pluginmarketplaces, and the reported staging churn points directly at that path.Confidence is not 100% because we do not have a CPU profile or a fully re-run reporter repro. A malformed marketplace entry can still be logged as invalid if another caller repeatedly lists plugins; this PR fixes the staging/upgrade feedback loop that likely made the failure pathological, not every possible source of repeated marketplace resolution.