fix(desktop): enable notifications for permission prompts and questions#995
fix(desktop): enable notifications for permission prompts and questions#995
Conversation
Previously, notifications only worked for agent Stop events but not for "needs attention" states like permission prompts or questions. The issue was that we only configured the PermissionRequest hook (for decision control), but not the Notification hook which actually fires when Claude Code displays dialogs requiring user attention. Changes: - Add Notification hook with permission_prompt and elicitation_dialog matchers - Update notify shell script to handle Notification events and map them to PermissionRequest for desktop notification handling - Bump notify hook marker version to force script regeneration
📝 WalkthroughWalkthroughThe changes extend Claude's agent notification system to handle new event types. A Notification hook configuration is added to trigger the notify script for permission-related prompts, the notification script marker is updated to v3, and the notify script logic is enhanced to map Notification events to PermissionRequest events for unified processing. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing: stale notification PR from Jan 27. Notification system has evolved since. |
|
Hey — just a heads up, this was closed as part of an automated stale PR cleanup. If you think this was done in error, feel free to reopen it! |
|
Hey — this was closed by an automated cleanup of PRs with major merge conflicts that are 3+ weeks old. If you think this was done incorrectly, please feel free to reopen it. Sorry for any inconvenience! |
Summary
Notificationhook withpermission_promptandelicitation_dialogmatchers to Claude Code settingsRoot Cause
We were only using the
PermissionRequesthook which is for decision control (auto-approve/deny), not for receiving notifications when dialogs appear. TheNotificationhook with specific matchers is what fires when Claude Code actually displays dialogs requiring user attention.Test plan
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.