VSCode extension does not render `permissionDecisionReason` in permission prompt for "ask" decisions

Resolved 💬 2 comments Opened May 26, 2026 by IqbalAfdhalas Closed May 30, 2026

Problem

When a PreToolUse hook returns permissionDecision: "ask" with permissionDecisionReason, the Claude Code VSCode extension only displays a generic "Do you want to proceed with [Tool]?" header. The reason text is NOT visible anywhere in the prompt UI — not in the header, not in the body, not in the Details expansion.

Per official docs (https://code.claude.com/docs/en/hooks):

"When \permissionDecision\ is \\"ask\"\, the \permissionDecisionReason\ appears in the permission dialog as explanatory text below the tool name and parameters."

This behavior is not happening in the VSCode extension. Issue #57201 author confirmed it works in TUI/terminal mode of Claude Code 2.1.133, but the issue appears in the VSCode extension specifically.

Reproduction

  1. Create a PreToolUse hook that returns:

\\\json
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "ask",
"permissionDecisionReason": "Elevated process via UAC - admin rights granted to spawned process"
}
}
\
\\

  1. Trigger a PowerShell/Bash command that matches the hook's condition
  2. Observe the permission prompt in VSCode

Expected

Reason text appears in the dialog as explanatory text below the tool parameters.

Actual

Generic prompt header: "Do you want to proceed with PowerShell?"
Details section (when expanded) shows only the command content.
The \permissionDecisionReason\ is not displayed anywhere visible to the user.

Environment

  • Claude Code VSCode extension: 2.1.145
  • VSCode: latest
  • OS: Windows 11 Home Single Language
  • Tested with both ASCII-only and unicode reason text — both fail

Hook output verified valid

Direct testing shows the hook emits valid JSON with correct field names:
\\\
{"hookSpecificOutput": {"hookEventName": "PreToolUse", "permissionDecision": "ask", "permissionDecisionReason": "Elevated process via UAC - admin rights granted to spawned process"}}
\
\\

Impact

Hook-based safety guards can't communicate WHY they flagged something to the user. User sees generic prompt with no context to make informed decision. Defeats much of the purpose of hook-based permission control in IDE environments.

View original on GitHub ↗

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