Add version field to 27 local-sourced plugins#1050
Conversation
Local-path plugins (source is a string like "./plugins/foo" in
marketplace.json) without a manifest version cache at
~/.claude/plugins/cache/{marketplace}/{plugin}/unknown/ forever.
The cache check in claude-cli's copyPluginToVersionedCache sees
pathExists(.../unknown/) → true → skips re-extraction, even after
the marketplace content updates. Users are stuck with stale plugin
files until they manually delete the cache.
Adding "version": "1.0.0" fixes this because calculatePluginVersion
reads the manifest from the freshly-synced marketplace tree (not the
stale cache), and manifest.version is priority #1 in version
resolution. New version → new cache path → cache miss → re-extract.
This is preferable to the GCS-SHA fallback approach
(anthropics/claude-cli-internal#24773) because:
- Per-plugin granularity: only bumped plugins re-extract, not all
27 on every marketplace push
- No disk accumulation from unrelated marketplace churn
- Fixes both the runtime loader path AND the migration path
(manifest.version is priority #1 in both)
- No claude-cli code change needed
Remote-sourced plugins (github/git/url) already get a git SHA as
their version and are unaffected.
Complements anthropics#1050 which covers 27 plugins. These 3 were missed: - external_plugins/slack - plugins/example-plugin - plugins/math-olympiad
|
Hitting this in Claude Code 2.1.x: because This PR is the actual fix. It was approved 2026-03-27 and has just been conflict-blocked since. Could someone with commit access pick it up and rebase against (For visibility I tried opening a rebased external PR — #1705 — but the contribution bot auto-closed it as expected for non-Anthropic authors.) |
|
cc @tobinsouth — you approved this in March. Bumping in case the original author is unable to rebase; the conflicts look purely mechanical and this bug is actively biting Claude Code 2.1.x users (see prior comment for the failure mode and a real-world repro). Anyone on the team with commit access willing to pick it up? |
|
+1, recently filed #1758 before discovering this PR. Posting the audit data from there in case it's useful here: in the current state, 8 of 14 plugins in this marketplace display as |
Problem
27 local-path plugins (where
sourceis a string like"./plugins/foo"in marketplace.json) have noversionfield in their.claude-plugin/plugin.json. This causes claude-cli to cache them at~/.claude/plugins/cache/{marketplace}/{plugin}/unknown/forever.The cache check in
copyPluginToVersionedCache(pluginLoader.ts) seespathExists(.../unknown/)→ true → skips re-extraction, even after the marketplace content updates. Users are stuck with stale plugin files until they manually delete the cache. This is currently blocking the exec-bit preservation fix from reaching users with already-cached 644 hook scripts.Fix
Add
"version": "1.0.0"to all 27 affected manifests.This works because
calculatePluginVersionreads the manifest from the freshly-synced marketplace tree (not the stale cache), andmanifest.versionis priority #1 in version resolution. New version → new cache path → cache miss → re-extract.Why this instead of anthropics/claude-cli-internal#24773 (GCS SHA fallback)
migrateFromEnabledPlugins; runtimecalculatePluginVersionstill returns'unknown'The marketplace updates far more often than any individual plugin — using the marketplace SHA as a per-plugin cache key is the wrong granularity.
Affected plugins
plugins/ (15): agent-sdk-dev, code-review, commit-commands, explanatory-output-style, feature-dev, frontend-design, hookify, learning-output-style, mcp-server-dev, playground, plugin-dev, pr-review-toolkit, ralph-loop, security-guidance, skill-creator
external_plugins/ (12): asana, context7, firebase, github, gitlab, greptile, laravel-boost, linear, playwright, serena, supabase, terraform
Remote-sourced plugins (github/git/url in marketplace.json) already get a git SHA version and are unaffected.
Follow-up (not in this PR)
autofix-bothave no manifest at all — separate issue