claude-code
claude-code copied to clipboard
[BUG] Plugin cache keeps old versions and runs their hooks!
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I'm developing a plugin for code navigation claude-context-tools. I'm regularly updating the marketplace and upgrading the plugin as I develop, but I can see that the older versions are kept around and claude-code runs the old versions' hooks:
> /context-tools:repo-map
⏺ Bash(rm -f .claude/repo-map-cache.json .claude/repo-map.md && nohup uv run
/Users/roberttaylor/.claude/plugins/cache/chipflow-context-tools/context-tools/0.3.1/scripts/generate-repo-map.py > .claude/repo-map-build.log
2>&1 &)
⎿ PreToolUse:Callback hook succeeded: Success
⎿ PreToolUse:Bash says: Plugin hook error: /bin/sh:
/Users/roberttaylor/.claude/plugins/cache/chipflow-context-tools/context-tools/0.2.9/scripts/check-cache.sh: Permission denied
⎿ PreToolUse:Callback hook succeeded: Success
⎿ PreToolUse:Bash says: Plugin hook error: /bin/sh:
/Users/roberttaylor/.claude/plugins/cache/chipflow-context-tools/context-tools/0.3.0/scripts/check-cache.sh: Permission denied
⎿ (No content)
What Should Happen?
Only latest version's hooks should run.
Error Messages/Logs
Steps to Reproduce
Install a plugin via marketplace, bump it's version in git, update marketplace with /plugin, do an action that runs its hooks.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.76 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
No response