fix(post-update): clear Claude plugin cache on update #221

Merged
lmiranda merged 1 commits from fix/clear-plugin-cache-on-update into development 2026-01-27 19:58:00 +00:00
Owner

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.json files. After marketplace updates, cached configs still point to old paths (.venv/bin/python instead of run.sh), causing MCP servers to fail.

Solution (Two-Layer Fix)

  1. SessionStart hook (startup-check.sh) - Clears cache on EVERY session start, BEFORE MCP servers load
  2. post-update.sh - Clears cache when manually running post-update

The 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 start
  • scripts/post-update.sh - Add cache clearing for manual runs

Test plan

  • Merge this PR
  • Run claude plugins update from within Claude Code
  • Start new session - MCPs should work

🤖 Generated with Claude Code

## 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.json` files. After marketplace updates, cached configs still point to old paths (`.venv/bin/python` instead of `run.sh`), causing MCP servers to fail. ## Solution (Two-Layer Fix) 1. **SessionStart hook** (`startup-check.sh`) - Clears cache on EVERY session start, BEFORE MCP servers load 2. **post-update.sh** - Clears cache when manually running post-update The 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 start - `scripts/post-update.sh` - Add cache clearing for manual runs ## Test plan - [ ] Merge this PR - [ ] Run `claude plugins update` from within Claude Code - [ ] Start new session - MCPs should work 🤖 Generated with [Claude Code](https://claude.ai/code)
lmiranda added 1 commit 2026-01-27 19:51:36 +00:00
The Claude plugin cache at ~/.claude/plugins/cache/leo-claude-mktplace/
holds versioned copies of .mcp.json files. When we update .mcp.json
to use run.sh instead of direct python paths, the cache retains old
versions, causing MCP servers to fail.

Now post-update.sh clears this cache, forcing Claude to read fresh
configs from the installed marketplace on next session start.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lmiranda force-pushed fix/clear-plugin-cache-on-update from 87676e0198 to 90f19dfc0f 2026-01-27 19:55:46 +00:00 Compare
lmiranda merged commit fb1c664309 into development 2026-01-27 19:58:00 +00:00
lmiranda deleted branch fix/clear-plugin-cache-on-update 2026-01-27 19:58:00 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#221