{
  "id": 17773489,
  "title": "Claude Code hooks on Windows: when a Bash matcher sees nothing",
  "url": "https://urgent.news/2026/11/02/claude-code-hooks-on-windows-when-a-bash-matcher-sees-nothing",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-02T09:19:01.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/martinpisacreta/claude-code-hooks-on-windows-when-a-bash-matcher-sees-nothing-30l4"
  },
  "original_language": "en",
  "account": "This follow-up article addresses two configuration issues related to blocking destructive shell commands in Claude Code on Windows. The first issue is that the hook can miss the command entirely when Claude uses its PowerShell tool on a machine where Bash is not registered. The second issue is that the original guard.py only understands POSIX-style commands, so PowerShell commands remain outside its coverage.\n\nTo correct these issues, the matcher should be updated to match both Bash and PowerShell tools. The hook needs to be able to run successfully, which means checking that the Python executable is installed, the script path is correct, and the process does not crash. If the hook fails to start, setting onFailure to block will prevent the triggering action from proceeding through the normal permission flow.\n\nHowever, this configuration does not provide coverage for PowerShell commands as the original guard.py only understands POSIX-style command syntax. Adding PowerShell to the matcher does not teach the script to understand PowerShell grammar, aliases, parameter binding, or command composition. PowerShell coverage requires an appropriate implementation and separate verification.\n\nThe settings change does not provide this additional coverage. It is important to verify each boundary with harmless commands before relying on this setup. This setup should be considered a POSIX guard with corrected routing and failure handling until PowerShell analysis is implemented and verified.",
  "summary": "A reader spotted a Windows gap in my earlier article about blocking destructive shell commands in Claude Code. The hook matched Bash . On a machine where Claude uses its PowerShell tool, that hook can miss the command entirely. The previous article now includes the correction . This follow-up explains the two configuration issues involved: which tool triggers the hook, and what happens if the…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 3,
    "also_reported_by": [
      {
        "outlet": "XDA Developers",
        "title": "I used Claude Code to build an Android app that my family actually uses every day",
        "url": "https://urgent.news/2026/10/31/i-used-claude-code-to-build-an-android-app-that-my-family-actually",
        "published": "2026-10-31T14:30:20.000Z"
      },
      {
        "outlet": "Tom's Hardware",
        "title": "Anthropic confirms new Claude Code limits to prevent game cloning — users report Opus 5.5 is also actively blocking reverse engineering tasks",
        "url": "https://urgent.news/2026/11/02/anthropic-confirms-new-claude-code-limits-to-prevent-game-cloning",
        "published": "2026-11-02T12:30:00.000Z"
      }
    ]
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}