Copilot SDK v0.2.0: Fine-Grained Prompts & OpenTelemetry

Copilot SDK v0.2.0 ships fine-grained system prompt customization, OpenTelemetry tracing across all SDKs, blob attachments, and significant Python API overhaul. Breaking changes in Python and Go.

Copilot SDK v0.2.0: Fine-Grained Prompts & OpenTelemetry

TL;DR

  • Fine-grained system prompt customization — edit individual sections without replacing the whole prompt
  • OpenTelemetry support across all four SDKs for distributed tracing
  • Blob attachments for inline binary data (images, screenshots) without disk writes
  • Breaking changes in Python SDK: TypedDict configs replaced with keyword arguments and dataclasses
  • Go SDK: context cancellation no longer kills the CLI process

New

  • Fine-grained system prompt customization — New "customize" mode for systemMessage lets you surgically edit ten configurable sections (identity, tone, tool_efficiency, environment_context, code_change_rules, guidelines, safety, tool_instructions, custom_instructions, last_instructions) with static actions or a transform callback for regex mutations and conditional edits.
  • OpenTelemetry support — All four SDKs now support distributed tracing with W3C trace context automatically propagated on session create, resume, and send operations.
  • Blob attachments — Send images or binary content directly to a session without writing to disk via a new blob attachment type.
  • Pre-select custom agent at session creation — Specify which custom agent should be active when a session starts, eliminating the need for a separate session.rpc.agent.select() call.
  • Skip permission for low-risk tools — Tools can now be registered with skipPermission: true to bypass confirmation prompts for read-only operations.
  • Reasoning effort on model switch — All SDKs now accept an optional reasoningEffort parameter in setModel() for models that support it.
  • Custom model listing for BYOK — Applications using bring-your-own-key providers can supply onListModels in client options to override client.listModels().
  • Node.js CJS compatibility — The Node.js SDK now ships both ESM and CJS builds, fixing crashes in VS Code extensions and esbuild-bundled tools.
  • System notifications and session log APIs — Updated to match the latest CLI runtime with system.notification events and a session log RPC API.
  • New low-level RPC methodssession.rpc.skills.*, session.rpc.mcp.*, session.rpc.extensions.*, session.rpc.plugins.list(), session.rpc.ui.elicitation(), session.rpc.shell.exec(), and session.log() for fine-grained session control.

Fixed

  • .NET SessionEvent.ToJson() failure — Fixed crashes when serializing events with JsonElement-backed payloads like assistant.message and tool.execution_start.
  • .NET NativeAOT compatibility — Added fallback TypeInfoResolver for StreamJsonRpc.RequestId.
  • .NET discriminated union codegen — Fixed code generation for discriminated unions nested within other types.
  • .NET unknown session event handling — Now handles unknown session event types gracefully instead of throwing.
  • Go EOF error logging — Stopped RPC client from logging expected EOF errors.

Breaking Changes

  • autoRestart removed — The autoRestart option has been deprecated across all SDKs and has no effect. Remove any references from your client options.
  • Python SDK API overhaulCopilotClientOptions TypedDict replaced with ExternalServerConfig and SubprocessConfig dataclasses. create_session() and resume_session() now take keyword arguments instead of config dicts. send() and send_and_wait() now take a positional prompt string. MessageOptions, SessionConfig, and ResumeSessionConfig removed from public API. Internal modules (copilot.jsonrpc, copilot.sdk_protocol_version, copilot.telemetry) renamed to private with underscore prefix.
  • Go context behavior change — Canceling the context.Context passed to Client.Start() no longer terminates the spawned CLI process. Call client.Stop() or client.ForceStop() explicitly.
  • Go LogOptions.Ephemeral type change — Changed from bool to *bool for three-state semantics. Use copilot.Bool(true) instead of bare true.

Update via npm install @github/copilot-sdk@0.2.0, pip install copilot-sdk==0.2.0, go get github.com/github/copilot-sdk@v0.2.0, or dotnet add package GitHub.Copilot.Sdk --version 0.2.0.

Source: Copilot SDK