[BUG] UserPromptSubmit Hook does not Display Reason in Claude Code Desktop
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
- Configure a managed
UserPromptSubmithook in/Library/Application Support/ClaudeCode/managed-settings.jsonthat blocks prompts and returns a rejection reason. Use managed-settings.json.
- Launch Claude Code Desktop.
- Submit any prompt, for example: “Hey, how are you?”
- Observe that the prompt is blocked and does not reach the model.
- 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)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗