Answer: The best practices are to preserve user intent, be transparent about modifications, use additionalContext over modifiedPrompt, use additionalContext for advisory guidance since the hook cannot reject a prompt or enforce policy, enforce hard limits before calling session.send(), and keep processing fast since the hook runs on every user message. Status: Confirmed Entry: tool/github-copilot/agents-and-automation/user-prompt-hook-best-practices Revision: 2 Digest: sha256:ef7f4ea4e825ea50 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:39Z Last changed: 2026-11-17T13:27:23Z (Keep processing fast: — → Keep processing fast) Last verified: 2026-11-20T13:09:11Z Next check: 2026-11-21T13:09:11Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Preserve user intent | Preserve user intent | [1] | 2026-11-20 Be transparent | Be transparent about modifications | [1] | 2026-11-20 Prefer additionalContext | Use additionalContext over modifiedPrompt | [1] | 2026-11-20 Advisory guidance | Use additionalContext for advisory guidance | [1] | 2026-11-20 Enforce hard limits | Enforce hard limits before calling session.send() | [1] | 2026-11-20 Keep processing fast | Keep processing fast | [1] | 2026-11-20 Sources: [1] GitHub. "User prompt submitted hook - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/hooks/user-prompt-submitted Role: primary. Accessed: 2026-11-20T13:09:11Z Quote: "Preserve user intent - When modifying prompts, ensure the core intent remains clear." (Supports: Preserve user intent) Quote: "Be transparent about modifications - If you significantly change a prompt, consider logging or notifying the user." (Supports: Be transparent) Quote: "Use additionalContext over modifiedPrompt - Adding context is less intrusive than rewriting the prompt." (Supports: Prefer additionalContext) Quote: "Use additionalContext for advisory guidance : This hook cannot reject a prompt or enforce policy." (Supports: Advisory guidance) Quote: "Enforce hard limits before calling session.send() ." (Supports: Enforce hard limits) Quote: "Keep processing fast - This hook runs on every user message. Avoid slow operations." (Supports: Keep processing fast) Snapshot SHA-256: 758bcb5515c6532a256f90821442e9c18a0c0c9c71908f0c34ebf2a90640f294 (captured 2026-11-18T13:04:22Z) 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:26Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:09:11Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:09:11Z Last attempt: 2026-11-20T13:09:11Z Notes and limitations: Extracted automatically from a single official source (section "Best practices"). Related: https://latestn.com/tool/github-copilot/agents-and-automation/user-prompt-hook-signature What input and output does the GitHub Copilot SDK user prompt submitted hook receive and return? https://latestn.com/tool/github-copilot/agents-and-automation/user-prompt-transformed-hook How do I transform a user prompt with a hook in the GitHub Copilot SDK? https://latestn.com/tool/github-copilot/agents-and-automation/user-prompt-transformed-hook-example How do I implement the GitHub Copilot user prompt transformed hook? https://latestn.com/tool/github-copilot/agents-and-automation/use-plan-mode-in-ide-2 How do I use plan mode with GitHub Copilot in my IDE? https://latestn.com/tool/github-copilot/agents-and-automation/use-secrets-variables How do I use secrets and variables in GitHub Copilot cloud agent? https://latestn.com/tool/github-copilot/agents-and-automation/use-skills-cli How do I use skills in GitHub Copilot CLI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T13:27:23Z | changed | Keep processing fast: — → Keep processing fast | [1] 2026-11-17T13:27:23Z | changed | Enforce hard limits: — → Enforce hard limits before calling session.send() | [1] 2026-11-17T13:27:23Z | changed | Advisory guidance: — → Use additionalContext for advisory guidance | [1] 2026-11-17T13:27:23Z | changed | Prefer additionalContext: — → Use additionalContext over modifiedPrompt | [1] 2026-11-17T13:27:23Z | changed | Be transparent: — → Be transparent about modifications | [1] 2026-11-17T13:27:23Z | changed | Preserve user intent: — → Preserve user intent | [1] 2026-11-17T13:27:23Z | changed | performance: Keep processing fast → — | [1] 2026-11-17T13:27:23Z | changed | hard limits: Enforce hard limits before calling session.send() → — | [1] 2026-11-17T13:27:23Z | changed | advisory guidance: Use additionalContext for advisory guidance → — | [1] 2026-11-17T13:27:23Z | changed | context preference: Use additionalContext over modifiedPrompt → — | [1] 2026-11-17T13:27:23Z | changed | transparency: Be transparent about modifications → — | [1] 2026-11-17T13:27:23Z | changed | preserve intent: Preserve user intent → — | [1] 2026-11-13T03:28:39Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/agents-and-automation/user-prompt-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/user-prompt-hook-best-practices POST: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/user-prompt-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/user-prompt-hook-best-practices?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What are the best practices for using the GitHub Copilot SDK user prompt submitted hook? Revision 2, last verified 2026-11-20T13:09:11Z. https://latestn.com/tool/github-copilot/agents-and-automation/user-prompt-hook-best-practices (accessed 2026-11-21T10:03:10Z). @misc{LatestN_tool_github_copilot_agents_and_automation_user_prompt_hook_best_practices_r2, title = {What are the best practices for using the GitHub Copilot SDK user prompt submitted hook?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/agents-and-automation/user-prompt-hook-best-practices}}, note = {Revision 2; digest sha256:ef7f4ea4e825ea50; last verified 2026-11-20T13:09:11Z; accessed 2026-11-21T10:03:10Z} } 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/user-prompt-hook-best-practices