Answer: You send GitHub Copilot SDK errors to a monitoring service by using the onErrorOccurred hook and calling your monitoring service's capture function, such as captureException from @sentry/node, with the error and context tags. Status: Confirmed Entry: tool/github-copilot/agents-and-automation/send-errors-to-monitoring Revision: 2 Digest: sha256:8692d5c608ddcc84 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:29Z Last changed: 2026-11-18T13:04:06Z (session ID tag: — → sessionId) Last verified: 2026-11-20T13:08:55Z Next check: 2026-11-21T13:08:55Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of hook name | onErrorOccurred | [1] | 2026-11-20 monitoring function | captureException | [1] | 2026-11-20 error context tag | errorContext | [1] | 2026-11-20 session ID tag | sessionId | [1] | 2026-11-20 Sources: [1] GitHub. "Error handling hook - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/hooks/error-handling Role: primary. Accessed: 2026-11-20T13:08:55Z Quote: "onErrorOccurred : async (input, invocation) =>" (Supports: hook name) Quote: "import { captureException } from "@sentry/node"" (Supports: monitoring function) Quote: "errorContext : input. errorContext ," (Supports: error context tag) Quote: "sessionId : invocation. sessionId ," (Supports: session ID tag) Snapshot SHA-256: 4b16a610889bf49eefe4c44b149289395e9e4f7627bdf7a349d6ce4cfbc12913 (captured 2026-11-18T13:04:06Z) 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:06Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:08:55Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:08:55Z Last attempt: 2026-11-20T13:08:55Z Notes and limitations: Extracted automatically from a single official source (section "Send errors to monitoring service"). Related: https://latestn.com/tool/github-copilot/agents-and-automation/session-end-reasons What end reasons does the GitHub Copilot SDK session end hook receive? https://latestn.com/tool/github-copilot/agents-and-automation/session-idle-vs-task-complete What is the difference between session.idle and session.task_complete in the GitHub Copilot SDK? https://latestn.com/tool/github-copilot/agents-and-automation/session-lifecycle-hooks-best-practices What are the best practices for using GitHub Copilot SDK session lifecycle hooks? https://latestn.com/tool/github-copilot/agents-and-automation/seed-new-repository How do I seed a new repository with Copilot? https://latestn.com/tool/github-copilot/agents-and-automation/select-agent-at-session-creation How do I select a specific agent when creating a GitHub Copilot SDK session? https://latestn.com/tool/github-copilot/agents-and-automation/semantic-search-cloud-agent How does semantic code search work in the GitHub Copilot cloud agent? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:04:06Z | changed | session ID tag: — → sessionId | [1] 2026-11-18T13:04:06Z | changed | error context tag: — → errorContext | [1] 2026-11-18T13:04:06Z | changed | monitoring function: — → captureException | [1] 2026-11-18T13:04:06Z | changed | hook name: — → onErrorOccurred | [1] 2026-11-18T13:04:06Z | changed | Session ID tag: sessionId → — | [1] 2026-11-18T13:04:06Z | changed | Error context tag: errorContext → — | [1] 2026-11-18T13:04:06Z | changed | Monitoring function: captureException → — | [1] 2026-11-18T13:04:06Z | changed | Hook name: onErrorOccurred → — | [1] 2026-11-13T03:28:29Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/agents-and-automation/send-errors-to-monitoring/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/send-errors-to-monitoring POST: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/send-errors-to-monitoring with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/send-errors-to-monitoring?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I send GitHub Copilot SDK errors to a monitoring service or alert on critical errors? Revision 2, last verified 2026-11-20T13:08:55Z. https://latestn.com/tool/github-copilot/agents-and-automation/send-errors-to-monitoring (accessed 2026-11-21T10:08:11Z). @misc{LatestN_tool_github_copilot_agents_and_automation_send_errors_to_monitoring_r2, title = {How do I send GitHub Copilot SDK errors to a monitoring service or alert on critical errors?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/agents-and-automation/send-errors-to-monitoring}}, note = {Revision 2; digest sha256:8692d5c608ddcc84; last verified 2026-11-20T13:08:55Z; accessed 2026-11-21T10:08:11Z} } 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/send-errors-to-monitoring