Hooks issues on macOS — page 3
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 242 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 201–300
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 392 matches; the statistics above cover all 392.
- [BUG] SessionStart/UserPromptSubmit hooks receive transcript_path before project directory exists (first session in new project)
- PreToolUse hooks "ask"/"deny" decisions are silently ignored for all auto-accepted tools
- [BUG] UserPromptSubmit type: command sometimes skipped
- Plugin marketplace hooks: .sh files missing execute permission on macOS Sequoia
- Plugin hook fails after cache hash changes: stale CLAUDE_PLUGIN_ROOT path
- SessionStart hook in settings.json never fires
- Stop hook breaks -p (print/pipe) mode — output is silently empty
- Plugin hook scripts in cache lose execute permission on extraction (worktree / unknown hash path)
- explanatory-output-style plugin SessionStart hook causes startup error
- Bug: cache_control TTL ordering error when hooks/MCP inject additionalContext into long conversations
- [BUG] --dangerously-skip-permissions resets mid-session when PreToolUse hooks are configured
- PreToolUse hook permissionDecision ignored since v2.1.78
- Hook spawn fails with ENOENT when session CWD is deleted
- Stop hook error: TabManager not available in CLI environment
- [BUG] Plugin system should validate system dependencies at install time, not silently fail at runtime
- claude-code-guide subagent returns incorrect hook schema for prompt-type Stop hooks
- Project .claude/settings.json hooks not loaded when session starts from subdirectory
- Plugin loader crashes on hooks.json with [] or {} (missing hooks key)
- [Feature Request] Add hook execution timing visibility to Claude Code CLI
- [BUG] Edit tool blocked when external process modifies file after read
- Hook execution failures are invisible in the desktop app and carry zero diagnostics (hook_non_blocking_error attachments with empty content)
- PreToolUse hook + background subagent: tools in the notification-woken turn are cancelled as "user doesn't want to take this action"
- [Bug] PreToolUse/PostToolUse hooks not fired for subagent tool calls
- Hook error label prints unexpanded ${CLAUDE_PLUGIN_ROOT} and frames a deliberate block as a crash
- [FEATURE/DOCS] SessionStart `initialUserMessage` is ignored in interactive sessions — support it, or warn and document as `-p`-only
- ask PreToolUse hook decision silently fails to surface in a top-level session carrying CLAUDE_CODE_CHILD_SESSION=1 (command executes instead of pausing for approval)
- [BUG] VS Code extension's native permission-prompt UI doesn't fire the Notification (permission_prompt) hook
- [BUG] WorktreeRemove hook never fires on worktree removal (claude --worktree exit → remove)
- [BUG] Interactive mode: manual /compact fires PreCompact but never PostCompact (print mode fires both) — v2.1.214, macOS
- [BUG] PreToolUse hook `permissionDecision: "ask"` is overridden by `auto` mode for benign `dangerouslyDisableSandbox` commands (contradicts documented hook precedence)
- Plugin-sourced hooks.json never fires, even though the plugin shows installed + enabled (no error, no registry entry evidence)
- One schema-invalid hook matcher silently disables ALL settings.json hooks (no error)
- Stop hook fires before the final assistant message is flushed to the transcript; hooks reading the transcript get the previous turn's message (breaks read-aloud accessibility)
- Plugin hooks (SessionStart, slash commands) not executed in Desktop app
- [BUG] PostToolUse hook not invoked when editing files outside project CWD (path-join bug in Go binary)
- [BUG] ralph-loop: Stop hook fails to detect a correct <promise> when the transcript window contains a control character
- [BUG] Session title permanently blank after /clear — UserPromptSubmit workaround defeated by unchanged-title no-op (follow-on to #67389)
- Plugin hooks.json registrations multiply additively (1×→122×) in multi-agent sessions (v2.1.156)
- [Feature Request] Consolidate workflow progress visibility and add post-workflow hooks
- Pinned background jobs auto-respawn from done state, firing agent-start notifications at idle
- [BUG] Hook `if` filters falsely match Bash commands containing brace expansion
- [BUG] Heuristic: skip `interrupted_turn` injection when the most recent assistant ended `stop_reason: "end_turn"` and the only trailing line is a hook artifact
- [Feature Request] EnterWorktree lacks environment variable injection for new worktree context
- [Bug] /goal command fails with "Prompt is too long" error above 200k tokens when 1M context window disabled
- Feature: native sustained-autonomous mode for Claude.app — current external workarounds race with mid-turn state
- [FEATURE] Support panel parameter in claude://resume deeplink to open plan pane
- Expose per-session/bg-job state visually in the terminal (extend agent-view color cues to split panes)
- PreToolUse hook deny reason not surfaced to agent's tool_result (v2.1.143)
- SessionStart hook only fires for the first ~5 project switches per Claude Code Desktop launch
- [BUG] /goal stop hook enters infinite loop when goal references unregistered skills
- Hooks need a way to write escape sequences to the user's terminal
- [BUG] VS Code extension doesn't render outputs from user-prompt-submit-hook
- `prompt`-type hooks crash on `SessionStart` with "ToolUseContext is required"
- [Bug] PostToolUse:Edit hook error - Invalid JSON output validation in hook response
- [BUG] settings.json `env` block not injected into hook subprocesses when running with --output-format stream-json (e.g. Cursor extension)
- Worktree archive prompt's git status check races SessionEnd hooks
- [BUG] `post-checkout` git hook does not fire when Claude creates a worktree
- [BUG] Worktree creation (-w) sets LC_ALL=C in hook subprocess, breaking UTF-8 handling in git hooks
- [BUG] Plugin-declared PostToolUse hook silently dropped on CLI v2.1.133 despite plugin enabled and hook syntactically valid
- Hook re-evaluation: UserPromptSubmit drops after mid-session script edits; Stop hook may miss first cold-start turn
- [BUG] Model fabricated user input mid-session, then "caught itself"
- [Bug] Settings discovery doesn't walk to git root, causing WorktreeCreate hooks to be silently skipped from subdirectories
- [Bug] SessionStart startup hook error: ToolUseContext is required for prompt hooks
- Stop hook fires repeatedly when system reminders interleave with stop attempts (stop_hook_active not propagating)
- SessionStart hook systemMessage renders as dismissable dialog (not inline) when remote-control is active
- InstructionsLoaded hook fires 3x per file per compact event (causes 3x context reload waste)
- [Bug] Notification hooks not firing for permission_prompt in VS Code extension
- Auto-mode permission decider denies remediation-gated retries after PreToolUse hook denial
- [BUG] No way to troubleshoot hooks
- [BUG] CLAUDE_ENV_FILE not sourced for `!`cmd`` template expansion in slash commands
- [BUG] CLI hooks run with restricted PATH that excludes /opt/homebrew/bin - Homebrew-installed binaries fail silently
- [BUG] `type: "agent"` hooks broken on PreToolUse— "Messages are required for agent hooks"
- [BUG] Notification hook does not fire in VS Code/Cursor extension when Claude asks for user input
- [Feature Request] Pre-task gate: enforce skill/context read before coding
- [Feedback] Opus systematic discipline failures — ignores own hooks, skills, and rules it wrote
- [Bug] Permission request UI flashes before hook auto-approval completes
- [Bug] PreToolUse:Write hook generates false positives for security warnings
- [Bug] FileChanged hook doesn't detect file modifications from Bash tool execution
- [BUG] SubagentStart hooks not fired for background agents (run_in_background: true)
- Hook blocking error text renders right-shifted instead of below
- CLAUDE_ENV_FILE contents leaked via ps aux, transcript, and accumulated session-env files
- Session state hook events for multi-tab terminal integration
- PreToolUse hooks fail when multiple hooks match the same tool (stdin contention)
- Plugin sync from GCS strips execute permission on .sh hook files
- ralph-loop plugin: stop-hook.sh missing execute permission
- [BUG] Marketplace plugin sync overwrites .sh file permissions, stripping execute bit
- ralph-loop plugin: stop-hook.sh missing execute permission
- Plugin marketplace: .sh files downloaded from GCS without executable permissions
- Plugin cache drops execute permission on hook scripts (unknown/ directory)
- Plugin installer strips execute permissions from hook scripts
- --worktree fails in non-git repos even with WorktreeCreate/WorktreeRemove hooks configured
- explanatory-output-style plugin: SessionStart hook fails due to missing execute permission on session-start.sh
- Plugin cache loses execute permissions on hook scripts (.sh files become 644 instead of 755)
- [Bug] Missing executable permission on stop-hook.sh script
- [Bug] Hooks unable to execute /rename command for automatic conversation renaming
- [BUG] Regression - PostToolUse hook errors
- [Bug] Claude Code JetBrains Plugin: SessionStart Startup Hook Error
- User-scope settings overwrite project-scope instead of merging (hooks, permissions)
- SessionStart: plugin hook's `hookSpecificOutput` format silently drops concurrent user hook's flat `additionalContext`
- Plugin hooks (PreToolUse) not propagated to subagents spawned by Agent tool