UserPromptSubmit hook decision:block reason not displayed in VS Code/Cursor extension (recurring; multiple closed dupes) — please re-triage
Summary
In the Claude Code IDE extension (VS Code / Cursor), a UserPromptSubmit hook that returns {"decision":"block","reason":"..."} correctly blocks the prompt, but the reason is never shown to the user in the chat panel. The block looks like a silent hang. The identical hook delivers the reason visibly under the standalone CLI. systemMessage and exit 2 + stderr are also silent in the extension.
Since reason/systemMessage are the primary channels by which a hook explains a block to the user, a blocking UserPromptSubmit gate is effectively unusable in the IDE extension — the user cannot tell why their prompt was dropped.
Repro
.claude/settings.json:
{"hooks":{"UserPromptSubmit":[{"matcher":"","hooks":[{"type":"command","command":"bash ./block.sh"}]}]}}
block.sh:
#!/usr/bin/env bash
jq -nc '{decision:"block", reason:"BLOCKED: this reason should be visible to the user"}'
exit 0
Submit any prompt.
- Expected: the prompt is blocked and "BLOCKED: this reason should be visible to the user" is shown in the chat panel.
- Actual (extension): the prompt is silently discarded; the reason never appears in the panel.
- Actual (standalone CLI): the reason is shown (
UserPromptSubmit operation blocked by hook: ...).
Also silent in the extension: a top-level systemMessage field, and exit 2 with the reason written to stderr.
Environment
- Claude Code IDE extension running in Cursor (a VS Code fork), macOS.
This is recurring — related reports (mostly closed "not planned")
- #15021 — UserPromptSubmit hooks not working in VS Code/Cursor extensions
- #4084 — Hook output visibility blocked in Claude Code UI
- #10964 — UserPromptSubmit hook doesn't display stderr on non-zero exit code
- #16289 — SubagentStop
systemMessagenot displayed in UI - #50542 — Stop hook
systemMessageJSON not rendered (plugin-scope dispatch) - #16114 — Notification hooks don't fire in the extension (work in CLI)
- JuliusBrussee/caveman#556 — third-party project reproducing this exact symptom
Ask
Please re-triage. Many independent reports converge on the same root behavior: hook-authored messages (reason, systemMessage, stderr) that render in the standalone CLI do not render in the IDE extension's chat panel. Matching the CLI's visible-block behavior in the extension would resolve an entire class of these issues.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗