PreToolUse hook permissionDecision ignored since v2.1.78

Resolved 💬 3 comments Opened Mar 22, 2026 by Khodunov Closed Mar 24, 2026

Bug Report

Version: v2.1.78 (regression from v2.1.77)

Description:
Starting in v2.1.78, PreToolUse hooks fire and execute successfully, but the permissionDecision field in the hook's JSON output is ignored. The user is still prompted for approval even when the hook returns "permissionDecision": "allow".

Bisected range:

  • v2.1.76 ✅ works
  • v2.1.77 ✅ works
  • v2.1.78 ❌ broken (permissionDecision ignored)
  • v2.1.81 ❌ broken

Hook configuration (project .claude/settings.json):

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "bash /path/to/hook-script.sh"
          }
        ]
      }
    ]
  }
}

Hook script (simplified):

#!/bin/bash
INPUT=$(cat)
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')

if [[ "$FILE_PATH" == *".claude/tmp/"* ]]; then
  echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow","permissionDecisionReason":"Auto-approved"}}'
  exit 0
fi

exit 0

Expected: Hook returns permissionDecision: "allow" → tool call proceeds without prompting.
Actual: Hook executes successfully (confirmed via debug logging to a file), but the permission decision is ignored and the user is still prompted to approve the tool call.

Reproduction:

  1. Configure a PreToolUse hook with permissionDecision: "allow" as above
  2. Run npx @anthropic-ai/claude-code@2.1.77 — hook fires, auto-approves ✅
  3. Run npx @anthropic-ai/claude-code@2.1.78 — hook fires, but user is still prompted ❌

Platform: macOS (Darwin 25.2.0)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗