Hooks issues on Windows
Issues the maintainers labelled both platform:windows and area:hooks.
331 issues · 114 open · 217 resolved (66%) · first seen Jan 7, 2026
Is this getting better or worse?
This class of problem is still growing. 139 new reports in the last 90 days vs 105 in the 90 before — +32%. The open backlog peaked at 114 in 2026-10 and sits at 114 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
217 of these reports name the Claude Code build they were running, spanning 112 releases. Heaviest reporters:
- Claude Code v2.1.289
- Claude Code v2.1.207
- Claude Code v2.1.143
- Claude Code v2.1.295
- Claude Code v2.1.284
- Claude Code v2.1.280
- Claude Code v2.1.260
- Claude Code v2.1.251
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 33 days across 217 closures. Of the 217 closures with a recorded reason, 24% were closed as completed and 165 as not-planned or duplicate. The most recent completed fix landed in 2026-09.
Workarounds reported by the community
120 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 · resolved - Session hangs mid-turn after a PreToolUse hook returns: tool never dispatches (2.1.220, Windows)
- …Windows event log / crash — empty; the process never dies. Workaround Kill and . Nothing is lost, as file edits are already on disk, but the in-flight turn and its reasoning are gone. What would help - A dispatch-stage…
Found in the description of #95354 · 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
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 1–100
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 331 matches; the statistics above cover all 331.
- [FEATURE] Expose pasted image data to hooks and plugins
- [BUG] SessionStart hooks break stdin on Windows Terminal
- [Windows] Visible console window flashes on every tool use in v2.1.143
- Session hangs mid-turn after a PreToolUse hook returns: tool never dispatches (2.1.220, Windows)
- [BUG] The Notification hook never fires when Claude Code runs as the VSCode native extension
- [BUG] UserPromptSubmit hook rejection reason never displayed (Desktop + VS Code)
- [BUG] Skill subagent inherits parent's 1M-context tier but not extra-usage entitlement
- Hook systemMessage and statusMessage not displayed in VSCode extension
- [BUG] PermissionDecision in PreToolUse is ignored in latest VS Code Extension
- CLAUDE_ENV_FILE written but not sourced for Bash tool calls on Windows
- [BUG] PreToolUse hooks fail silently — model bypasses "blocking" hooks without detection
- Terminal content disappears during streaming on Windows Terminal - Post Installing Everything Claude Code
- SessionEnd: agent-type hooks silently ignored while command-type hooks work
- Feature Request: PostToolUse hooks should fire for Skill invocations
- PreToolUse hooks and --allowedTools not enforced in headless -p mode
- PostCompact hook silent-miss and forced compaction detection failure on Windows 11 / git BASH
- HTTP hook intermittently fails with ECONNREFUSED despite healthy server
- [BUG] WorktreeCreate hook stdin payload doesn't match documentation — Workflow runtime sends 'name', docs say 'worktree_name' + 'base_path' + 'source_ref'
- [Windows] Statusline and hook commands spawn bash.exe without CREATE_NO_WINDOW, causing visible console flash every ~10 seconds
- [BUG] System instructions enforces push workflow by default, contradicting user control principle
- [BUG] Post-compact auto-read doubles hook injections — configurable autoReadFiles needed
- SessionEnd/Stop hooks should fire on /exit command
- [BUG] Windows: security-guidance's sg-python.sh launches `py -3` twice per hook; each launch of the Python Install Manager alias starts an AppX update that leaks ~1.6 MB in AppXSvc, exhausting system commit (21.8 GB in 12 h)
- Windows: hook processes are left SUSPENDED (never executed a single instruction), hanging the turn for 30-60+ minutes
- [BUG] /goal evaluator fires during background-shell wait windows, fragmenting agent execution
- [FEATURE] Expose sub-agent token usage in PostToolUse hook response
- [BUG] Windows: model is told Shell=PowerShell while hooks execute under bash — cross-shell foot-gun for hook authors
- [BUG] Claude Code — Per-Agent Permission Control Gap
- CLI hooks: process CWD drifts away from project root mid-session, causing bare-relative hook commands to resolve against the wrong directory (Windows, 2.1.113)
- [BUG] Remote SSH daemon (ccd-cli/2.1.111) exits with code 1 on initialize when hookCallbackIds are present
- SessionStart hook systemMessage not displayed when remote control is enabled via /config
- Feature request: Worktree-spawned agents should inherit parent session's hooks (PreToolUse/PostToolUse)
- [BUG] PreToolUse/PostToolUse warn hook systemMessage silently dropped without hookSpecificOutput
- [BUG] UserPromptSubmit and PostToolUse hooks fire intermittently on Windows 11 — same-matcher hooks have inconsistent trigger rates
- [BUG] security_reminder_hook.py loop — repeated "no such file" notification with no user input
- Bun 1.3.14 integer overflow panic on Windows x64 after long-running session (low memory) - claude 2.1.145
- [BUG] Windows: Bun crashes when UserPromptSubmit hook fires frequently in long sessions
- Notification hook matcher for non-recoverable API-error / rate-limit termination
- Auto Mode silently weakened by hook auto-blocks — functionally identical to Accept Edits On
- [BUG] [Cowork / Plugins] hooks.json silencieusement ignoré en mode Cowork
- Stop hook does not fire in VS Code / VSCodium extension mode
- [BUG] PreToolUse updatedInput silently ignored for Edit tool — works for Read and Bash
- Bug Report: Claude Code Stop hook does not receive stdin on Windows (PowerShell 5.1 + pwsh 7)
- Hook runner doesn't properly quote ${CLAUDE_PLUGIN_ROOT} on Windows paths with spaces
- [Bug] Stop hooks can hang indefinitely on large JSON block responses since 2.1.78
- PreToolUse hook with matcher 'Agent' does not block background Agent tool calls
- [BUG] security-guidance never runs its model reviews for subscription sign-ins (re-report of #77450 and #87145)
- [Windows] Bash tool permanently wedged: hook env (CLAUDE_ENV_FILE) grows on every compact, torn export line fails every command with "line 182: e: command not found" (exit 127)
- [BUG] WorktreeCreate hook does not keep the session transcript at the launch directory (docs say it does)
- SessionStart hooks defined in settings.json silently not invoked on Windows (v2.1.141)
- `matcher: "PowerShell"` works but is not documented as a supported value on tool events
- [BUG] ralph-loop Stop hook silently fails on Windows after Claude Code 2.1.126 (worked on 2.1.119)
- PreToolUse hook output on EnterPlanMode deprioritized by plan mode system prompt
- [BUG] PostToolUse hook for ExitPlanMode not triggered when accepting plan with clear context
- [BUG] Skill and agent frontmatter hooks silently not firing (CLI, Windows)
- [BUG] MessageDisplay no longer fires for text between tool calls (regression)
- [BUG] hookify rule files containing non-ASCII are silently skipped on Windows (open() without encoding)
- PreToolUse hooks never fire on Windows (v2.1.240)
- [BUG] Server-managed `allowManagedHooksOnly: true` silently disables custom statusLine (contradicts docs)
- Subagent tool calls: PreToolUse denials don't surface to the parent, and hook payload carries the parent's session_id
- SessionEnd hook killed before completing on exit ("Hook cancelled") — EXIT trap never runs, no configurable grace [2.1.187, tui: fullscreen]
- [BUG] SessionStart hook output silently truncated at 10KB — model never sees the missing content
- [BUG] Stop hook bash commands leave orphan child processes on Windows when parent dies abnormally
- [plugin: ralph-loop] stop-hook.sh #!/bin/bash shebang fails on Windows + Git Bash
- Plugin hooks: CLAUDE_PLUGIN_ROOT not injected into hook subprocess environment
- [BUG] Plugin hooks.json entries with shell-spawning command silently skipped on Windows; node-spawning entries trigger normally
- [Bug] SessionStart hook systemMessage no longer displayed in TUI (v2.1.119)
- [BUG] Managed hooks restriction bypassed when using ANTHROPIC_BASE_URL
- [BUG] PostToolUse hook blocks Edit diff rendering in CLI
- PreCompact hook never fires on auto-compaction (v2.1.105–v2.1.114, refs #13572)
- PermissionRequest HTTP hook fails closed when endpoint is unreachable, contradicting documented non-blocking behavior
- [BUG] Hook loop silently burns all context tokens — session dies with no warning that a hook caused it
- PreToolUse/PostToolUse hooks silently disabled in subagents due to CLAUDE_CODE_SIMPLE check in _R()
- PreToolUse hooks don't fire on user slash commands; PostToolUse does
- [BUG] Stop hook fails with EEXIST when plugin data directory already exists
- [FEATURE] Permission hook or API for remote/programmatic approval of tool use prompts
- Hooks with shell commands cause 5+ minute hangs/crashes on Windows
- ralph-loop plugin: hooks.json has invalid schema (causes Stop hook JSON validation error)
- [BUG] Some hooks stopped working in version 2.1.47 on Windows
- [BUG] SessionStart hook with 'compact' matcher: executes successfully but additionalContext not injected
- User-level hooks are skipped in untrusted workspaces; they should run regardless of trust
- [DOCS] Hooks reference: say that hook stdin is UTF-8, because Python hooks on Windows decode it with the ANSI code page and silently corrupt non-ASCII input
- [BUG] Windows: path-guard hook shared with Linux denies every Edit/Write, even on its own settings file (tool_input.file_path is D:\... but hook shell $PWD/$HOME are POSIX /d/...)
- security-guidance plugin hook fails with ENOENT in local-agent-mode-sessions staging, causing infinite retry/notification loop
- Feature request: a hook that fires after a session releases its worktree, so cleanup can succeed
- PreToolUse "ask" permissionDecision (and permissions.ask list) not enforced — tools run without confirmation
- Plugin hooks.json entries using exec form (command + args array) are silently ignored
- Hook path with spaces in username executes wrong file on Windows — unquoted ~ expansion splits path at space
- [BUG] SessionStart hook output is not visible to the user — only injected as internal context
- [BUG] Hook executor silent fail in v2.1.x — mid-session hooks never invoked despite registration
- [FEATURE] CLAUDE_ENV_FILE should propagate to PowerShell tool and child plugins, not bash-only
- Claude Code agent harness writes broken per-worktree core.hooksPath
- [BUG] [DEP0190] Startup hook with complex shell command triggers Node.js deprecation warning on every SessionStart
- Plugin-scoped PostToolUse hooks silently skip in Claude Desktop / Agent Mode
- [BUG] Excessive tendency to stop workflow when unnecessary even when directed in CLAUDE.md not to.
- VSCode extension: SessionStart hook receives source='startup' after /clear instead of 'clear'
- UserPromptSubmit hook additionalContext not injected into model context in VSCode extension
- CLAUDE_ENV_FILE not supported on Windows - not documented
- [BUG] Skills and hooks not available in worktrees created by `claude -w`
- PreToolUse hooks: two Windows bugs — echo corrupts JSON, pre-approved permissions bypass hooks