Copilot SDK v0.2.1-preview.2: Elicitation & Metadata

Copilot SDK v0.2.1-preview.2 adds elicitation request handling for Node, cross-SDK session metadata lookups, and Python async context managers. Fixes tool result serialization bugs.

Copilot SDK v0.2.1-preview.2: Elicitation & Metadata

TL;DR

  • Node SDK can now handle elicitation requests via callback — respond to structured user input from the CLI runtime
  • All SDKs get getSessionMetadata for O(1) session lookups instead of filtering listSessions
  • Python client and session now support async context managers for cleaner resource cleanup

New

  • onElicitationRequest callback — Node SDK clients can register a handler to respond to structured user input requests broadcast by the CLI runtime, with automatic capability negotiation.
  • getSessionMetadata API — All SDKs (TypeScript, C#, Python, Go) now expose efficient single-session metadata lookup without client-side filtering.
  • Python async context managersCopilotClient and CopilotSession implement async context manager protocol for automatic resource cleanup.

Fixed

  • ToolResultObject serialization — Structured values were being stringified before RPC, silently losing toolTelemetry and resultType on the server. Now preserved correctly across Node, Go, and Python.
  • postToolUse hook regression — Updated bundled runtime to 1.0.15-2 to resolve issues with post-tool-use hooks.

Update via npm: npm install @github/copilot-sdk@0.2.1-preview.2

Source: Copilot SDK