[Bug] PostToolUse hook blocking error displayed twice (regression)

Resolved 💬 3 comments Opened Feb 5, 2026 by adamrenklint Closed Feb 9, 2026

Bug Description

PostToolUse hooks that return a blocking error (JSON with "decision": "block") display the error message twice in the terminal and inject two identical <system-reminder> blocks into Claude's context.

This appears to be a regression of previously fixed issues.

Environment Info

  • Platform: darwin (macOS)
  • Version: 2.1.31
  • Terminal: Apple Terminal

Steps to Reproduce

  1. Create a minimal test folder:
mkdir -p ~/hook-test/.claude/hooks
  1. Create .claude/settings.json:
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": ".claude/hooks/test-hook.sh"
          }
        ]
      }
    ]
  }
}
  1. Create .claude/hooks/test-hook.sh:
#!/usr/bin/env bash
echo '{"decision": "block", "reason": "Test error from hook"}'
  1. Make it executable: chmod +x .claude/hooks/test-hook.sh
  1. Create a test file: echo "test" > test.txt
  1. Start Claude Code in that folder and ask it to edit test.txt

Expected behavior

Hook error appears once:

⎿ PostToolUse:Edit hook returned blocking error

Actual behavior

Hook error appears twice:

⎿ PostToolUse:Edit hook returned blocking error
⎿ PostToolUse:Edit hook returned blocking error

Claude also receives two identical <system-reminder> blocks, wasting context tokens.

Related Issues

This appears to be a regression of:

  • #9208 - Duplicate PostToolUse:Edit Hook Calls (closed)
  • #10871 - Plugin-registered hooks executed twice (closed)
  • #14281 - Hook additionalContext injected multiple times (closed, commenter noted "fixed in v2.1")

View original on GitHub ↗

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