Skip to content

Feature Request: Hooks system for notifications (similar to Claude Code) #971

@tomerweller

Description

@tomerweller

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 input
  • tool_start / tool_end - When tools execute
  • session_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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions