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.
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 forsystemMessagelets 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 atransformcallback 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
blobattachment 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: trueto bypass confirmation prompts for read-only operations. - Reasoning effort on model switch — All SDKs now accept an optional
reasoningEffortparameter insetModel()for models that support it. - Custom model listing for BYOK — Applications using bring-your-own-key providers can supply
onListModelsin client options to overrideclient.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.notificationevents and a session log RPC API. - New low-level RPC methods —
session.rpc.skills.*,session.rpc.mcp.*,session.rpc.extensions.*,session.rpc.plugins.list(),session.rpc.ui.elicitation(),session.rpc.shell.exec(), andsession.log()for fine-grained session control.
Fixed
- .NET SessionEvent.ToJson() failure — Fixed crashes when serializing events with
JsonElement-backed payloads likeassistant.messageandtool.execution_start. - .NET NativeAOT compatibility — Added fallback
TypeInfoResolverforStreamJsonRpc.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
autoRestartoption has been deprecated across all SDKs and has no effect. Remove any references from your client options. - Python SDK API overhaul —
CopilotClientOptionsTypedDict replaced withExternalServerConfigandSubprocessConfigdataclasses.create_session()andresume_session()now take keyword arguments instead of config dicts.send()andsend_and_wait()now take a positionalpromptstring.MessageOptions,SessionConfig, andResumeSessionConfigremoved 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.Contextpassed toClient.Start()no longer terminates the spawned CLI process. Callclient.Stop()orclient.ForceStop()explicitly. - Go LogOptions.Ephemeral type change — Changed from
boolto*boolfor three-state semantics. Usecopilot.Bool(true)instead of baretrue.
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