[FEATURE] Add PermissionGranted hook event
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem
There is a PermissionRequest hook event (fires when a permission dialog appears) and a PermissionDenied hook event (fires when permission is denied), but no corresponding event when the user grants permission.
This creates a gap in the hook lifecycle: after the user approves a tool call, no event fires until PostToolUse — which may not happen for minutes if the tool is long-running (e.g. kubectl exec, sleep && ..., long builds).
Use case
I use hooks to change my terminal background color to indicate state:
- Blue (
Stop,PermissionRequest,Elicitation) → "Claude needs your input" - Black (
UserPromptSubmit,PreToolUse,PostToolUse) → "Claude is working"
When I approve a long-running Bash command, the terminal stays blue (the "needs input" color) for the entire execution, even though Claude is no longer waiting on me. There's no hook to switch it back to "working" after I approve.
Proposed solution
Add a PermissionGranted (or PermissionAccepted) hook event that fires immediately after the user approves a permission request, before the tool begins execution.
Expected lifecycle
PreToolUse → PermissionRequest → [user approves] → PermissionGranted → [tool executes] → PostToolUse
[user denies] → PermissionDenied
Workarounds considered
- Remove blue from
PermissionRequest: Loses the visual signal that permission is needed. - Timed flash (blue + sleep + black): Fragile — wrong duration either cuts short or still delays.
- Neither is a real fix.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗