Preflight Checklist
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.json after 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.md with body "Hello v1"
- Set
plugin.json version to "0.1.0"
- Start a Claude Code session — invoke the command, confirm it works
- Edit
commands/my-command.md to 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
Preflight Checklist
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 inplugin.jsonis 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.mdis served instead of the source file.Workarounds
.claude-plugin/plugin.jsonafter every editrm -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
commands/my-command.mdwith body "Hello v1"plugin.jsonversion to"0.1.0"commands/my-command.mdto say "Hello v2"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