[BUG] Plugin cache not rebuilt after git pull on marketplace repo — LocalPluginsReader finds 0 local plugins

Resolved 💬 1 comment Opened May 26, 2026 by JRotheAtLise Closed Jun 27, 2026

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

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗