Answer: Every hook receives an invocation parameter with context about the current session, which includes the sessionId field (a string containing the ID of the current session). Status: Confirmed Entry: tool/github-copilot/agents-and-automation/hook-invocation-context Revision: 3 Digest: sha256:92ea3aa17560c2bb (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:32Z Last changed: 2026-11-18T13:04:11Z (field description: — → The ID of the current session) Last verified: 2026-11-20T13:08:59Z Next check: 2026-11-21T13:08:59Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of invocation parameter | invocation | [1] | 2026-11-20 context field | sessionId | [1] | 2026-11-20 field type | string | [1] | 2026-11-20 field description | The ID of the current session | [1] | 2026-11-20 Sources: [1] GitHub. "Session hooks - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/hooks/hooks-overview Role: primary. Accessed: 2026-11-20T13:08:59Z Quote: "Every hook receives an invocation parameter with context about the current session" (Supports: invocation parameter) Quote: "sessionId string The ID of the current session" (Supports: context field, field type, field description) Snapshot SHA-256: 0d279d9e576a983d3a2eef1c9e5138cc225c4dcabb793cb545c1ba9a764fb490 (captured 2026-11-18T13:04:08Z) 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:11Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:08:59Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:08:59Z Last attempt: 2026-11-20T13:08:59Z Notes and limitations: Extracted automatically from a single official source (section "Hook invocation context"). Related: https://latestn.com/tool/github-copilot/agents-and-automation/hooks-quick-start How do I get started using hooks in the GitHub Copilot SDK? https://latestn.com/tool/github-copilot/agents-and-automation/how-agents-coordinate How do GitHub Copilot agents coordinate work with each other? https://latestn.com/tool/github-copilot/agents-and-automation/implement-feature-from-issue How do I use GitHub Copilot to implement a feature from a GitHub Issue? https://latestn.com/tool/github-copilot/agents-and-automation/fleet-command-considerations What should I consider before using the /fleet command in GitHub Copilot? https://latestn.com/tool/github-copilot/agents-and-automation/fleet-command-delegate-parallelize How do I use the /fleet command in GitHub Copilot to delegate and parallelize work across agents? https://latestn.com/tool/github-copilot/agents-and-automation/fleet-subagents-and-monitoring How do I assign specialized subagents and monitor progress in GitHub Copilot CLI fleet mode? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:04:11Z | changed | field description: — → The ID of the current session | [1] 2026-11-18T13:04:11Z | changed | field type: — → string | [1] 2026-11-18T13:04:11Z | changed | purpose: This allows hooks to maintain state or perform session-specific logic. → — | [1] 2026-11-18T13:04:11Z | changed | sessionId description: The ID of the current session → — | [1] 2026-11-16T12:52:57Z | changed | purpose: — → This allows hooks to maintain state or perform session-specific logic. | [1] 2026-11-16T12:52:57Z | changed | sessionId description: — → The ID of the current session | [1] 2026-11-16T12:52:57Z | changed | field description: The ID of the current session → — | [1] 2026-11-16T12:52:57Z | changed | field type: string → — | [1] 2026-11-13T03:28:32Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/agents-and-automation/hook-invocation-context/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/hook-invocation-context POST: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/hook-invocation-context with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/hook-invocation-context?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What context is passed to a GitHub Copilot SDK hook when it is invoked? Revision 3, last verified 2026-11-20T13:08:59Z. https://latestn.com/tool/github-copilot/agents-and-automation/hook-invocation-context (accessed 2026-11-21T09:54:02Z). @misc{LatestN_tool_github_copilot_agents_and_automation_hook_invocation_context_r3, title = {What context is passed to a GitHub Copilot SDK hook when it is invoked?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/agents-and-automation/hook-invocation-context}}, note = {Revision 3; digest sha256:92ea3aa17560c2bb; last verified 2026-11-20T13:08:59Z; accessed 2026-11-21T09:54:02Z} } 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/hook-invocation-context