Hooks issues on macOS
Issues the maintainers labelled both platform:macos and area:hooks.
499 issues · 135 open · 364 resolved (73%) · first seen Aug 22, 2025
Is this getting better or worse?
This class of problem is holding steady. 156 new reports in the last 90 days vs 173 in the 90 before — -10%. The open backlog peaked at 135 in 2026-10 and sits at 135 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
367 of these reports name the Claude Code build they were running, spanning 144 releases. Heaviest reporters:
- Claude Code v2.1.87
- Claude Code v2.1.281
- Claude Code v2.1.126
- Claude Code v2.1.270
- Claude Code v2.1.119
- Claude Code v2.1.81
- Claude Code v2.1.92
- Claude Code v2.1.71
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 364 closures. Of the 364 closures with a recorded reason, 23% were closed as completed and 281 as not-planned or duplicate. The most recent completed fix landed in 2026-10.
Workarounds reported by the community
190 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 - [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 - 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] 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 499 matches; the statistics above cover all 499.
- [BUG] WorktreeCreate / Remove hooks not called in Claude Desktop
- [BUG] Cowork sessions ignore user hooks and managed settings — sandbox platform mismatch breaks all settings resolution
- Post/PreToolUse Hooks Not Executing in Claude Code
- [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] IS_DEMO env var suppresses workspace trust prompt without granting trust, breaking statusline and hooks
- [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)
- WorktreeRemove hook never fires when a worktree is removed at session exit
- Desktop sidebar ignores UserPromptSubmit hook `sessionTitle` output
- [BUG] Notification hooks not firing for permission_prompt in VS Code extension
- Stop hook with exit code 2 displays as 'Stop hook error' instead of feedback
- 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)
- PreToolUse:Bash hooks not invoked in v2.1.176 (registered hooks silently inert)
- 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
- [BUG] PermissionRequest hook 'allow' for ExitPlanMode is ignored since v2.1.199 — plan-approval chooser still blocks
- ~/.claude/settings.json loads in sessions started with CLAUDE_CONFIG_DIR pointing elsewhere (hooks, statusLine, env, model, enabledPlugins all bleed)
- [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
- 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] Grep/Glob removal on native macOS/Linux is a breaking API change, not a docs gap (re: #51781)
- 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
- Any function-hook tool.call on Bash breaks Agent isolation: "worktree" — every Bash call refused with "isolation context for this agent was lost"
- [BUG] Model fabricates subsequent user/system turns inside one assistant message, then acts on its own fabrication
- 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)
- [FEATURE] Desktop: expose worktree name/base input in UI + pass branch-prefix & base branch into the WorktreeCreate hook payload
- 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
- [BUG] IS_DEMO still suppresses the workspace trust prompt in 2.1.263 — all hooks, statusLine and project permissions silently disabled, and /doctor has no trust check
- [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] 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
- [BUG] New claude code version breaks Warp plugin integration (and other plugins) by blocking plugin terminal access
- [Bug] Hook subprocess cleanup causes 100% CPU freeze on task interruption
- 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
- 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)
- UserPromptSubmit fires for agent/system-injected messages with no prompt_source/is_meta in the payload — hooks cannot tell them from typed input (prompt-injection surface)
- 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.
- SessionStart hooks with mcp_tool type fire before MCP servers connect
- [BUG] `SessionStart` hook output truncated to 2000 characters when 10,000 character limit exceeded
- 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
- [FEATURE] Honor hookSpecificOutput.sessionTitle from PostToolUse/Stop hooks (mid-turn session rename)
- Background auto-mode sessions execute Bash calls matching ask rules (and PreToolUse hook ask decisions) without any prompt (2.1.215)
- [Feature Request] Expose auto-mode denial reason in PermissionDenied hook payload
- [BUG] PreToolUse hook is not invoked after a static ask rule for the same command pattern receives session-level approval
- [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] 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
- [DOCS] Hooks: add stability warning for many parallel hooks on the same matcher
- effortLevel has no session-scoped write channel: only the global ~/.claude/settings.json is live-reread, causing cross-session collisions
- PreToolUse hooks can't reach the Bash file-command recognition that Read/Edit deny rules use, and the Bash-first directive routes reads there
- 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
- 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
- Stop hooks fail with ENOENT for /bin/sh on macOS (posix_spawn)
- [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)
- security-guidance: agentic commit review body is replaced by the inner CLI's stderr warning