-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Description
Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report (please file separate reports for different bugs)
- I am using the latest version of Claude Code
What's Wrong?
Summary
Claude Code caches local plugin files under ~/.claude/plugins/cache/ keyed by plugin name and version. When developing a local plugin, editing source files (commands, agents, skills) has no effect — the stale cached copy is served until the version in plugin.json is bumped or the cache is manually deleted.
What Should Happen?
Expected behavior
The command should reflect the updated file content ("Hello v2").
Actual behavior
The command still runs the old content ("Hello v1"). The cached copy at ~/.claude/plugins/cache/local-plugins/{name}/0.1.0/commands/my-command.md is served instead of the source file.
Workarounds
- Bump the version in
.claude-plugin/plugin.jsonafter every edit - Or delete the cache:
rm -rf ~/.claude/plugins/cache/local-plugins/{plugin-name}
Suggested fix
For local plugins (those loaded from ~/.claude/my-plugins/ or similar local paths), invalidate the cache when source file modification timestamps are newer than the cached copies. Version-only caching makes sense for published/marketplace plugins, but local development needs source-change detection.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce
- Create a local plugin with a command file, e.g.
commands/my-command.mdwith body "Hello v1" - Set
plugin.jsonversion to"0.1.0" - Start a Claude Code session — invoke the command, confirm it works
- Edit
commands/my-command.mdto say "Hello v2" - Restart the Claude Code session
- Invoke the command again
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
No response
Claude Code Version
2.1.56 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
No response