<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/session-hooks-and-event-handling-in-github-copilot-sdk-for-c--tskup3azo" -->

---
title: Session Hooks and Event Handling in GitHub Copilot SDK...
description: A practical guide to using session hooks and event handling in the GitHub Copilot SDK for .NET/C#. Covers subscribing to streaming delta events via...
canonical: https://daily.dev/posts/session-hooks-and-event-handling-in-github-copilot-sdk-for-c--tskup3azo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Session Hooks and Event Handling in GitHub Copilot SDK for C# | daily.dev
og:description: A practical guide to using session hooks and event handling in the GitHub Copilot SDK for .NET/C#. Covers subscribing to streaming delta events via...
og:url: https://daily.dev/posts/session-hooks-and-event-handling-in-github-copilot-sdk-for-c--tskup3azo
og:image: https://api.daily.dev/og/posts/TsKuP3AzO.png
og:image:alt: Session Hooks and Event Handling in GitHub Copilot SDK for C#
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Hooks and Event Handling in GitHub Copilot SDK for C#

**[We Are .NET](https://daily.dev/sources/wearedotnet)** · 17 min read · 0 upvotes · 0 comments

## Summary

A practical guide to using session hooks and event handling in the GitHub Copilot SDK for .NET/C#. Covers subscribing to streaming delta events via session.On(), intercepting requests with SessionHooks.OnUserPromptSubmitted for validation and rate limiting, observing tool call lifecycle events, implementing fault-tolerant error handling with Polly retry policies, building an OpenTelemetry-based observability layer, and managing session lifecycle with audit trails. Includes complete C# code examples for each pattern.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.devleader.ca/2026/03/28/session-hooks-and-event-handling-in-github-copilot-sdk-for-c>

## Similar posts on daily.dev

- [Getting started with the GitHub Copilot SDK in .NET](https://daily.dev/posts/getting-started-with-the-github-copilot-sdk-in-net-pbloribh7) · The Art of Simplicity · 3 upvotes · 0 comments
- [GitHub Copilot CLI for .NET Developers: Real Workflows on a C\# Codebase](https://daily.dev/posts/github-copilot-cli-for-net-developers-real-workflows-on-a-c-codebase-eyicrg3rl) · We Are .NET · 4 upvotes · 0 comments
- [Doing More with GitHub Copilot as a .NET Developer](https://daily.dev/posts/doing-more-with-github-copilot-as-a-net-developer-dektd3qud) · ASP.NET Blog · 34 upvotes · 4 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#.net](https://daily.dev/tags/.net), [#observability](https://daily.dev/tags/observability), [#c#](https://daily.dev/tags/c#)

[View this post on daily.dev](https://daily.dev/posts/session-hooks-and-event-handling-in-github-copilot-sdk-for-c--tskup3azo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Session Hooks and Event Handling in GitHub Copilot SDK for C#","url":"https://daily.dev/posts/session-hooks-and-event-handling-in-github-copilot-sdk-for-c--tskup3azo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/session-hooks-and-event-handling-in-github-copilot-sdk-for-c--tskup3azo"},"datePublished":"2026-03-28T22:29:15.784Z","dateModified":"2026-03-28T22:29:43.144Z","description":"A practical guide to using session hooks and event handling in the GitHub Copilot SDK for .NET/C#. Covers subscribing to streaming delta events via...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ad5aeb280dd446098701cf0907aba776?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ad5aeb280dd446098701cf0907aba776?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"We Are .NET","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"We Are .NET","logo":"https://media.daily.dev/image/upload/s--BsnVOa3i--/f_auto/v1718347410/logos/wearedotnet","url":"https://daily.dev/sources/wearedotnet"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/session-hooks-and-event-handling-in-github-copilot-sdk-for-c--tskup3azo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,.net,observability,c#","timeRequired":"PT17M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"We Are .NET","item":"https://daily.dev/sources/wearedotnet"},{"@type":"ListItem","position":3,"name":"Session Hooks and Event Handling in GitHub Copilot SDK for C#"}]}
```

