[BUG] Hookify plugin not passing blocking messages to Claude (missing permissionDecisionReason)

Resolved 💬 8 comments Opened Nov 26, 2025 by basher83 Closed Jan 16, 2026

Bug Description

The hookify plugin blocks tool calls correctly but the detailed blocking message is only shown to the user, not passed to Claude. This prevents Claude from understanding why a tool was blocked and how to fix it.

Root Cause

In plugins/hookify/core/rule_engine.py (lines 72-79), when blocking a PreToolUse, hookify returns:

return {
    "hookSpecificOutput": {
        "hookEventName": hook_event,
        "permissionDecision": "deny"
    },
    "systemMessage": combined_message
}

Per the hooks documentation, systemMessage is shown to the user, but permissionDecisionReason is what gets passed to Claude when permissionDecision is "deny".

Expected Behavior

Claude should receive the detailed blocking message (e.g., "Use uv run pytest instead of pytest") so it can correct its behavior.

Actual Behavior

Claude only receives a generic "Hook PreToolUse:Bash denied this tool" message without the helpful guidance from the hook's markdown body.

Proposed Fix

Add permissionDecisionReason to the hookSpecificOutput:

return {
    "hookSpecificOutput": {
        "hookEventName": hook_event,
        "permissionDecision": "deny",
        "permissionDecisionReason": combined_message  # Add this line
    },
    "systemMessage": combined_message
}

Environment Info

  • Discovered after PermissionRequest hooks update (changelog: "Enable PermissionRequest hooks to process 'always allow' suggestions")
  • Hookify was merged in PR #11752 before permissionDecisionReason was available

Reproduction

  1. Create a hookify rule that blocks a command (e.g., hookify.require-uv.local.md)
  2. Have Claude try to run the blocked command
  3. Observe that Claude only sees "denied" without the detailed guidance

View original on GitHub ↗

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