GitHub Copilot CLI supports hooks — shell scripts that run at specific lifecycle points during a session. Hooks receive structured JSON via stdin and can optionally return JSON to influence agent behavior. Key hook types include sessionStart, sessionEnd, and preToolUse, the last of which can allow, deny, or prompt for approval

6m read timeFrom bartwullems.blogspot.com
Post cover image
Table of contents
What are hooks?The different hook typesSetting up your first hooksImportant behaviors to knowTesting your hooks locallyWho should be using hooks?Wrapping upMore information

Sort: