Copilot SDK v0.2.1-preview.1: Ephemeral Events Fix

Copilot SDK v0.2.1-preview.1 makes ephemeral events truly ephemeral—no longer returned by getMessages(). Use live listeners instead. Breaking change for session idle detection.

Copilot SDK v0.2.1-preview.1: Ephemeral Events Fix

TL;DR

  • Ephemeral events like session.idle no longer returned by getMessages() — use live event listeners instead
  • COPILOT_CLI_PATH now reads from effective client environment, not just process env
  • Breaking change: code checking getMessages() for idle events will need refactoring

New

  • Ephemeral events behaviorsession.idle and similar events are now truly ephemeral, observable only via live listeners, making session resume consistent whether resuming in-process or from disk

Improved

  • COPILOT_CLI_PATH env resolution — now reads from the effective environment configured on the client (e.g. via options.env) instead of just the process environment, consistent across all SDKs

Breaking Changes

  • If your code calls getMessages() or get_messages() to check for session.idle events, switch to live event listeners. Example: session.on("session.idle", () => { /* turn complete */ }) (JavaScript) or session.OnSessionIdle += (e) => { /* turn complete */ } (C#)

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

Source: Copilot SDK