claude-code - ✅(Solved) Fix [BUG] security-guidance plugin's hook uses python3 in the command, which doesn't exist on Windows [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46449Fetched 2026-04-11 06:19:59
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

⎿  PreToolUse:Edit hook error ⎿  Failed with non-blocking status code: Python was not found; run without arguments to install from

PR fix notes

PR #47502: fix(security-guidance): use a cross-platform Python launcher

Description (problem / solution / changelog)

Summary

  • use a small Node launcher so the security-guidance hook can find Python on Windows and Unix-like systems
  • preserve stdin/stdout passthrough for the existing Python reminder hook
  • add focused tests for launcher selection and fallback behavior

Testing

  • node --test plugins/security-guidance/hooks/run_python_hook.test.js

Closes #46449

Changed files

  • plugins/security-guidance/hooks/hooks.json (modified, +1/-1)
  • plugins/security-guidance/hooks/run_python_hook.js (added, +66/-0)
  • plugins/security-guidance/hooks/run_python_hook.test.js (added, +54/-0)

Code Example

Update(.claude\settings.json)
  ⎿  PreToolUse:Edit hook error                                                                            ⎿  Failed with non-blocking status code: Python was not found; run without arguments to install from
                                                                                                              the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App
                                                                                                              execu…
RAW_BUFFERClick to expand / collapse

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?

There it is. The security-guidance plugin runs python3 before every Edit/Write. On Windows, python3 doesn't exist -- Windows uses python instead.

You have two options:

  1. Fix the command -- but this is a plugin-managed file that'll get overwritten on updates
  2. Disable the security-guidance plugin since it's just a non-blocking warning hook

Since you have it enabled in .claude/settings.json:

Read 1 file (ctrl+o to expand)

● Want me to disable the security-guidance plugin? It's the source of all those "Python not found" errors. The hook is non-blocking (errors don't stop the writes) but it's noisy.

What Should Happen?

It should use the proper command regardless of platform

Error Messages/Logs

Update(.claude\settings.json)
  ⎿  PreToolUse:Edit hook error                                                                            ⎿  Failed with non-blocking status code: Python was not found; run without arguments to install from
                                                                                                              the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App
                                                                                                              execu…

Steps to Reproduce

Install Claude via Powershell via the native method: irm https://claude.ai/install.ps1 | iex Install the security-guidance plugin Ask Claude to save a memory or update a file

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.101 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

No response

extent analysis

TL;DR

Disable the security-guidance plugin to resolve the "Python not found" errors on Windows.

Guidance

  • The security-guidance plugin is using the command python3 which is not recognized on Windows, causing the errors.
  • Disabling the security-guidance plugin is a viable workaround since it's a non-blocking warning hook.
  • To disable the plugin, update the .claude/settings.json file by removing or commenting out the line that enables the security-guidance plugin.
  • Verify that the errors are resolved by attempting to save a memory or update a file after disabling the plugin.

Notes

The issue is specific to Windows and is caused by the plugin using a command that is not compatible with the platform.

Recommendation

Apply workaround: Disable the security-guidance plugin, as it is a non-blocking warning hook and disabling it will resolve the "Python not found" errors without affecting the core functionality of Claude Code.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING