-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Open
Feature Request: Global Hooks Configuration with UserPromptSubmit, Stop, and Notification Events#1157
Feature
Copy link
Labels
Description
Problem Statement
Currently, GitHub Copilot's hooks implementation has significant limitations compared to similar AI coding assistants like Claude Code and Cursor:
- No global configuration: Hooks must be configured per repository via
.github/copilot-hooks.json, requiring repetitive setup across projects - Limited event types: Only basic Start hooks are supported, missing critical lifecycle events
- Poor developer experience: Cannot set up system-wide preferences for workflow automation
Use Case
I want to play different audio notifications to get immediate feedback during AI interactions:
- UserPromptSubmit: When I submit a prompt to Copilot (AI starts working)
- Stop: When Copilot finishes generating the response
- Notification: When Copilot asks a question or needs my input (different sound to distinguish from completion)
This helps maintain awareness of AI activity without constantly monitoring the terminal, especially during long-running operations or when multitasking.
Comparison with Competitors
Claude Code (docs):
- ✅ Global hooks configuration in user settings
- ✅ Supports
UserPromptSubmit,Stop,Notificationevents - ✅ Simple setup without per-repository configuration
Cursor (docs):
- ✅ Global hooks configuration
- ✅ Supports multiple lifecycle events including completion and user interaction
- ✅ User-level preferences
GitHub Copilot CLI (docs):
- ❌ Repository-level only (
.github/copilot-hooks.json) - ❌ Only userPromptSubmitted event supported
- ❌ No global/user-level configuration
- ❌ Missing Stop and Notification events
- ❌ And I tried to configure in my repository, never success to play sound when I submit a a prompt
Proposed Solution
-
Add global hooks configuration
- Support user-level hooks in
~/.config/copilot/hooks.json(or OS-equivalent) - Allow global hooks to be overridden by repository-specific hooks when needed
- Support user-level hooks in
-
Add essential lifecycle events
UserPromptSubmit: Triggered when user submits a promptStop: Triggered when Copilot completes the responseNotification: Triggered when Copilot asks for user input/clarification
-
Example configuration (desired syntax):
{
"hooks": {
"UserPromptSubmit": {
"command": "afplay /path/to/start.mp3 &",
"description": "Play sound when user submits prompt"
},
"Stop": {
"command": "afplay /path/to/complete.mp3 &",
"description": "Play sound when Copilot finishes"
},
"Notification": {
"command": "afplay /path/to/question.mp3 &",
"description": "Play different sound when Copilot needs input"
}
}
}will-osborne