Skip to content

[bot] Document agent-scoped hooks in Learning Hub - #5062

Merged
aaronpowell merged 4 commits into
mainfrom
bot/learning-hub-agent-hooks-2100f55cb923430b
Nov 2, 2026
Merged

aaronpowell merged 4 commits into
mainfrom
bot/learning-hub-agent-hooks-2100f55cb923430b

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

New features found

  • Copilot CLI v1.0.97: agent-scoped declarative hooks for custom agents.
  • v1.0.97: autopilot denies a preToolUse hook's ask decision instead of blocking on a permission dialog.

Sections updated

  • automating-with-hooks.md: new "Agent-Scoped Hooks" section, including the autopilot ask behavior.
  • building-custom-agents.md: frontmatter note on agent-scoped hooks, linking to the hooks guide.

Sources

Content cleanup

None needed this run. No inline version tags were added, and the existing Compatibility and Migration Notes sections were left unchanged.

Not checked: the web changelog pages, because web-fetch was unavailable. The check covered the copilot-cli releases only.

Generated by Learning Hub Updater · copilot · auto · 17.5 AIC · ⌖ 0.721 AIC · ⊞ 12.4K · ◷

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

🚦 Submission status: ⏳ Awaiting automation

Risk tier: merge-risk:medium — New or substantially changed resource without privileged execution
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access.

Why this tier
  • Changes files outside the low-risk documentation and resource paths

Automated checks

Check Status Details
Line endings 🔧 Infrastructure failure Waiting for a maintainer to approve workflow runs for this PR · logs
Spelling 🔧 Infrastructure failure Waiting for a maintainer to approve workflow runs for this PR · logs
Contributor reputation 🔧 Infrastructure failure Waiting for a maintainer to approve workflow runs for this PR · logs
Duplicate resource scan ⚠️ Failed (advisory, non-blocking) Waiting for a maintainer to approve workflow runs for this PR · logs
PR quality signal ⚠️ Failed (advisory, non-blocking) Waiting for a maintainer to approve workflow runs for this PR · logs

Action needed

  • 🔧 Line endings, Spelling, Contributor reputation hit an automation problem that is not caused by your contribution. Comment /rerun-checks to retry; maintainers are notified if it keeps failing.
  • ⚠️ Advisory checks did not complete (Duplicate resource scan, PR quality signal). This does not block the PR.

Review

  • Approvals: 0/1
  • Assigned reviewer: aaronpowell
  • Review target date: not set
  • Still needed: 1 more approval(s)
  • No staffed reviewer pool owns these files yet; any reviewer with write access counts as the domain reviewer.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for efc84c4 · gate run · This comment is maintained automatically — see submission gate docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor Author

Commit pushed: 6c0b964

Generated by Learning Hub Updater · copilot · auto · 28.7 AIC · ⌖ 0.729 AIC · ⊞ 12.4K

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor Author

Commit pushed: be4ef03

Generated by Learning Hub Updater · copilot · auto · 23 AIC · ⌖ 0.737 AIC · ⊞ 12.4K

@aaronpowell aaronpowell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@copilot - review this feedback

The agent-scoped hooks section and the autopilot ask → deny note are accurate and worth having. Before merge, please:

  1. Drop the Telemetry and Folder Trust Flags section and the ghapp:// install snippet — #5196 covers both in the same files.
  2. Add a source for the bullet saying user-setting keys in ~/.copilot/config.json are ignored, or remove it. The v1.0.97 notes only say saved settings are kept when one config.json entry is invalid.
  3. Do the same for the copilot config subcommands section, or move it to its own update.
  4. Bring the title and description back in line with the hooks-only scope.

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>

Copilot AI commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@copilot - review this feedback

The agent-scoped hooks section and the autopilot ask → deny note are accurate and worth having. Before merge, please:...

Removed the config and plugin-install additions, including the unsupported config claim, telemetry/trust flags, and ghapp:// snippet. The title was already hooks-scoped; the PR description is now limited to the hooks update. Commit: efc84c4.

Copilot AI requested a review from aaronpowell October 27, 2026 02:52
@aaronpowell
aaronpowell marked this pull request as ready for review November 2, 2026 03:51
@aaronpowell
aaronpowell requested a review from a team as a code owner November 2, 2026 03:51
Copilot AI auto review requested due to automatic review settings November 2, 2026 03:51
@aaronpowell
aaronpowell enabled auto-merge November 2, 2026 03:51
@github-actions github-actions Bot added the website-update PR touches website content or code label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

🟡 Contributor Reputation Check: MEDIUM risk

Check Risk
Profile MEDIUM
Credential audit NONE

Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.

@aaronpowell
aaronpowell merged commit f1f843c into main Nov 2, 2026
31 of 34 checks passed
@github-actions github-actions Bot added the needs-review:MEDIUM Contributor reputation check flagged MEDIUM risk label Nov 2, 2026
@aaronpowell
aaronpowell deleted the bot/learning-hub-agent-hooks-2100f55cb923430b branch November 2, 2026 03:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two active documentation issues remain: the hooks section lacks an authoritative syntax example, and it does not clearly limit agent-scoped hooks to Copilot CLI.

2 open issues
What changed in this PR

Documents Copilot CLI v1.0.97 agent-scoped declarative hooks in the Learning Hub, including autopilot handling of ask decisions.

Changes:

  • Adds agent-scoped hooks guidance to the custom agents guide.
  • Adds an “Agent-Scoped Hooks” section to the hooks guide.
  • Documents that autopilot denies preToolUse hooks returning ask.
File Summary Final review comments
website/​src/​content/​docs/​learning-hub/​building-custom-agents.md Adds agent-scoped hooks guidance to custom-agent frontmatter documentation. Nit, 3 votes: Qualify the guidance as Copilot CLI-only so readers do not assume support in VS Code or Copilot coding agent.
website/​src/​content/​docs/​learning-hub/​automating-with-hooks.md Documents agent-scoped hooks and autopilot preToolUse behavior. Nit, 3 votes: Link to the authoritative agent-scoped hooks syntax reference or include a minimal frontmatter example.
Nit, 1 vote: Identify the capability as CLI-specific and include the minimum version or supported hosts.
Nit, 1 vote: Document the precise preToolUse response shape for ask/allow/deny and reconcile it with the existing exit-code guidance.

Review effort: Lite (auto)


### Agent-Scoped Hooks

Custom agents can declare their own hooks declaratively, so the hooks apply only while that agent is running rather than to every session in the repository. Use this for guardrails that belong to one agent (for example, a security reviewer that blocks writes) while keeping repository-wide hooks in `.github/hooks/`. See [Building Custom Agents](../building-custom-agents/) for the agent file format and the [Copilot CLI changelog](https://github.com/github/copilot-cli/blob/main/changelog.md) for the current hook-declaration syntax.
---
```

**Agent-scoped hooks**: An agent can declare hooks that run only while that agent is active, which is useful for per-agent guardrails such as validating commands or logging. See [Automating with Hooks](../automating-with-hooks/#agent-scoped-hooks).

This branch was successfully deployed

1 active deployment
github-pages — efc84c4d Deployed Nov 2, 2026 by Copilot via deploy #1145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-update awaiting-automation copilot-updates merge-risk:medium needs-review:MEDIUM Contributor reputation check flagged MEDIUM risk website-update PR touches website content or code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants