Hooks issues on macOS
Issues the maintainers labelled both platform:macos and area:hooks.
392 issues · 88 open · 304 resolved (78%) · first seen Aug 22, 2025
Is this getting better or worse?
This class of problem is converging. 127 new reports in the last 90 days vs 244 in the 90 before — -48%. The open backlog peaked at 88 in 2026-08 and sits at 88 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
264 of these reports name the Claude Code build they were running, spanning 108 releases. Heaviest reporters:
- Claude Code v2.1.87
- Claude Code v2.1.126
- Claude Code v2.1.119
- Claude Code v2.1.81
- Claude Code v2.1.92
- Claude Code v2.1.71
- Claude Code v2.1.63
- Claude Code v2.1.143
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 31 days across 304 closures. Of the 304 closures with a recorded reason, 26% were closed as completed and 226 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
161 of these issues post a workaround someone says worked. The highest-engagement ones:
- [BUG] WorktreeCreate / Remove hooks not called in Claude Desktop
- Workaround: use PreToolUse on Agent with worktree isolation to trigger your lifecycle hooks: This works in Claude Desktop because PreToolUse/PostToolUse hooks fire normally — it's only the dedicated WorktreeCreate/Worktr…
Found in the thread of #29716 · still open - Post/PreToolUse Hooks Not Executing in Claude Code
- …oolUse event actually being triggered by tool execution? 🔄 Workaround Status Currently using reactive PostToolUse validation instead of preventive PreToolUse blocking , but this is: - ❌ After-the-fact (damage already do…
Found in the thread of #6305 · still open - [BUG] Cowork sessions ignore user hooks and managed settings — sandbox platform mismatch breaks all settings resolution
- …the macOS host are not forwarded. This means the documented workaround from 34428 ( in settings.json block) doesn't work for cowork — settings.json isn't loaded (Root Cause 1), and even if set in the host shell, the env…
Found in the description of #40495 · still open - [Bug] EnterWorktree tool ignores WorktreeCreate/WorktreeRemove hooks
- Workaround: use a hook on to trigger your own lifecycle hooks: Similarly for cleanup: This ensures your lifecycle hooks fire even when using the EnterWorktree tool, until the native WorktreeCreate/WorktreeRemove events a…
Found in the thread of #36205 · still open - [BUG] PreToolUse permissionDecision: "allow" no longer suppresses prompt for Bash with dangerouslyDisableSandbox: true (2.1.116+ regression)
- …r any command that is sandbox-eligible but invoked with \ . Workarounds available today: 1. Migrate the policy decision into \ rules (loses dynamic context, transcript-aware judging, etc.). 2. Set \ — flips \ to true, th…
Found in the thread of #51798 · 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 392 matches; the statistics above cover all 392.
- [BUG] WorktreeCreate / Remove hooks not called in Claude Desktop
- Post/PreToolUse Hooks Not Executing in Claude Code
- [BUG] Cowork sessions ignore user hooks and managed settings — sandbox platform mismatch breaks all settings resolution
- [Bug] EnterWorktree tool ignores WorktreeCreate/WorktreeRemove hooks
- [BUG] PreToolUse permissionDecision: "allow" no longer suppresses prompt for Bash with dangerouslyDisableSandbox: true (2.1.116+ regression)
- [BUG] Stop hook causes empty result in print mode (-p)
- [BUG] /goal Stop hook fails with "JSON validation failed" when prompt-based hook returns markdown-fenced JSON; goal never auto-clears
- [BUG] Project settings hooks not loaded when working directory is a subdirectory of the repo
- Assistant text before/between tool calls is not rendered in the CLI, while hooks and the transcript still see it
- [BUG] Claude Code in the Claude Desktop app runs UserPromptSubmit hooks and enforces blocks, but renders no user-facing hook feedback (CLI renders all)
- 2.1.141: Notification:permission_prompt hook event stops firing during active thinking (regression from 2.1.139)
- [BUG] IS_DEMO env var suppresses workspace trust prompt without granting trust, breaking statusline and hooks
- Stop hook with exit code 2 displays as 'Stop hook error' instead of feedback
- Desktop sidebar ignores UserPromptSubmit hook `sessionTitle` output
- [BUG] Notification hooks not firing for permission_prompt in VS Code extension
- WorktreeCreate hook causes indefinite hang regardless of hook command
- WorktreeRemove hook not invoked for subagent worktrees (isolation: worktree)
- [BUG] UserPromptSubmit hook rejection reason never displayed (Desktop + VS Code)
- Cowork: Support Claude Code hooks (~/.claude/settings.json — UserPromptSubmit, Stop, etc.)
- [BUG] PreToolUse hook "ask" permissionDecision is auto-approved in auto mode — no way to force prompt
- WorktreeRemove hook never fires when a worktree is removed at session exit
- PreToolUse:Bash hooks not invoked in v2.1.176 (registered hooks silently inert)
- [BUG] PreToolUse "if: Bash(foo*)" falsely matches Bash commands containing $()
- [BUG] Plugin-registered WorktreeCreate hooks in hooks/hooks.json are never dispatched — settings.json hooks for the same event fire normally (2.1.101)
- ${CLAUDE_SKILL_DIR} not substituted in SKILL.md frontmatter hook commands
- ~/.claude/settings.json loads in sessions started with CLAUDE_CONFIG_DIR pointing elsewhere (hooks, statusLine, env, model, enabledPlugins all bleed)
- EnterWorktree validates hook-created (non-git) worktrees against the git worktree list, refusing to enter them
- PreToolUse(Bash) hook returning permissionDecision: "defer" causes "[Tool result missing due to internal error]"
- [BUG] PermissionRequest hook 'allow' for ExitPlanMode is ignored since v2.1.199 — plan-approval chooser still blocks
- Agent-type hooks error on all event types (SessionStart, UserPromptSubmit, PostToolUse)
- [BUG] http hooks with json don't work.
- AskUserQuestion returns empty answer when PreToolUse hook + skill allowed-tools are both present
- Regression: SessionStart hook and skills listing re-injected on every --resume (fixed in v2.1.69/v2.1.70, broken again in v2.1.74)
- Claude Code 2.1.116 freezes with main thread in V8/JSC tight loop (100% CPU, all Anthropic API connections lost, no recovery)
- SubagentStop hook does not fire when team agents terminate via shutdown protocol
- Elicitation hooks not triggered with --input-format stream-json
- Bug: claude-plugins-official - learning/explanatory-output-style hook scripts missing execute permission
- Feature Request: SubagentStart hook should support updatedInput to enable deterministic model routing
- [BUG] No hook event fires for sandbox network permission popup in v2.1.120 (regression from v2.1.76)
- [BUG] Model fabricates subsequent user/system turns inside one assistant message, then acts on its own fabrication
- [FEATURE] Desktop: expose worktree name/base input in UI + pass branch-prefix & base branch into the WorktreeCreate hook payload
- [BUG] `matcher: "Skill"` no longer works for hooks
- PreToolUse hook matcher does not fire for Bash(git commit) and Bash(git push) on protected branch
- [BUG] Hook stderr output is silently swallowed — not visible to user (all hook types)
- [BUG] SessionEnd hook cancelled with "Request interrupted by user" on Ctrl+C in Version 2.1.72
- PermissionRequest hook fires for every tool check, not just when actually blocked
- [BUG] New claude code version breaks Warp plugin integration (and other plugins) by blocking plugin terminal access
- PostToolUse hookSpecificOutput.updatedToolOutput not honored for Bash tool in v2.1.121
- PermissionRequest hook does not override .claude/** sensitive-path prompt on macOS 2.1.119
- [BUG] SessionStart hook stdout not reliably surfaced by model in first response
- [BUG] PreToolUse hooks not triggered for @file reference reads
- [BUG] v2.1.210 regression: PreToolUse prompt-hook deny stops the entire turn (hook_stopped_continuation) instead of returning a tool error
- PostToolUse `updatedToolOutput` silently ignored for built-in Bash tool (2.1.163/2.1.177) — regression; prior reports #65403/#67442/#54196 closed as duplicate, never fixed
- SessionStart hooks with mcp_tool type fire before MCP servers connect
- [Bug] Hook subprocess cleanup causes 100% CPU freeze on task interruption
- PreToolUse hook `updatedInput` silently ignored for Agent tool
- [BUG] Bypass permission mode resets after a PreToolUse hook returns "ask"
- No native way to sync Claude Code config and skills across machines
- [BUG] Session resume loses 80%+ of conversation — progress entries create parasitic forks in parentUuid chain
- [BUG] Desktop app crashes on hook_callback control request — "Failed to load session" on any query triggering tool use
- WorktreeCreate hook fails with EPERM for repos under ~/Documents — hook spawned via 'disclaimer' shim loses the app's TCC Documents grant
- [BUG] API Error: 400 — thinking or redacted_thinking blocks in the latest assistant message cannot be modified.
- [BUG] /goal stop hook "Prompt is too long" in long-conversation sessions even with 1M-context model enabled
- Webview crash "Unhandled case: [object Object]" — markdownlint diagnostics with non-string `code` field
- [FEATURE] Token usage visibility and threshold hooks in Claude Code
- [BUG] `SessionStart` hook output truncated to 2000 characters when 10,000 character limit exceeded
- [BUG] Plugin .sh files lose execute permission on marketplace update
- `SessionStart` hook reports original session ID instead of forked ID when using `--fork-session`
- PreToolUse hooks don't block in headless (-p) mode or with allowedTools wildcard
- Subject: BUG: Persistent 429 Rate Limit Error / Stuck Stop Hooks on Claude Max Plan Message
- Background auto-mode sessions execute Bash calls matching ask rules (and PreToolUse hook ask decisions) without any prompt (2.1.215)
- [BUG] PreToolUse hook is not invoked after a static ask rule for the same command pattern receives session-level approval
- Background/agent isolation: "worktree" creates worktrees without firing the WorktreeCreate hook
- [BUG] v2.1.142 VSCode extension: PostToolUse Bash hook does NOT fire for LLM-initiated Bash tool calls (stream-json mode)
- [BUG] PostToolUse prompt hook returning {"ok": false, "reason": ...} terminates the turn instead of feeding reason back to the model
- [BUG] PreToolUse and PostToolUse hooks: all context-injection channels (additionalContext, systemMessage, plain stdout) dropped for Bash matcher in v2.1.123
- [Bug] Stop hooks can hang indefinitely on large JSON block responses since 2.1.78
- [BUG] $CLAUDE_PROJECT_DIR is empty/unset in hook and Bash tool execution (v2.1.74)
- PreToolUse hooks fail open when script file is missing; session deleted its own hook to bypass constraint
- [BUG] Prompt-type Stop hook returns {"ok": false} but stop is not blocked
- [Bug] Project context lost when Bash tool changes into nested git repository
- [Bug] PreToolUse hook with additionalContext causes model turn to terminate on tool error
- SessionStart HTTP hooks silently fail (other "command only" events work fine)
- [DOCS] Hooks: add stability warning for many parallel hooks on the same matcher
- PreToolUse hook permissionDecision "ask" is silently auto-approved under bypassPermissions (deny works)
- PreToolUse hook `allow` does not suppress prompt for compound commands leading with `cd … 2>/dev/null || cd …` (2.1.207 fix incomplete)
- [BUG] Prompt cache invalidated by rewrites of messages in long sessions
- [BUG] SubagentStop hook fires on main session/agent
- URL scheme to deep-link a notification click to a specific conversation
- PostToolUse hook does not fire for Agent tool completions
- [BUG] `--dangerously-skip-permissions` skips trust dialog without persisting `hasTrustDialogAccepted=true`, silently disabling project-level `statusLine` / hooks'
- [BUG] Claude Desktop's worktree creation flow does not fire the WorktreeCreate hook
- /reload-plugins does not reload hook scripts — stale hooks persist until session restart
- Auto-mode classifier overrides PreToolUse hook `ask` for in-flow `git commit` / `push`
- [bug] agent-browser skill: Chrome headless processes orphaned after session ends (97% CPU, 10GB RAM leak)
- Hook bug: PreToolUse permissionDecision:deny is silently ignored on ExitPlanMode
- [BUG] Hook PermissionRequest contract: setMode:'bypassPermissions' silently dropped in 2.1.110+, breaking a documented extension path
- [BUG] Calling `claude -p` from a `SessionEnd` hook can recursively create child sessions that trigger hooks again
- Plugin SessionStart hooks execute but additionalContext stdout is silently discarded
- Stop hook receives stale transcript - race condition with file flush