[BUG] UserPromptSubmit Hook does not Display Reason in Claude Code Desktop

Resolved 💬 5 comments Opened May 16, 2026 by tomerl-mint Closed Jun 18, 2026

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 I configure a UserPromptSubmit hook to block prompts, Claude Code Desktop correctly prevents the prompt from reaching the model but does not display the documented rejection reason. This happens with both supported blocking methods: returning decision: "block" with a reason, and exiting with code 2. As a result, users receive no feedback explaining why the prompt was blocked, and the UI appears stuck.

<img width="622" height="273" alt="Image" src="https://github.com/user-attachments/assets/108b10b9-fb25-4da8-bb0b-922480330e22" />

What Should Happen?

When a UserPromptSubmit hook blocks a prompt, Claude Code Desktop should display the hook’s rejection reason to the user. The prompt should stay blocked, but the UI should clearly explain why.

Error Messages/Logs

Steps to Reproduce

  1. Configure a managed UserPromptSubmit hook in /Library/Application Support/ClaudeCode/managed-settings.json that blocks prompts and returns a rejection reason. Use managed-settings.json.
  1. Launch Claude Code Desktop.
  1. Submit any prompt, for example: “Hey, how are you?”
  1. Observe that the prompt is blocked and does not reach the model.
  1. Observe that Claude Code Desktop does not display the hook’s rejection reason anywhere in the UI, making the prompt submission appear stuck.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.140 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Product: Claude Code Desktop
Version: Claude 1.7196.0 (2dbd78) 2026-05-12T05:34:40.000Z
OS: macOS Tahoe Version 26.3.
Settings location: /Library/Application Support/ClaudeCode/managed-settings.json (managed policy settings)

View original on GitHub ↗

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