Skip to content

Avoid repeated marketplace upgrades for alternate layouts#24320

Merged
etraut-openai merged 1 commit into
mainfrom
etraut/fix-marketplace-upgrade-loop
May 26, 2026
Merged

Avoid repeated marketplace upgrades for alternate layouts#24320
etraut-openai merged 1 commit into
mainfrom
etraut/fix-marketplace-upgrade-loop

Conversation

@etraut-openai

@etraut-openai etraut-openai commented May 24, 2026

Copy link
Copy Markdown
Collaborator

Fixes #24249.

Why

Codex already supports discovering marketplaces under both .agents/plugins/marketplace.json and .claude-plugin/marketplace.json. The Git marketplace auto-upgrade no-op check only looked for the .agents layout. That meant an installed .claude-plugin marketplace 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/.staging directory. This change makes the auto-upgrade path recognize the installed .claude-plugin marketplace as already current, which should remove that staging/activation feedback loop.

What changed

codex-rs/core-plugins/src/marketplace_upgrade.rs now 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-plugin marketplaces, 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.

@etraut-openai etraut-openai merged commit 4145612 into main May 26, 2026
31 checks passed
@etraut-openai etraut-openai deleted the etraut/fix-marketplace-upgrade-loop branch May 26, 2026 21:40
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex CLI: plugin marketplace sync feedback loop pegs CPU at 100%, unkillable by SIGTERM

2 participants