[BUG] permissionDecisionReason not displayed in permission prompt for PreToolUse 'ask' decisions
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When a PreToolUse hook returns permissionDecision: "ask" with a permissionDecisionReason, the reason is not displayed anywhere in the permission prompt UI. The user sees the standard edit diff and "Do you want to make this edit?" prompt with no indication of why the hook is asking for approval.
This is similar to #10062 which was fixed for "deny" decisions, but "ask" decisions still don't surface the reason.
What Should Happen?
According to the hooks documentation:
permissionDecisionReason— For"allow"and"ask", shown to the user but not Claude.
The reason should be visible in the permission prompt so users understand why they're being asked for approval.
Error Messages/Logs
Hook stdout output:
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"ask","permissionDecisionReason":"Conflicts on src/main.rs with 2 worktree(s):\nclash-agent1 [feature/agent1]: merge conflict\nclash-agent2 [feature/agent2]: merge conflict"}}
What the user sees (no reason displayed):
Edit file
src/main.rs
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
39 fn main() {
40 - // Force colors to always be enabled
40 + // Force colors to always be enabled (test)
41 control::set_override(true);
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
Do you want to make this edit to main.rs?
❯ 1. Yes
2. Yes, allow all edits during this session (shift+tab)
3. No
Steps to Reproduce
- Add a PreToolUse hook to
~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"ask\",\"permissionDecisionReason\":\"This reason should be visible to the user\"}}'"
}
]
}
]
}
}
- Ask Claude to edit any file
- Observe the permission prompt — the reason text is not displayed
Context
We're building clash, a tool that detects merge conflicts across git worktrees. We use a PreToolUse hook to warn users when they're about to edit a file that conflicts with other worktrees. We want "ask" (so users can override) rather than "deny" (hard block), but the user never sees the conflict info.
Switching to "deny" correctly displays the permissionDecisionReason — so the issue is specific to "ask" mode.
Related Issues
- #10062 — Same bug but for
"deny"mode (fixed) - #9630 — Similar issue with
-pflag (fixed)
Claude Code Version
2.1.37
Platform
macOS
Operating System
Darwin 25.2.0
Terminal/Shell
zsh
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗