[BUG] security_reminder_hook.py loop — repeated "no such file" notification with no user input

Status Open
Maintainer reply None cached
Activity 1 comment · opened Sep 12, 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 security-guidance plugin's Stop/PostToolUse hook (security_reminder_hook.py)
failed with:

C:\Users\thain\AppData\Local\Python\pythoncore-3.14-64\python.exe: can't open file
'C:\Users\thain\AppData\Roaming\Claude\local-agent-mode-sessions\<session>\<conv>\rpm\plugin_<id>\hooks\security_reminder_hook.py':
[Errno 2] No such file or directory

This error repeated as an automated "Background security review found issues"
task-notification many times in a row with no new user input between occurrences —
it appears the notification kept re-firing/re-delivering the same stale error rather
than the hook actually re-running and failing each time.

Steps that preceded it: mid-session, I used the app's "change working directory"
feature to move from a scratch workspace to a different local project folder.
The error appeared shortly after that directory change.

When I later checked the file path manually, the file DID exist — so this looks
like a timing/race condition (the hook fired before the plugin's files were fully
in place after the directory switch) combined with a notification-delivery bug
that kept re-surfacing the same failure to the model turn after turn instead of
surfacing it once.

Platform: Windows 11, PowerShell/Git Bash environment, Claude Code desktop app.

What Should Happen?

The security-guidance hook should either run successfully or fail once and stop
— it should not repeatedly re-fire the same stale "file not found" error as a
task-notification without any new user action triggering it.

Error Messages/Logs

C:\Users\thain\AppData\Local\Python\pythoncore-3.14-64\python.exe: can't open file 'C:\Users\thain\AppData\Roaming\Claude\local-agent-mode-sessions\fc2e4943-ea63-4ba1-973f-3c0f839b9f86\a5f63a45-fca4-4388-957f-8ebb5e2793c0\rpm\plugin_01YBNfaNwQztYsnUydt8m47G\hooks\security_reminder_hook.py: [Errno 2] No such file or directory

This exact message repeated as a "Background security review found issues" 
task-notification 30+ times consecutively, with no user input between occurrences. 
When I later listed the hooks/ directory manually, security_reminder_hook.py 
was present alongside its sibling files (_base.py, patterns.py, session_state.py, 
gitutil.py, diffstate.py, reporesolve.py, llm.py, review_api.py, hooks.json, etc.) 
— so the file existed at inspection time; the failure appears to have been transient.

Steps to Reproduce

  1. Start a Claude Code desktop session in the scratch workspace (no project folder selected).
  2. Mid-session, use the app's directory-change feature to move the session's working

directory to a different local project folder (e.g. via the folder-change /
"change_directory" mechanism).

  1. Continue the conversation normally, reading and editing files in the new directory.
  2. At some point without any further user input, an automated task-notification arrives:

"Background security review found issues" with the body:
"C:\Users\thain\AppData\Local\Python\pythoncore-3.14-64\python.exe: can't open file
'...\rpm\plugin_<id>\hooks\security_reminder_hook.py': [Errno 2] No such file or directory"

  1. This same notification repeats dozens of times consecutively with no new user

message and no new tool call triggering it.

Note: When I manually listed the hooks/ directory afterward, security_reminder_hook.py
was present. So the file existed at inspection time — this looks like the hook
firing before the plugin's files were fully ready right after the directory switch,
combined with the notification getting re-delivered/re-queued repeatedly instead of
surfacing once.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Windows 11 (build 10.0.26200)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

This occurred inside the Claude Code desktop app (not a manually-opened terminal
session). The failing hook belongs to a bundled "security-guidance" plugin
(review_api.py / patterns.py / session_state.py / gitutil.py / diffstate.py /
reporesolve.py / llm.py alongside security_reminder_hook.py in the same hooks/
folder) that runs Stop/PostToolUse/UserPromptSubmit checks for code security.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗