claude-code - 💡(How to fix) Fix [BUG] Plugin cache not rebuilt after git pull on marketplace repo — LocalPluginsReader finds 0 local plugins

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Root Cause (investigated)

The internal LevelDB index still references the old commit hash directory (e.g. aabbccddeeff). After git pull, the HEAD moves to a new commit (e.g. 112233445566), but:

  1. Claude Code does not create a new cache directory for the new commit hash
  2. If the old cache directory is deleted, Claude Code does not rebuild it — it stays empty
  3. Manually creating a cache directory with the new commit hash is also ignored (and gets cleaned up on next startup)
  4. The only workaround is to manually recreate the cache directory using the old commit hash, so the LevelDB index still finds it

Fix Action

Workaround

# Restore old cache path with updated content after git pull
$src = "$env:USERPROFILE\.claude\plugins\marketplaces\<marketplace-name>\plugins\<plugin-name>"
$dst = "$env:USERPROFILE\.claude\plugins\cache\<marketplace-name>\<plugin-name>\aabbccddeeff"
Copy-Item -Recurse -Force "$src\skills" "$dst\skills"

Code Example

# Restore old cache path with updated content after git pull
$src = "$env:USERPROFILE\.claude\plugins\marketplaces\<marketplace-name>\plugins\<plugin-name>"
$dst = "$env:USERPROFILE\.claude\plugins\cache\<marketplace-name>\<plugin-name>\aabbccddeeff"
Copy-Item -Recurse -Force "$src\skills" "$dst\skills"
RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code desktop app (Windows)
  • Plugin type: custom marketplace plugin (team GitHub repo via extraKnownMarketplaces)
  • autoUpdate: true set in settings.json

Steps to Reproduce

  1. Install a custom marketplace plugin from a private GitHub repo
  2. Plugin works correctly — skills appear in the app
  3. Run git pull inside the marketplace repo directory (~/.claude/plugins/marketplaces/<name>/)
  4. Restart Claude Code

Expected Behavior

Claude Code detects that the git HEAD has changed (old commit → new commit), rebuilds the plugin cache under the new commit hash, and loads the updated skills.

Actual Behavior

  • [LocalPluginsReader] Found 0 local plugins in main.log
  • [CCD] Passing 1 plugin(s) to SDK (skills: 1, remote: 0, local: 0) — local is always 0
  • The plugin cache directory (~/.claude/plugins/cache/<marketplace>/<plugin>/<commit-hash>/) is NOT rebuilt for the new commit hash
  • Skills from the marketplace plugin disappear from the UI entirely

Root Cause (investigated)

The internal LevelDB index still references the old commit hash directory (e.g. aabbccddeeff). After git pull, the HEAD moves to a new commit (e.g. 112233445566), but:

  1. Claude Code does not create a new cache directory for the new commit hash
  2. If the old cache directory is deleted, Claude Code does not rebuild it — it stays empty
  3. Manually creating a cache directory with the new commit hash is also ignored (and gets cleaned up on next startup)
  4. The only workaround is to manually recreate the cache directory using the old commit hash, so the LevelDB index still finds it

Workaround

# Restore old cache path with updated content after git pull
$src = "$env:USERPROFILE\.claude\plugins\marketplaces\<marketplace-name>\plugins\<plugin-name>"
$dst = "$env:USERPROFILE\.claude\plugins\cache\<marketplace-name>\<plugin-name>\aabbccddeeff"
Copy-Item -Recurse -Force "$src\skills" "$dst\skills"

Impact

  • autoUpdate: true is effectively broken for local marketplace plugins
  • After any git pull on the marketplace repo, skills silently disappear
  • The UI toggle for the plugin becomes unresponsive (no visible feedback), though it does write to settings.json

Additional Info

  • [NativeMarketplaceReader] Found 2 marketplace(s) — marketplaces ARE found correctly
  • [SkillsPlugin] Found N enabled skills — Anthropic org skills load fine, only local marketplace plugins are affected
  • The shallow file and packed-refs are not updated after pull, which may affect how Claude Code resolves the current HEAD commit hash for cache key generation

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING