Skip to content

feat: add optional Copilot CLI hook state adapter - #32

Merged
corwinm merged 7 commits into
mainfrom
feat/copilot-hooks-30
Sep 23, 2026
Merged

corwinm merged 7 commits into
mainfrom
feat/copilot-hooks-30

Conversation

@corwinm

@corwinm corwinm commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add optional Copilot CLI user-level hook adapter with explicit install-copilot and template commands; no automatic installation or repository/cloud hooks.
  • Correlate pane, session, parent process and foreground TTY; classify turn boundaries and actual permission/elicitation notifications. Expire stale signals and fall back to coarse command detection.
  • Preserve unrelated hook files and entries; add deterministic lifecycle, ordering, isolation, installer and CLI tests; document limitations.

Verification

  • npm test — 245 passing
  • npm run typecheck, npm run lint, npm run fmt:check
  • npm run shell:check, npm run shell:fmt:check, npm run check, git diff --check
  • Prerequisite live spike in two tmux panes confirmed camelCase events, numeric timestamps, notification types and /clear ordering. No global hook installed for this PR.
  • Live npm-installed CLI verification: inspect showed command-only fallback without hooks, then idle → waiting-input → idle with temporary hooks; Node-wrapper discovery and foreground-process-group attribution are regression-tested. Temporary hooks were removed.
  • Review feedback: newer session resumes, repeated /clear retired-session tracking, empty COPILOT_HOME, and foreground process ownership have focused regression tests.
  • Independent review identified process-reuse and stale identity paths, addressed with regression tests. Copilot docs explicitly support CLI-only exec/args and numeric millisecond timestamps for camelCase events.

Limitations

  • No immediate answer event for permission/elicitation: waits clear on subsequent lifecycle events or expire after 60 seconds. Ambiguous elicitation form kind is labeled input.
  • Unknown/disabled/missed hooks or unavailable foreground-process evidence fall back to navigable unknown, not a guessed wait.

Closes #30

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T03:47:28.994654Z 0c0c0a6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b240cde07e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/core/copilot.ts Outdated
Comment thread src/core/copilot.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0f1d02a2a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/core/copilot.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14b7521a66

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/core/copilot.ts Outdated
@corwinm
corwinm merged commit ced7653 into main Sep 23, 2026
1 check passed
@corwinm
corwinm deleted the feat/copilot-hooks-30 branch September 23, 2026 03:50
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.

Investigate optional Copilot CLI hooks for accurate pane state

1 participant