fix(post-update): clear Claude plugin cache on update #221
Reference in New Issue
Block a user
Delete Branch "fix/clear-plugin-cache-on-update"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Clear the Claude plugin cache automatically to prevent stale .mcp.json files from breaking MCP servers.
Root Cause
The Claude plugin cache at
~/.claude/plugins/cache/leo-claude-mktplace/holds versioned copies of.mcp.jsonfiles. After marketplace updates, cached configs still point to old paths (.venv/bin/pythoninstead ofrun.sh), causing MCP servers to fail.Solution (Two-Layer Fix)
startup-check.sh) - Clears cache on EVERY session start, BEFORE MCP servers loadThe SessionStart hook is the critical fix - it runs automatically regardless of how the marketplace was updated.
Files Changed
plugins/projman/hooks/startup-check.sh- Add cache clearing at session startscripts/post-update.sh- Add cache clearing for manual runsTest plan
claude plugins updatefrom within Claude Code🤖 Generated with Claude Code
87676e0198to90f19dfc0f