Describe the bug
Summary
The Notification hook with notification_type: "permission_prompt" fires for every tool execution in interactive mode, even when the tool
has already been approved for the session.
Actual Behavior
Notification(permission_prompt) fires on every tool execution (glob, bash, view, edit, etc.) regardless of whether the permission
prompt is shown to the user.
Affected version
GitHub Copilot CLI 1.0.21.
Steps to reproduce the behavior
- Add to
~/.copilot/config.json:
{
"hooks": {
"Notification": [
{
"type": "command",
"bash": "cat >> /tmp/copilot_noti.log",
"timeoutSec": 5
}
]
}
}
- Launch copilot in interactive mode
- Approve a tool (e.g., bash) when first prompted
- Continue using the same tool — no permission prompt appears in the UI
- Check /tmp/copilot_noti.log
Each tool execution logs a Notification event with "notification_type":"permission_prompt", even though no prompt was shown.
Expected behavior
Notification(permission_prompt) should only fire when the user is actually presented with a permission prompt — i.e., when the tool has not
yet been approved and user input is required.
Additional context
Environment
Describe the bug
Summary
The
Notificationhook withnotification_type: "permission_prompt"fires for every tool execution in interactive mode, even when the toolhas already been approved for the session.
Actual Behavior
Notification(permission_prompt)fires on every tool execution (glob,bash,view,edit, etc.) regardless of whether the permissionprompt is shown to the user.
Affected version
GitHub Copilot CLI 1.0.21.
Steps to reproduce the behavior
~/.copilot/config.json:{ "hooks": { "Notification": [ { "type": "command", "bash": "cat >> /tmp/copilot_noti.log", "timeoutSec": 5 } ] } }Each tool execution logs a Notification event with "notification_type":"permission_prompt", even though no prompt was shown.
Expected behavior
Notification(permission_prompt)should only fire when the user is actually presented with a permission prompt — i.e., when the tool has notyet been approved and user input is required.
Additional context
Environment