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.
TL;DR
- Ephemeral events like
session.idleno longer returned bygetMessages()— use live event listeners instead COPILOT_CLI_PATHnow reads from effective client environment, not just process env- Breaking change: code checking
getMessages()for idle events will need refactoring
New
- Ephemeral events behavior —
session.idleand 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_PATHenv resolution — now reads from the effective environment configured on the client (e.g. viaoptions.env) instead of just the process environment, consistent across all SDKs
Breaking Changes
- If your code calls
getMessages()orget_messages()to check forsession.idleevents, switch to live event listeners. Example:session.on("session.idle", () => { /* turn complete */ })(JavaScript) orsession.OnSessionIdle += (e) => { /* turn complete */ }(C#)
Update via npm install @github/copilot-sdk@0.2.1-preview.1
Source: Copilot SDK