Skip to content llms.txt

Copilot CLI — Hooks

File format
JSON
Discovery path
.github/hooks
Syllago install method
JSON merge
Symlink support
No
Config file
.github/hooks/
Handler types
command

Hook events

Canonical Event Native Name Category
after_tool_execute postToolUse Tool
agent_stop agentStop Lifecycle
before_prompt userPromptSubmitted Lifecycle
before_tool_execute preToolUse Tool
error_occurred errorOccurred Lifecycle
session_end sessionEnd Lifecycle
session_start sessionStart Lifecycle
subagent_stop subagentStop Lifecycle
tool_use_failure errorOccurred Tool

Features

How each feature converts to syllago's canonical format. See format conversion for what these statuses mean.

Fields

Native frontmatter or config fields this provider exposes. The first column is the provider's own field name; the canonical key column links to syllago's cross-provider equivalent.

Provider fieldConversionCanonical keySummary
permissionDecision Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → Only preToolUse can block tool execution by returning {permissionDecision:"deny", permissionDecisionReason:"..."}; other hook outputs are ignored.

Other features

Behaviors, conventions, and capabilities that aren't tied to a single named field — things like path-based activation, discovery rules, and lifecycle behavior.

FeatureConversionSummary
decision_control Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → pre_tool_use_deny: Copilot CLI PreToolUse hooks can deny (block) the tool invocation; no allow or modify documented
JSON Hook Configuration File Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → Hooks live in .github/hooks/*.json with a {version, hooks:{EVENT_NAME:[...]}} schema; each hook has type, bash, powershell, cwd, timeoutSec, comment.
Six Hook Event Types Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → Six named events (sessionStart, sessionEnd, userPromptSubmitted, preToolUse, postToolUse, errorOccurred) receive JSON payloads via stdin.

Sources

Source
https://raw.githubusercontent.com/github/docs/main/content/copilot/reference/hooks-configuration.md
https://raw.githubusercontent.com/github/docs/main/content/copilot/how-tos/copilot-cli/customize-copilot/use-hooks.md
https://raw.githubusercontent.com/github/docs/main/content/copilot/concepts/agents/copilot-cli/about-copilot-cli.md