Hooks issues on Windows — page 2
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 101–200
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 331 matches; the statistics above cover all 331.
- [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
- [BUG] PreToolUse hooks (Bash/PowerShell matchers) never fire in Claude Desktop app "Code" tab, even after full re-login
- Hooks: unrecognized keys (e.g. `args`) are dropped silently, and hook stdout reaches the terminal with control sequences intact
- PostToolUse async hook invocations partially dropped on consecutive Write/Edit batches (Windows, 2.1.139)
- SubagentStart/SubagentStop counts stay mismatched: SubagentStop not emitted for subagents that terminate during an API-error burst
- Model substitutes its recent output pattern for the user's defined order — 4 consecutive times, under correction, with the definition in context
- [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
- hookSpecificOutput.additionalContext not injected into system prompt (Windows)
- [BUG] hookify plugin: 'No module named hookify' on every hook event when installed from marketplace
- Stop hook: $CLAUDE_PLUGIN_ROOT not injected when running plugin hooks
- [BUG] Version: 2.1.14 Stop hook fires →
- Hooks stop firing entirely after editing settings.local.json — Desktop 2.1.156 Windows
- [BUG] Files corrupted to same-size null bytes after Edit tool operations, not reproducible in isolation
- [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
- SessionEnd hook intermittently not fired for headless (-p) sessions (~50% observed)
- [BUG] Broken security_reminder_hook.py plugin persists after reinstall
- [BUG] Recurring "Background security review" notification loop from uninstalled security-guidance plugin — affects multiple unrelated sessions
- Plugin PreToolUse hook matcher removed from cache/hooks.json still fires after full restart
- [BUG] Hooks with `shell: "powershell"` spawn `pwsh` with no `powershell.exe` fallback, so hooks silently never run on a stock Windows box
- PreToolUse hook "ask" permissionDecision has no blocking effect in permission_mode: "auto"
- PreToolUse hook silently stops firing mid-session and never recovers; concurrent session unaffected
- 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)
- PreToolUse hook on `Edit|Write` is invoked and reaches a verdict, but its exit 2 is not enforced (Windows, agent-frontmatter and settings.json carriers)
- [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
- [BUG] SessionStart hook stdout not injected into context (regression 2.1.209 -> 2.1.215, desktop app)
- 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)
- Model behavior: agent substitutes easier implementations for explicit specs, makes unverified 'done' claims, games user-defined enforcement hooks (7-day pattern)
- [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
- [BUG] Hook `if` field: path patterns with explicit `/` separators never match on Windows
- 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
- 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")
- 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