claude-code - 💡(How to fix) Fix Feature request: Hook event for permission prompts [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45114Fetched 2026-04-09 08:12:56
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×3closed ×1commented ×1
RAW_BUFFERClick to expand / collapse

Feature Request

Problem

There's no hook event that fires when Claude Code is waiting for user input on a permission prompt (e.g., tool use approval). This makes it impossible to play a notification sound or trigger other actions when Claude needs the user's attention for permission.

Current Behavior

The available hook events (Stop, PreToolUse, PostToolUse, Notification, UserPromptSubmit, SubagentStop, PreCompact, PostCompact) don't cover permission prompts. The Stop hook fires when Claude finishes its turn, but not specifically when a permission prompt is shown.

Desired Behavior

A new hook event (e.g., PermissionPrompt) that fires when Claude Code displays a permission prompt and is waiting for the user to approve or deny a tool use. This would allow users to configure notifications (sound, visual, etc.) so they know when Claude needs their input.

Use Case

When running long tasks, users may switch to other windows. A sound notification on permission prompts would let them know Claude is blocked and needs approval, improving the workflow for users who don't use --dangerously-skip-permissions.

Environment

  • Claude Code version: 2.1.96
  • OS: macOS (Darwin 24.6.0)

extent analysis

TL;DR

Implementing a new hook event, such as PermissionPrompt, would allow for notifications when Claude Code is waiting for user input on a permission prompt.

Guidance

  • Review the existing hook events to ensure none can be repurposed for permission prompts, focusing on UserPromptSubmit as a potential candidate.
  • Consider proposing the addition of a PermissionPrompt hook event to the Claude Code development team, highlighting the use case of improving workflow for users who don't use --dangerously-skip-permissions.
  • Investigate if there are any community-driven solutions or workarounds for achieving similar functionality, such as custom scripts or third-party integrations.
  • Evaluate the feasibility of implementing a temporary workaround, such as periodically checking the application's state for permission prompts, although this might not be as reliable as a built-in hook event.

Example

No code example is provided due to the lack of specific technical details about the Claude Code API or existing hook events.

Notes

The solution relies on the assumption that the Claude Code development team is open to adding new features or hook events. The effectiveness of any workaround would depend on the specific implementation and the application's internal state management.

Recommendation

Apply workaround: While not ideal, exploring community solutions or implementing a custom script to periodically check for permission prompts might provide a temporary solution until a built-in PermissionPrompt hook event is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING