Hooks issues on Windows — page 2
Issues the maintainers labelled both platform:windows and area:hooks.
242 issues · 68 open · 174 resolved (72%) · first seen Jan 7, 2026
Is this getting better or worse?
This class of problem is converging. 97 new reports in the last 90 days vs 134 in the 90 before — -28%. The open backlog peaked at 68 in 2026-08 and sits at 68 today.
Derived by counting each matching issue from its creation date until it closed. First-party
computation over the anthropics/claude-code tracker — the trend is not published
anywhere upstream.
Which builds report this
146 of these reports name the Claude Code build they were running, spanning 83 releases. Heaviest reporters:
- Claude Code v2.1.207
- Claude Code v2.1.143
- Claude Code v2.1.211
- Claude Code v2.1.92
- Claude Code v2.1.114
- Claude Code v2.1.237
- Claude Code v2.1.229
- Claude Code v2.1.215
Report volume, not a defect count: an issue can mention a build without that build having caused the failure. Versions come from the version string in the bug-report template, matched against real published tags.
Do these get fixed?
Median time to close is 32 days across 174 closures. Of the 174 closures with a recorded reason, 26% were closed as completed and 128 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
96 of these issues post a workaround someone says worked. The highest-engagement ones:
- [FEATURE] Expose pasted image data to hooks and plugins
- …that plugins/skills can call: Alternative Solutions Current workarounds all have significant limitations: Asking users to provide file paths instead of pasting defeats the purpose of the paste feature and degrades UX. Us…
Found in the description of #16592 · still open - [BUG] SessionStart hooks break stdin on Windows Terminal
- …s valid : JSON is correctly parsed, no errors in processing Workaround - Use vscode plugin - Use WezTerm instead of Windows Terminal when working with projects that have SessionStart hooks, somewhat working but still som…
Found in the description of #23083 · resolved - [Windows] Visible console window flashes on every tool use in v2.1.143
- …es for hook execution on Windows. Alternatively, use with . Workaround Rolling back to v2.1.123 eliminates the issue, but loses subsequent security and feature improvements.
Found in the description of #61051 · still open - [BUG] Skill subagent inherits parent's 1M-context tier but not extra-usage entitlement
- …log warning instead of failing the subagent. Today the only workaround is to remove the directive entirely (subagent inherits parent + parent's already-paid extra-usage), which defeats the cost-saving intent of declaring…
Found in the description of #57249 · resolved - [BUG] PermissionDecision in PreToolUse is ignored in latest VS Code Extension
- …class of bug as 37210 — is ignored for certain tool types. Workaround using chmod defense-in-depth: For the standard destructive command hooks: — 8 hooks that use exit code 2 (which does work reliably for Bash tool bloc…
Found in the thread of #36286 · resolved
Excerpts are quoted from the linked issue so you can judge relevance before opening it. Threads that only ask for a workaround, or report that there is none, are excluded. These are community suggestions, not official guidance from Anthropic — read the full thread before applying one.
Matching issues 101–200
Ranked by community engagement (reactions weighted over comments).
- [FEATURE] CLAUDE_ENV_FILE should propagate to PowerShell tool and child plugins, not bash-only
- [BUG] Bash tool and SessionStart hooks fail with EEXIST on Windows due to non-idempotent mkdir of session-env
- "Waiting for input" notification fires on Windows when Claude is not waiting for input
- [BUG] Claude Desktop SSH Remote: ccd-cli 2.1.128 crashes on initialize when hooks are configured in settings.json
- SessionStart hooks cannot refresh in-memory slash-command body cache populated at worktree open
- if field with PowerShell(<specific>) patterns silently never matches; only PowerShell(*) works
- UserPromptSubmit hook: decision: "block" does not erase typed prompt from model context
- [BUG] Hook command on Windows: backslashes in absolute paths are shell-mangled before execution
- User-level settings.json hooks silently ignored in v2.1.120 VSCode extension
- [BUG] UserPromptSubmit hooks hang indefinitely on Windows (stdin pipe not closed)
- Permission walker unhandled node type `file_redirect` blocks allow-list for commands with redirects/pipes
- WorktreeCreate hook payload change causes undefined worktrees on Windows
- SessionStart hook fails with agent type: ToolUseContext is required
- Conversation history leak via FileChanged notifications bypasses guard hooks and gitignore
- SessionStart hooks not firing on Windows (startup or /new)
- [Windows] Hooks receive stdin as TTY instead of pipe — tool input never received
- Assistant repeatedly violates simple output suppression rules despite explicit instructions and memory
- [BUG] SessionStart:resume hook payload missing 'cwd' field
- [BUG] Terminal hangs after approving managed settings when SessionStart hook is configured
- [BUG] :Hooks always executed via `/usr/bin/bash` on Windows, ignoring `shell` setting
- Feature request: PostCompact hook + statusline refresh after /compact
- [DOCS] Add windows specific environment variable usage for hooks
- Plugin PreToolUse hook matcher removed from cache/hooks.json still fires after full restart
- PostToolUse async hook invocations partially dropped on consecutive Write/Edit batches (Windows, 2.1.139)
- Windows: hook processes are left SUSPENDED (never executed a single instruction), hanging the turn for 30-60+ minutes
- Subagent tool calls: PreToolUse denials don't surface to the parent, and hook payload carries the parent's session_id
- Model substitutes its recent output pattern for the user's defined order — 4 consecutive times, under correction, with the definition in context
- Model behavior: agent substitutes easier implementations for explicit specs, makes unverified 'done' claims, games user-defined enforcement hooks (7-day pattern)
- [BUG] CLI repeatedly self-spawns sessions with prompt "Code" every ~12s, independent of VSCode
- Per-turn command hooks (PreToolUse/UserPromptSubmit/Stop) don't fire in non-interactive modes (VS Code extension, `claude -p`) — only SessionStart fires
- [BUG] hookify plugin: 'No module named hookify' on every hook event when installed from marketplace
- [BUG] Hook `if` field: path patterns with explicit `/` separators never match on Windows
- [BUG] Version: 2.1.14 Stop hook fires →
- Hooks stop firing entirely after editing settings.local.json — Desktop 2.1.156 Windows
- security-guidance: Stop-hook LLM review broken on Windows when worktree has many untracked files (WinError 206)
- WorktreeCreate hook 'Hook cancelled' for worktree Agent when dispatched alongside a sibling Agent call in one message
- security_reminder_hook.py uses Unix-only /tmp/ log path (breaks on Windows)
- Stop hook infinite loop: hook execution creates new task files that re-trigger the hook
- Stop hook trace `No stderr output` fires every turn for passing hooks (session-scoped)
- [Bug] bash: .claude/hooks/skill-instructions-hook.sh: No such file or directory
- [Windows/Git Bash] PreToolUse hook enforcement silently bypassed — hooks exit 49 with no output or warning when python3 resolves to Store stub
- PostToolUse hook: check-sql-files.py missing in anthropic-skills plugin RPM directory (Windows)
- SessionStart hook output silently dropped when bare {additionalContext} shape coexists with raw-text hook on same matcher
- UserPromptSubmit hook does not fire on Windows platform
- Notification hook idle_prompt should also fire when AskUserQuestion is waiting for selection
- [BUG] Bash hooks (PreToolUse/PostToolUse) silently not invoked on Windows with settings.local.json-only config
- [Feature Request] Support OR syntax in hooks[].if field like matcher
- [Bug] CLI output latency degrades user experience
- Allow persistent prompt bar color via setting, flag, or hook output
- [Bug] System prompts and persona constraints not being applied during session
- [BUG] execvpe(/bin/bash) failed warning on Windows with Docker Desktop WSL (no proper WSL distro)
- [Feature Request] Companion customization & context window alerts
- Hook `if` field is silently ignored for Edit/Write tools (works for Bash) — v2.1.100
- Plugin PreToolUse hooks not invoked for Edit tool
- Feature request: Expose Epoch companion output programmatically (hooks / file / event)
- Feature Request: Silent/non-error display mode for Stop hook block decisions
- [BUG] security-guidance plugin hook fails on Windows — uses hardcoded python3
- [BUG] Hooks fail when user profile path contains spaces
- Feature request: PreCompact / PostCompact hook events
- Allow hooks to set session name (programmatic /rename)
- [BUG] Plugin hooks.json: ${CLAUDE_PLUGIN_ROOT} not expanded on Windows
- [BUG] Hooks execution deferred until terminal tab regains focus (Windows Terminal)
- Claude Code umgeht PreToolUse:Edit Hook durch Python-Script via Bash
- [BUG] SessionStart hooks hang indefinitely on Windows
- Edit tool's auto-opened Browser-pane preview silently reverts the file being edited
- [BUG] hookify rule files containing non-ASCII are silently skipped on Windows (open() without encoding)
- CLAUDE.md "main session must not write code" rule is not enforced — no hook prevents direct Write/Edit of code files
- [BUG] Windows hook commands with backslash paths silently never execute (bash eats the backslashes) — killed my memory hooks for 46 days
- EnterWorktree does not propagate to PreToolUse hook subprocesses — hooks keep resolving against the original repo directory, not the worktree
- Leading multi-slash prompts expand inconsistently (31/35 only the first, 4/35 all); UserPromptSubmit hooks can't see which were dispatched
- [BUG] PermissionRequest hook stops firing after CLI restart on Windows (v2.1.233)
- VS Code extension: hook permissionDecisionReason is never shown to the user (manual mode)
- [BUG] PreToolUse hooks are registered and listed by /hooks, but never execute (v2.1.219, Windows)
- [BUG] PreToolUse hook `updatedInput` is silently ignored for the Bash tool
- PreToolUse hook permissionDecision:"deny" not enforced in Claude Desktop/Cowork sessions (works in native CLI)
- [DOCS] WorktreeCreate hook stdin field is `name`, not the documented `worktree_path`
- PreToolUse hooks intermittently not invoked at all (VSCode extension host, Windows)
- Cowork (Windows): UserPromptSubmit hooks now execute, but stdout/additionalContext is discarded — wire hook output into context at parity with Claude Code
- [BUG] Windows: Claude Code never executes configured hook commands — hook runner invokes `git` instead and silently swallows the failure
- Windows: non-ASCII file paths corrupted (surrogate-escaped) when passed to PreToolUse Python hooks
- [BUG] duplicate for 69380 Plugin hooks.json does not register the MessageDisplay hook event (other events load fine)
- Windows: exec-form hook args with ${CLAUDE_PLUGIN_ROOT} lose backslashes (path mangled)
- Windows: PreToolUse/PostToolUse/Stop hooks trigger at ~1.2% rate instead of 100%
- PostToolUse hooks are not invoked when the tool's file path contains non-ASCII (e.g. Korean) characters (Windows)
- [BUG] CockroachDB plugin PostToolUse hook fires on every file write but script is never extracted
- Bash tool: foreground stdin is a held-open pipe — stdin-reading commands hang indefinitely and the timeout never fires (Windows/MSYS)
- [BUG] SessionStart hook env files (sessionstart-hook-N.sh) accumulate duplicate lines on re-run — never truncated; can escalate to null-byte Bash tool failure on Windows
- UserPromptSubmit hook failure blocks all input when plugin cache file is missing [Errno 2]
- Windows: SessionStart hooks that invoke bash fail (exit 127, bash: command not found)
- Plugin PostToolUse hooks still silently skip in Claude Desktop / Cowork (re-filing closed #51904)
- [Regression v2.1.153] Plugin bash hooks fail with "echo: write error: Permission denied" on Windows (claude-mem, shell: "bash")
- Hook `command` field is wrapped in bash -c '...'; substituted paths with apostrophes brick the session
- PreToolUse hooks may not fire for subagent (Agent tool) Bash calls
- [BUG] Can't even start hook due to stupid mkdir error since 2.1.80
- C:/Program Files/Git/new command should fire SessionStart hooks
- [BUG] Bash auto-background-on-timeout eligibility is evaluated post-rewrite and undocumented — hook-rewritten long commands are killed at 2m instead of backgrounded
- [BUG] PreToolUse updatedInput replaces the whole tool input — sibling fields (timeout, run_in_background) silently dropped
- [BUG] Work completes, delivery does not: 5 merged PRs and 471 green tests reached the user as nothing, because the model asks instead of acting at the last step
- Windows: exec-form hook args dropped, still routed through bash.exe, causing eval_stdin crash
- FileChanged hook not triggered by real file deletion (unlink) outside session cwd on Windows, despite correct settings.json config and watchPaths from SessionStart