Answer: Use the onPreToolUse hook to build a permission layer that decides which tools the agent may run, what arguments are allowed, and whether the user should be prompted before execution. The hook returns a permissionDecision such as "deny", "allow", or "ask" (which delegates the decision to the user at runtime). Status: Confirmed Entry: tool/github-copilot/permissions-and-security/hooks-permission-control Revision: 2 Digest: sha256:f59953ba491778b1 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:01Z Last changed: 2026-11-18T13:03:25Z (ask behavior: ask → Returning "ask" delegates the decision to the user at runtime) Last verified: 2026-11-20T13:08:20Z Next check: 2026-11-21T13:08:20Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of hook | onPreToolUse | [1] | 2026-11-20 deny decision | deny | [1] | 2026-11-20 allow decision | allow | [1] | 2026-11-20 ask decision | ask | [1] | 2026-11-20 ask behavior | Returning "ask" delegates the decision to the user at runtime | [1] | 2026-11-20 Sources: [1] GitHub. "Working with hooks - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/features/hooks Role: primary. Accessed: 2026-11-20T13:08:20Z Quote: "Use onPreToolUse to build a permission layer that decides which tools the agent may run" (Supports: hook) Quote: "return { permissionDecision : "deny" , permissionDecisionReason : `Only read-only tools are allowed." (Supports: deny decision) Quote: "return { permissionDecision : "allow" };" (Supports: allow decision) Quote: "return { permissionDecision : "ask" };" (Supports: ask decision) Quote: "Returning "ask" delegates the decision to the user at runtime—useful for destructive actions where you want a human in the loop." (Supports: ask behavior) Snapshot SHA-256: d0da331e57d20d0992bf99178fb6a23d61ea14315aadbc1f93dcec26b7bd5d7f (captured 2026-11-18T13:03:24Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:03:25Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:08:20Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:08:20Z Last attempt: 2026-11-20T13:08:20Z Notes and limitations: Extracted automatically from a single official source (section "Use case: permission control"). Related: https://latestn.com/tool/github-copilot/permissions-and-security/how-local-sandboxing-works How does GitHub Copilot local sandboxing work? https://latestn.com/tool/github-copilot/permissions-and-security/manage-agent-firewall-org How do I manage the agent firewall for my organization in GitHub Copilot? https://latestn.com/tool/github-copilot/permissions-and-security/manage-copilot-network-access How do I manage GitHub Copilot access to my organization's network? https://latestn.com/tool/github-copilot/permissions-and-security/github-oauth-setup How do I set up GitHub OAuth authentication for the Copilot SDK? https://latestn.com/tool/github-copilot/permissions-and-security/grant-ai-managers-bypass-agent-profiles How do I grant AI managers bypass permissions for agent profiles in GitHub Copilot? https://latestn.com/tool/github-copilot/permissions-and-security/hook-security What security considerations should I know when using GitHub Copilot hooks? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:03:25Z | changed | ask behavior: ask → Returning "ask" delegates the decision to the user at runtime | [1] 2026-11-13T03:28:01Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/permissions-and-security/hooks-permission-control/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/permissions-and-security/hooks-permission-control POST: https://latestn.com/dispute/tool/github-copilot/permissions-and-security/hooks-permission-control with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/permissions-and-security/hooks-permission-control?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I use GitHub Copilot SDK hooks to control tool permissions? Revision 2, last verified 2026-11-20T13:08:20Z. https://latestn.com/tool/github-copilot/permissions-and-security/hooks-permission-control (accessed 2026-11-21T09:57:08Z). @misc{LatestN_tool_github_copilot_permissions_and_security_hooks_permission_control_r2, title = {How do I use GitHub Copilot SDK hooks to control tool permissions?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/permissions-and-security/hooks-permission-control}}, note = {Revision 2; digest sha256:f59953ba491778b1; last verified 2026-11-20T13:08:20Z; accessed 2026-11-21T09:57:08Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/permissions-and-security/hooks-permission-control