Hooks issues on VS Code
Issues the maintainers labelled both platform:vscode and area:hooks.
81 issues · 24 open · 57 resolved (70%) · first seen Feb 26, 2026
Is this getting better or worse?
This class of problem is holding steady. 31 new reports in the last 90 days vs 33 in the 90 before — -6%. The open backlog peaked at 24 in 2026-10 and sits at 24 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
59 of these reports name the Claude Code build they were running, spanning 49 releases. Heaviest reporters:
- Claude Code v2.1.260
- Claude Code v2.1.281
- Claude Code v2.1.220
- Claude Code v2.1.198
- Claude Code v2.1.224
- Claude Code v2.1.211
- Claude Code v2.1.210
- Claude Code v2.1.181
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 37 days across 57 closures. Of the 57 closures with a recorded reason, 23% were closed as completed and 44 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
29 of these issues post a workaround someone says worked. The highest-engagement ones:
- Feature request: built-in completion notifications for VS Code extension
- …ainful) The community has converged on increasingly complex workarounds: - Time-based debouncing (sleep 3s, check if another Stop fires) — arbitrary, unreliable - Transcript JSONL parsing in Stop hooks to find recent tim…
Found in the description of #29928 · still open - [BUG] Notification hooks not firing for permission_prompt in VS Code extension
- …created - Other hooks (PreToolUse, Stop) work as expected - Workaround: Using PreToolUse hook with matcher "Write Edit Bash NotebookEdit" to achieve similar functionality - Unclear if this issue exists in the CLI version…
Found in the description of #55875 · 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 - PreToolUse(Bash) hook returning permissionDecision: "defer" causes "[Tool result missing due to internal error]"
- …instead of falling through to the normal permission system. Workaround Disabling the hook (or changing - ) restores Bash. Neither is acceptable long-term: is documented as "fall through to the normal permission system,"…
Found in the description of #64389 · 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–81
Ranked by community engagement (reactions weighted over comments).
- Feature request: built-in completion notifications for VS Code extension
- [BUG] Notification hooks not firing for permission_prompt in VS Code extension
- 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)
- PreToolUse(Bash) hook returning permissionDecision: "defer" causes "[Tool result missing due to internal error]"
- Hook systemMessage and statusMessage not displayed in VSCode extension
- [BUG] PermissionDecision in PreToolUse is ignored in latest VS Code Extension
- [BUG] No hook event fires for sandbox network permission popup in v2.1.120 (regression from v2.1.76)
- [BUG] Session resume loses 80%+ of conversation — progress entries create parasitic forks in parentUuid chain
- Webview crash "Unhandled case: [object Object]" — markdownlint diagnostics with non-string `code` field
- [BUG] Claude Code — Per-Agent Permission Control Gap
- [BUG] Prompt cache invalidated by rewrites of messages in long sessions
- [BUG] v2.1.142 VSCode extension: PostToolUse Bash hook does NOT fire for LLM-initiated Bash tool calls (stream-json mode)
- Stop hook does not fire in VS Code / VSCodium extension mode
- [BUG] PreToolUse updatedInput silently ignored for Edit tool — works for Read and Bash
- [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)
- VS Code extension: Notification hooks don't fire on permission-approval or elicitation dialogs
- Hook bug: PreToolUse permissionDecision:deny is silently ignored on ExitPlanMode
- Read tool bypasses PreToolUse hooks and permissions.deny rules in VSCode extension
- [BUG] MessageDisplay no longer fires for text between tool calls (regression)
- VS Code extension: SessionStart plugin hook additionalContext logged as succeeded but never injected into model context
- SessionStart hooks fire for phantom sessions that never materialize (no transcript is ever created), racing the real session within a few hundred ms
- VS Code extension: Stop-hook-blocked draft and its rewrite both render as duplicate full responses
- Subagent tool calls: PreToolUse denials don't surface to the parent, and hook payload carries the parent's session_id
- Allow hooks to set the session name (e.g. reset tab title on /clear)
- [Bug] Stop hook error: Failed with non-blocking status code
- VSCode extension: SessionStart hook receives source='startup' after /clear instead of 'clear'
- UserPromptSubmit hook additionalContext not injected into model context in VSCode extension
- Stop hook does not fire in VSCode extension
- [BUG]: VS Code Extension: Windows-styled paths in command in hooks
- [BUG] VS Code extension: PreToolUse callback saveFileIfNeeded never resolves — every Read/Write waits 600 s and fails ("host client may be unreachable")
- [BUG] PostToolUse hook exit-2/stderr warning not delivered to model in VSCode extension
- [BUG] VS Code extension's native permission-prompt UI doesn't fire the Notification (permission_prompt) hook
- Stop hook does not fire reliably in VSCode extension (works via CLI, confirmed via git history)
- Session-env snapshot file breaks when sourced: unquoted LS_COLORS/SSH_CONNECTION/LESSCLOSE spam 'command not found' on every Bash call
- [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] ralph-loop: Stop hook fails to detect a correct <promise> when the transcript window contains a control character
- User-level settings.json hooks silently ignored in v2.1.120 VSCode extension
- [BUG] PostToolUse hook stdout JSON output duplicated in terminal and context (re-filing #23381)
- PreToolUse hook silently stops firing mid-session and never recovers; concurrent session unaffected
- PreToolUse hook's empty stdout forces an interactive prompt, ignoring an existing allow rule (VS Code extension)
- [BUG] VS Code extension renders no SessionStart hook output — systemMessage, statusMessage, and additionalContext never reach the user (refile of stale-closed #47692)
- 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] duplicate for 69380 Plugin hooks.json does not register the MessageDisplay hook event (other events load fine)
- [FEATURE] Programmatic control over session titles (disable / instruct / post-edit the auto-titler)
- [Bug] bash: .claude/hooks/skill-instructions-hook.sh: No such file or directory
- [BUG] VS Code extension doesn't render outputs from user-prompt-submit-hook
- [Bug] Notification hooks not firing for permission_prompt in VS Code extension
- [BUG] Notification hook does not fire in VS Code/Cursor extension when Claude asks for user input
- [Bug] FileChanged hook doesn't detect file modifications from Bash tool execution
- HTTP hooks silently fail in second+ concurrent sessions (report success, never send request)
- [Critical] Runaway: agent could not be stopped by any in-product means; only closing the VS Code window with the X button stopped it
- VS Code extension: Read/Write/Edit fail with "The user doesn't want to take this action right now" after the extension's control stream closes (no user action)
- [Opus 5] Every hook held. The model went around them. Six seam failures in one session under twelve enforced rules — and the two harness affordances that would close the seams
- [BUG] Agent re-submits a byte-identical rejected tool call 5x in a row while its prose claims the fix was applied
- [Bug] SessionStart hook sessionTitle not reflected in ListAgents alias
- [BUG] Stop hook no longer fires on stream-stall-terminated turns ("The response stopped arriving") — StopFailure fires instead but its decision output is ignored, breaking auto-continue hooks
- VS Code extension: PreToolUse 'ask' permission tier (static rules + hooks) silently resolves to allow, no prompt shown
- [Bug] Fable 5 fails to persist explicit per-turn anti-closure instructions and reverts to trained wrap-up format during active work
- [BUG] `/goal` and `/goal clear` report "No goal set" after a met/failed verdict while the Stop hook stays armed
- [BUG] `/goal`: the Stop-hook condition is frozen at creation time and the verifier cannot see later cancellation
- [FEATURE] VS Code extension doesn't render Stop-hook systemMessage
- [Feature Request] PreToolUse "Ask" return should include hook message and tool context
- VS Code extension: hook permissionDecisionReason is never shown to the user (manual mode)
- UserPromptSubmit hook not invoked when prompt contains an attachment (VSCode extension) — distinct from #58269
- [BUG] VS Code window reload fires SessionStart twice (throwaway source=startup + resume) — creates a phantom session hooks cannot distinguish
- [BUG] VS Code extension: Claude can't see problems of the file past a certain line
- PreMessageSend hook event silently removed in v2.1.96 — breaks existing configs without warning
- Include rate_limits data in hook inputs (Stop, Notification)
- [Bug] Duplicated Paragraphs in Responses; Reads Outside Allowed Directory Despite Hook Hardening
- [VS Code, Windows] The first Bash result fires CwdChanged for a drive-letter case change (`c:\` to `C:\`), and FileChanged stops firing
- VSCode extension: no hook fires when user rejects a tool permission prompt
- VS Code extension: the 60 s subprocess initialisation limit is hard-coded and counts SessionStart hooks the CLI itself allows 600 s for
- UserPromptSubmit hooks still never fire in the VS Code extension (2.1.263, Windows) — ref #15021
- [Bug] /goal stop hook repeatedly re-fires after user accepts BLOCKED outcome via AskUserQuestion
- PreToolUse and UserPromptSubmit hooks silently do not fire in the VS Code extension (all matchers tested: Read/Edit/Write, Task/Agent, Bash/PowerShell)
- [BUG] Claude Code VS Code Plugin freezes and lags with high-reasoning models; hooks fire before rendering catches up
- UserPromptSubmit hooks permanently stop firing for a session, correlated with a duplicate generate_session_title request