-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Labels
area:toolsbugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsplatform:linuxIssue specifically occurs on LinuxIssue specifically occurs on Linux
Description
Bug Report: Broken plugin hook blocks Edit/Write tools
Description
When a plugin hook references a file that doesn't exist in the cache, all Edit/Write/MultiEdit tool operations are blocked with an error. The user cannot proceed with any file modifications until the session is restarted with the plugin disabled.
Error Message
PreToolUse:Callback hook blocking error from command: "callback": /run/current-system/sw/bin/python3: can't open file '/home/guyfawkes/.claude/plugins/cache/claude-plugins-official/security-guidance/6d3752c000e2/hooks/security_reminder_hook.py': [Errno 2] No such file or directory
Steps to Reproduce
- Have a plugin installed that registers a PreToolUse hook (e.g.,
security-guidance@claude-plugins-official) - The plugin cache gets corrupted/deleted, or the plugin version changes leaving stale references
- Try to use Edit, Write, or MultiEdit tools
- All operations are blocked with "No such file or directory" error
Expected Behavior
- Claude Code should gracefully handle missing hook files (log warning, skip the hook)
- OR disabling the plugin in
settings.jsonshould take effect immediately without requiring session restart
Actual Behavior
- Tool operations are completely blocked
- Disabling the plugin in
settings.jsonhas no effect until session restart - User is stuck and cannot make any file edits
Environment
- Claude Code version: Latest
- OS: NixOS Linux
- Plugin:
security-guidance@claude-plugins-official
Workaround
- Disable the plugin in
~/.claude/settings.json:"enabledPlugins": { "security-guidance@claude-plugins-official": false }
- Exit and restart Claude Code session
Suggested Fix
- Wrap hook execution in try-catch and gracefully handle missing files
- Validate hook file existence before attempting to execute
- Allow runtime plugin enable/disable without requiring restart
Metadata
Metadata
Assignees
Labels
area:toolsbugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsplatform:linuxIssue specifically occurs on LinuxIssue specifically occurs on Linux