Skip to content

feat: add GitHub Copilot CLI hook integration#2

Open
gaburn wants to merge 1 commit into
ianscott313:mainfrom
gaburn:feature/copilot-cli-support
Open

feat: add GitHub Copilot CLI hook integration#2
gaburn wants to merge 1 commit into
ianscott313:mainfrom
gaburn:feature/copilot-cli-support

Conversation

@gaburn

@gaburn gaburn commented Mar 15, 2026

Copy link
Copy Markdown

Motivation

This looks like a really cool project and I would love to contribute! I primarily use GitHub Copilot CLI. I humbly present this PR to add GitHub Copilot CLI support.

Summary

Adds a /api/hooks/copilot-cli\ endpoint mirroring the existing Claude Code hook support. GitHub Copilot CLI sessions auto-register as citizens with \copilot-\ prefixed agent IDs and \Copilot\ display branding.

Changes

  • New endpoint: \POST /api/hooks/copilot-cli\ — receives Copilot CLI lifecycle events
  • New handler: \handleCopilotCliHook()\ with same event-to-state mapping as Claude Code
  • New doc: \docs/copilot-cli-quickstart.md\ — setup guide for Copilot CLI users
  • Updated: \README.md\ — added Copilot CLI section alongside Claude Code
  • Updated: \docs/signal-api.md\ — added Copilot CLI integration section

Design Decisions

  • Separate handler method (\handleCopilotCliHook) rather than sharing \handleClaudeCodeHook\ — keeps concerns separated and allows independent evolution as the two hook systems diverge
  • Agent IDs use \copilot-\ prefix (vs \claude-) so both can coexist in the same world
  • Captures Copilot-specific \model\ field in agent metadata
  • Supports same keepalive, sub-agent tracking, and ?agent=/?name=\ query param overrides

Testing

  • Verified both endpoints respond with 200
  • Confirmed agents from both Copilot CLI and Claude Code appear simultaneously in the world
  • Build passes cleanly

Add /api/hooks/copilot-cli endpoint mirroring the existing Claude Code
hook support. Copilot CLI sessions auto-register as citizens with
copilot- prefixed IDs and Copilot branding.

- New endpoint: POST /api/hooks/copilot-cli
- New handler: handleCopilotCliHook() with same event mapping
- New doc: docs/copilot-cli-quickstart.md
- Updated: README.md and docs/signal-api.md with Copilot CLI sections
- Supports keepalive, sub-agent tracking, and query param overrides
- Captures Copilot-specific model field in agent metadata

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gaburn gaburn marked this pull request as ready for review March 15, 2026 00:33

@felipe-breda-unipe felipe-breda-unipe left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the PR

@gaburn

gaburn commented Mar 23, 2026

Copy link
Copy Markdown
Author

let me know if you have any comments or suggestions. Would love to merge this if you like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants