Bug: permissionDecisionReason not rendered in dialog when permissionDecision=ask
Summary
When a PreToolUse hook returns permissionDecision: "ask" with a permissionDecisionReason string, the reason text is not displayed in the TUI confirmation dialog.
Expected behavior
The dialog should show the permissionDecisionReason text to the user so they can make an informed allow/deny decision.
Per the documentation:
permissionDecisionReasonwhenask/allow→ displayed in user's confirmation dialog
Actual behavior
The dialog only shows:
Hook PreToolUse:Bash requires confirmation for this command. [settings]
/hooks to update
Do you want to proceed?
❯ 1. Yes
2. No
The custom reason text from permissionDecisionReason is never shown.
Reproduction
Hook output (stdout):
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "ask",
"permissionDecisionReason": "🔒 フック:「設定保護」\n\nこのコマンドは settings.json に書き込もうとしています。"
}
}
The dialog appears but shows the generic message above, not the custom reason.
Environment
- Claude Code version: v2.1.75+ (where
[settings]label was added per CHANGELOG) - OS: Ubuntu 22.04 (server environment)
- Hook type: PreToolUse with matcher=Bash
Additional context
permissionDecisionReason for deny correctly appears in Claude's context (per docs: "shown to Claude, not user").
The ask variant should show to the user in the dialog, but currently does not.
This makes it impossible to communicate meaningful context to users in ask dialogs (e.g., which hook fired, why it requires confirmation, what action they're confirming).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗