[FEATURE] No hook supports additionalContext injection from permission dialog user input
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 Statement
UserPromptSubmit only fires on main prompt input. When users type text while accepting or rejecting a tool call permission dialog, no hook event fires. That text enters the conversation unprocessed by hooks.
Proposed Solution
New hook event (e.g. PermissionResponse) that fires after the user responds to a permission dialog, with input fields including the user's feedback text, the decision (accept/reject), and the original tool_name/tool_input. Must support additionalContext in hook output to inject context into the conversation.
Alternative Solutions
- Extend UserPromptSubmit to also fire on permission dialog text responses, with a field distinguishing prompt source. Already supports additionalContext.
- Add the user's response text to the existing PreToolUse input (fires after permission grant, before execution). Would need additionalContext support added — currently only supports permissionDecision-related output. Partial solution: wouldn't cover rejections.
- Add a PostPermissionRequest event as counterpart to PermissionRequest (fires when dialog appears). Would need additionalContext support in its output schema.
Key requirement: Whichever approach is chosen, the hook output must support additionalContext (or equivalent) so hooks can inject context into the conversation based on user permission response text.
Priority
Medium - Would be very helpful
Feature Category
API and model interactions
Use Case Example
A UserPromptSubmit hook parses hashtags from user input to dynamically inject behavior-modifying system prompts via additionalContext. Users naturally type hashtags when accepting/rejecting tool calls (e.g. rejecting with #op-code try a different approach). These hashtags are silently ignored because no hook processes permission dialog responses. The workaround is remembering to submit hashtags only via the main prompt — fragile and unintuitive.
Additional Context
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗