Desktop app: hook decision:block reason not displayed

Open 💬 0 comments Opened Jul 4, 2026 by andropl

Description

When a UserPromptSubmit hook returns {"decision": "block", "reason": "..."}, the CLI correctly displays the reason text to the user:

● UserPromptSubmit operation blocked by hook:
  Caveman Stats
  ──────────────────────────────────
  Session: ...
  Turns: 694
  ...
  Original prompt: /caveman-stats

However, in the Claude Code desktop app (Windows), the same hook produces no visible output — the user sees only a spinner that eventually disappears, with no reason text rendered.

Steps to Reproduce

  1. Register a UserPromptSubmit hook that returns {"decision": "block", "reason": "some text"}:

``json
{
"hooks": {
"UserPromptSubmit": [{
"hooks": [{
"type": "command",
"command": "node path/to/hook.js",
"timeout": 5
}]
}]
}
}
``

  1. Type a prompt that triggers the hook's block decision
  1. CLI: reason text is displayed correctly

Desktop app: no output shown, spinner appears briefly then nothing

Expected Behavior

Desktop app should display the reason text from the blocked hook, matching CLI behavior.

Environment

  • Claude Code v2.1.128
  • Windows 11 Pro 10.0.26200
  • Desktop app (not CLI)
  • Hook: caveman plugin's /caveman-stats command (uses decision: "block" to show stats inline)

Workaround

Run the hook script directly from PowerShell:

node "$env:USERPROFILE\.claude\hooks\caveman-stats.js"

View original on GitHub ↗