Copilot SDK v0.2.2-preview.0: Hook Type Fix
C# and Go SDKs now handle unknown hook types gracefully, fixing session hangs when the CLI invokes unrecognized hooks.
TL;DR
- C# and Go SDKs now silently ignore unknown hook types instead of crashing
- Fixes session hangs when CLI invokes unrecognized hooks like
postToolUseFailure - Brings .NET and Go behavior in line with Node.js
Fixed
- Unknown hook type handling [C#, Go] — When the CLI invokes a hook type the SDK doesn't recognize, .NET and Go were returning a JSON-RPC error that terminated the session. Unknown hooks are now silently ignored, matching Node.js behavior and preventing hangs.
Update via: npm install @github/copilot-sdk@0.2.2-preview.0 or check your package manager for the latest version.
Source: Copilot SDK