Answer: The best practices are: return null when no changes are needed, be careful with result modification, use additionalContext for hints, consider privacy when logging, and keep hooks fast. Status: Confirmed Entry: tool/github-copilot/agents-and-automation/post-tool-use-hook-best-practices Revision: 1 Digest: sha256:523e8c08e5ed331c (changes whenever the content changes) Timeline: Created: 2026-11-14T13:07:03Z Last changed: 2026-11-14T13:07:03Z Last verified: 2026-11-20T13:09:02Z Next check: 2026-11-21T13:09:02Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Return null when no changes needed | Return null when no changes needed | [1] | 2026-11-20 Result modification caution | Be careful with result modification | [1] | 2026-11-20 Use additionalContext for hints | Use additionalContext for hints | [1] | 2026-11-20 Privacy when logging | Consider privacy when logging | [1] | 2026-11-20 Keep hooks fast | Keep hooks fast | [1] | 2026-11-20 Sources: [1] GitHub. "Post-tool use hook - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/hooks/post-tool-use Role: primary. Accessed: 2026-11-20T13:09:02Z Quote: "Return null when no changes needed - This is more efficient than returning an empty object or the same result." (Supports: Return null when no changes needed) Quote: "Be careful with result modification - Changing results can affect how the model interprets tool output. Only modify when necessary." (Supports: Result modification caution) Quote: "Use additionalContext for hints - Instead of modifying results, add context to help the model interpret them." (Supports: Use additionalContext for hints) Quote: "Consider privacy when logging - Tool results may contain sensitive data. Apply redaction before logging." (Supports: Privacy when logging) Quote: "Keep hooks fast - Post-tool hooks run synchronously. Heavy processing should be done asynchronously or batched." (Supports: Keep hooks fast) Snapshot SHA-256: a9b0c655b6d7d5c6fbe2f77c6ee190376aaa793d24d74d9b27d816c352e48ab4 (captured 2026-11-18T13:04:13Z) 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:04:14Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:09:02Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:09:02Z Last attempt: 2026-11-20T13:09:02Z Notes and limitations: Extracted automatically from a single official source (section "Best practices"). Related: https://latestn.com/tool/github-copilot/agents-and-automation/post-tool-use-hook-input What input fields does the GitHub Copilot post-tool use hook receive? https://latestn.com/tool/github-copilot/agents-and-automation/post-tool-use-hook-output What output can a GitHub Copilot post-tool use hook return to modify tool results? https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-hook How do I intercept or modify tool calls before they run using hooks in the GitHub Copilot SDK? https://latestn.com/tool/github-copilot/agents-and-automation/personal-mcp-servers-cloud-agent How do I configure personal MCP servers for the GitHub Copilot cloud agent? https://latestn.com/tool/github-copilot/agents-and-automation/personal-vs-shared-automations What is the difference between personal and shared GitHub Copilot automations? https://latestn.com/tool/github-copilot/agents-and-automation/plan-agent-usage What is the GitHub Copilot plan agent and how do I use it? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-14T13:07:03Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/agents-and-automation/post-tool-use-hook-best-practices/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/agents-and-automation/post-tool-use-hook-best-practices POST: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/post-tool-use-hook-best-practices with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/post-tool-use-hook-best-practices?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What are the best practices for writing GitHub Copilot post-tool use hooks? Revision 1, last verified 2026-11-20T13:09:02Z. https://latestn.com/tool/github-copilot/agents-and-automation/post-tool-use-hook-best-practices (accessed 2026-11-21T10:02:23Z). @misc{LatestN_tool_github_copilot_agents_and_automation_post_tool_use_hook_best_practices_r1, title = {What are the best practices for writing GitHub Copilot post-tool use hooks?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/agents-and-automation/post-tool-use-hook-best-practices}}, note = {Revision 1; digest sha256:523e8c08e5ed331c; last verified 2026-11-20T13:09:02Z; accessed 2026-11-21T10:02:23Z} } 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/agents-and-automation/post-tool-use-hook-best-practices