-
Notifications
You must be signed in to change notification settings - Fork 884
Open
Labels
Description
Summary
Add a hooks system that allows users to run custom shell commands when certain events occur, such as when the CLI is waiting for user input.
Use Case
When running Copilot CLI on remote development machines (via SSH), users often step away while the agent works on tasks. Having a notification system (e.g., Pushover, ntfy, Slack webhook) would alert users when their attention is needed, improving workflow efficiency.
Proposed Solution
A hooks configuration similar to Claude Code's implementation:
// ~/.copilot/hooks.json
{
"hooks": {
"prompt": [
{
"type": "command",
"command": "curl -s -X POST https://api.pushover.net/1/messages.json -d 'token=XXX&user=YYY&message=Copilot needs input'"
}
]
}
}Suggested hook events:
prompt- When waiting for user inputtool_start/tool_end- When tools executesession_start/session_end- Session lifecycle
Alternatives Considered
- Terminal beep (
beep: true) - Works but not useful for remote/background sessions - Wrapper scripts monitoring output - Hacky and unreliable
Additional Context
Claude Code has this feature and it significantly improves the remote development experience. Reference: https://docs.anthropic.com/en/docs/claude-code/hooks