[BUG] Security-guidance plugin hook file missing from session snapshot, causes repeated "No such file or directory" notifications

Status Open
Reported on v2.1.272
Maintainer reply None cached
Activity 0 comments · opened Sep 16, 2026

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?

The marketplace plugin "security-guidance" (claude-plugins-official) registers hooks (PostToolUse, Stop, SubagentStop) that call:

bash "${CLAUDE_PLUGIN_ROOT}/hooks/sg-python.sh" "${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py"

In my session, the plugin's per-session runtime snapshot directory
(AppData/Roaming/Claude/local-agent-mode-sessions/<session>/<subsession>/rpm/plugin_<id>/hooks/)
was missing security_reminder_hook.py, while the master install at
~/.claude/plugins/marketplaces/claude-plugins-official/plugins/security-guidance/hooks/
had the file (116KB, present and complete).

This caused the hook to fail on every Edit/Write/Stop/SubagentStop event with:

python.exe: can't open file '...\plugin_<id>\hooks\security_reminder_hook.py': [Errno 2] No such file or directory

The error repeated dozens of times as a "Background security review found issues" task notification, even after I manually copied the missing file into the session snapshot directory, and even after restarting the Claude desktop app — the same session ID / snapshot path kept reappearing and the error kept recurring identically, suggesting either:

  1. The error message itself is being cached/replayed rather than freshly generated each time, or
  2. The session's plugin snapshot is not staying in sync with the master plugin directory across app restarts.

Restarting the app eventually seemed to resolve it (the snapshot directory showed a full, matching file set on a later check), but there was a significant delay/backlog of duplicate notifications before it settled.

What Should Happen?

The security-guidance plugin's hooks (PostToolUse on Edit/Write, Stop, SubagentStop) should run security_reminder_hook.py successfully without erroring, since the file exists both in the master plugin install and (after a restart) in the session's plugin snapshot directory.

Error Messages/Logs

python.exe: can't open file 'C:\Users\song\AppData\Roaming\Claude\local-agent-mode-sessions\16fd4821-7691-49dc-ae00-d9aab7bd5c82\057f7603-cc19-4bb7-a370-9a2246d97324\rpm\plugin_01YBNfaNwQztYsnUydt8m47G\hooks\security_reminder_hook.py': [Errno 2] No such file or directory

Surfaced repeatedly as:
"Background security review found issues" / "Commit security review found issues" task notifications, and also as a synchronous PostToolUse:Edit/Write hook blocking error with the same message.

Notably: the error text was byte-for-byte identical across dozens of occurrences, including after I manually verified the file existed at that exact path — suggesting the error may be cached/replayed rather than freshly generated each time.

Steps to Reproduce

  1. Have the "security-guidance" plugin installed via claude-plugins-official marketplace
  2. Start a long session with several Edit/Write tool calls and a git commit
  3. Observe repeated identical "Background security review found issues" notifications referencing a missing security_reminder_hook.py file

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.272 (Claude Code)

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

https://github.com/Ssong00713/food-battle

<img width="604" height="532" alt="Image" src="https://github.com/user-attachments/assets/cf5f9242-e0b7-4a7d-a59c-77c9ed4bac05" />

View original on GitHub ↗