Hooks issues on Windows
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 1–100
Ranked by community engagement (reactions weighted over comments).
- [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
- [BUG] UserPromptSubmit hook rejection reason never displayed (Desktop + VS Code)
- [BUG] The Notification hook never fires when Claude Code runs as the VSCode native extension
- [BUG] Skill subagent inherits parent's 1M-context tier but not extra-usage entitlement
- [BUG] PermissionDecision in PreToolUse is ignored in latest VS Code Extension
- Hook systemMessage and statusMessage not displayed in VSCode 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
- HTTP hook intermittently fails with ECONNREFUSED despite healthy server
- [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] WorktreeCreate hook stdin payload doesn't match documentation — Workflow runtime sends 'name', docs say 'worktree_name' + 'base_path' + 'source_ref'
- [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
- PostCompact hook silent-miss and forced compaction detection failure on Windows 11 / git BASH
- 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
- 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)
- [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
- [BUG] WorktreeCreate hook does not keep the session transcript at the launch directory (docs say it does)
- 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
- [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
- 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
- [BUG] PreCompact hook exit code 2 does not block compaction
- [Bug] Stop hook execution fails with PowerShell encoding error on Windows
- Hook documentation is misleading — Stop hooks broken, prompt hooks can't inject context, capabilities undocumented per event type
- Feature Request: Add type: "prompt" for SessionStart hooks to enable auto-execution of setup tasks
- EnterWorktree bypasses PreToolUse hooks — executes filesystem ops before hooks fire
- Plugin hooks.json: command hooks silently dropped for PreToolUse/PostToolUse events
- [BUG] SessionStart hooks in remote-settings.json silently ignored by non-terminal clients
- [FEATURE] Support terminal tab color escape sequences from hooks and Bash tool (Windows Terminal)
- [BUG] : Windows: CLI soft‑bricked after adding daily “auto‑fetch” hook; can't reinstall
- PreToolUse/PostToolUse hooks don't fire in non-interactive -p mode
- [BUG]: VS Code Extension: Windows-styled paths in command in hooks
- PreToolUse hooks never fire on Windows (v2.1.240)
- Hooks: unrecognized keys (e.g. `args`) are dropped silently, and hook stdout reaches the terminal with control sequences intact
- PreToolUse "ask" permissionDecision (and permissions.ask list) not enforced — tools run without confirmation
- SubagentStart/SubagentStop counts stay mismatched: SubagentStop not emitted for subagents that terminate during an API-error burst
- Plugin hooks.json entries using exec form (command + args array) are silently ignored
- hookSpecificOutput.additionalContext not injected into system prompt (Windows)
- Stop hook: $CLAUDE_PLUGIN_ROOT not injected when running plugin hooks
- Hook path with spaces in username executes wrong file on Windows — unquoted ~ expansion splits path at space
- [BUG] Files corrupted to same-size null bytes after Edit tool operations, not reproducible in isolation