Hooks issues on macOS — page 3
Issues the maintainers labelled both platform:macos and area:hooks.
500 issues · 134 open · 366 resolved (73%) · first seen Aug 22, 2025
Is this getting better or worse?
This class of problem is holding steady. 153 new reports in the last 90 days vs 177 in the 90 before — -14%. The open backlog peaked at 134 in 2026-10 and sits at 134 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
368 of these reports name the Claude Code build they were running, spanning 145 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 34 days across 366 closures. Of the 366 closures with a recorded reason, 23% were closed as completed and 282 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 201–300
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 500 matches; the statistics above cover all 500.
- WorktreeCreate no-op hook causes silent hang on `claude -w` startup
- [BUG] Claude fails silently in VSCode with hook failures
- [BUG] session.compact mod hook no longer raised in 2.1.299 (manual and automatic compaction)
- [Bug] Stop hook repeatedly triggers with "full milestone completion" demand in loop sessions
- Synced plugin update moves the plugin folder of an open session to .trash; its hooks then fail open
- [BUG] VS Code extension: PreToolUse callback saveFileIfNeeded never resolves — every Read/Write waits 600 s and fails ("host client may be unreachable")
- ExitWorktree can't remove a worktree launched via --worktree (or entered via path:), so WorktreeRemove hook never fires and per-worktree resources leak
- PreToolUse hook on Write/Edit/MultiEdit/NotebookEdit is not enforced (PostToolUse on same matcher fires reliably)
- [BUG] WorktreeCreate hook returning a path outside the repository is always refused: "git could not be run to resolve it"
- [Bug] PreToolUse/PostToolUse hooks not fired for subagent tool calls
- [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] Unquoted ${CLAUDE_PLUGIN_ROOT} in plugin hooks.json breaks all hooks on macOS (space in path); hookify's PreToolUse hook blocks every tool call
- [BUG] Hooks in a mid-session-created `.claude/settings.json` never arm until restart (settings watcher scans once at startup, skips a not-yet-existent `.claude/`)
- [BUG] PreToolUse hook `permissionDecision: "ask"` is overridden by `auto` mode for benign `dangerouslyDisableSandbox` commands (contradicts documented hook precedence)
- 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)
- Hook runner spawns with deleted session cwd — every hook fails with `ENOENT: posix_spawn '/bin/sh'` and PreToolUse deny-hooks fail open (distinct from the Bash-tool cwd validation)
- [Feature Request] Consolidate workflow progress visibility and add post-workflow hooks
- [BUG] SessionStart Hook in Project Settings Crashes All Agent View Background Sessions
- Monitor tool events trigger UserPromptSubmit hooks, polluting conversation
- [Feature Request] Desktop mode does not support webhook hooks for notifications
- [BUG] CLAUDE_ENV_FILE variables not available in Bash on resumed sessions (--continue/--resume)
- PostToolUse agent hook fails with "Messages are required for agent hooks. This is a bug."
- [Bug] Bash tool not auto-sourcing CLAUDE_ENV_FILE in shell initialization
- Hook errors for PreToolUse:Agent / PostToolUse:Agent surface cryptic "command not found" output
- if field in hooks does not match file-extension patterns — Edit(*.ts) never fires even for TypeScript files
- [FEATURE] Sub-agents should inherit CLAUDE_ENV_FILE environment variables from parent session
- PreToolUse hook 'allow' cannot bypass Bash sensitive path ask rules (unlike Edit/Write)
- Agent-type PreToolUse hooks fail: 'Messages are required for agent hooks'
- UserPromptSubmit hook reports 'error' despite exit 0 and valid JSON output
- [BUG] Stop hook feedback with no output creates an infinite loop
- PostToolUse additionalContext silently dropped for Agent tool calls
- WorktreeCreate hook causes --worktree flag to hang indefinitely
- CLAUDE_PLUGIN_ROOT env var not always set when invoking plugin hooks
- PreToolUse hook 'if' field does not filter hook process spawning (v2.1.87)
- [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
- Let a hook choose how its systemMessage is rendered: system (default) or assistant style
- [BUG] SessionStart hook systemMessage silently dropped on --continue/--resume/fork when additionalContext matches one already in the transcript
- [BUG] 2.1.270: session transcript JSONL omits most assistant text written before a tool call (interactive CLI)
- Hook output over the 10,000-character cap is silently collapsed to a 2 KB preview with no user-visible warning (ref #44086)
- 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"
- Agent SDK / desktop-app sessions load 0 hooks despite settings declaring them — SessionStart/Stop/UserPromptSubmit/PostToolUse never fire
- [BUG] Desktop: "+ New" worktree session fails with "WorktreeCreate hook failed: path contains control characters" (repo not under a TCC-protected folder)
- Hook error label prints unexpanded ${CLAUDE_PLUGIN_ROOT} and frames a deliberate block as a crash
- [BUG] .claude/settings.json is ignored when starting from a subdirectory — hooks and plugins silently disabled (still repros on 2.1.228; see #10367, #8810)
- `background_tasks` never clears idle `in_process_teammate` entries, so Stop-hook consumers can't tell a finished teammate from a working one
- Interactive TUI drops `MessageDisplay` `displayContent` (honored in `--print`) — v2.1.227
- [BUG] Edit reports success and reads back the edit, but never writes to disk (worktree + PreToolUse hook; no sandbox)
- [BUG] HOME environment variable not set in hook process environment
- [BUG] /hooks omits hooks from managed-settings.json even though they execute
- `headersHelper` on `type:"http"` hooks silently ignored since ≤2.1.209 — no changelog, no deprecation, no unknown-field warning
- PreToolUse hook's empty stdout forces an interactive prompt, ignoring an existing allow rule (VS Code extension)
- Third-party plugin (Codex Companion) silently made unauthorized Anthropic API calls using inherited ANTHROPIC_API_KEY
- Mobile-bridge answer silently dropped (no queue-op, no tool_result) when a Stop-hook-triggered turn supersedes the state being answered
- [BUG] VS Code extension renders no SessionStart hook output — systemMessage, statusMessage, and additionalContext never reach the user (refile of stale-closed #47692)
- Bash tool cwd does not persist across tool calls; hooks receive stale cwd instead of triggering command's actual directory
- Identical hook commands registered in settings and in a plugin's hooks.json are not deduplicated — the hook executes once per source, concurrently
- SubagentStop hook payload: expose usage tokens and model of the finished subagent
- One schema-invalid hook matcher silently disables ALL settings.json hooks (no warning); PostToolUse never fires for MCP tools
- [BUG] Spinner shows stale "running stop hooks… N/M" through the entire next turn (async Stop hooks never tick the counter; summary skipped on queued continuation)
- /goal completion Stop hook re-matches phrases from earlier in the transcript forever, preventing clean session termination
- Stalled PostToolUse hook silently returns empty for all tool results, unrecoverable without full process restart
- [Bug] Session hook interrupts compaction process prematurely
- [FEATURE] Auto session-title generator ignores CLAUDE.md spelling/brand conventions, with no way to enforce or post-process
- [BUG] semgrep plugin PostToolUse hook constructs wrong path when editing files outside CWD
- [BUG] Cowork (local-agent-mode) syncs and runs plugins disabled in enabledPlugins settings
- [BUG] Sonnet 4.6 silently skips required Read of spilled-over UserPromptSubmit hook additionalContext file — Opus reads it 100% of the time under identical config
- Title: UserPromptSubmit hook returns mirrored Hebrew text and intercepts all chat messages
- SessionStart hooks crash when dispatcher routes through prompt-hook path expecting ToolUseContext
- [Bug] Stop hooks fail with "node: command not found" and missing plugin directories
- Plugin hooks.json registrations multiply additively (1×→122×) in multi-agent sessions (v2.1.156)
- [BUG] Opus 4.7 halts turn early after PreToolUse hook emits additionalContext on 2 calls