Copilot SDK v0.2.0: System Prompts, Telemetry, Blob Attachments
Copilot SDK v0.2.0 ships fine-grained system prompt customization, OpenTelemetry support, blob attachments, and a major Python API overhaul. Breaking changes in Python and Go require code updates.
TL;DR
- Fine-grained system prompt customization — edit individual sections without replacing the whole thing
- OpenTelemetry support across all four SDKs for distributed tracing
- Blob attachments for in-memory binary data (images, screenshots)
- Major Python API overhaul: keyword arguments replace TypedDict configs
- Breaking changes in Python and Go — update your code before upgrading
New
- System prompt customize mode — Ten configurable sections (identity, tone, code_change_rules, etc.) with static actions (replace, remove, append, prepend) or transform callbacks for surgical edits without nuking the entire prompt.
- OpenTelemetry support — All SDKs now support OTLP exporters with W3C trace context propagation on session create, resume, and send operations.
- Blob attachments — Send images and binary data directly to sessions without writing to disk via new
blobattachment type. - Pre-select custom agents at session creation — Specify which agent should be active on startup, eliminating the need for a separate
session.rpc.agent.select()call. - Tool permission bypass — Register tools with
skipPermission: trueto skip confirmation prompts for read-only operations. - Node.js CJS compatibility — SDK now ships both ESM and CJS builds, fixing crashes in VS Code extensions bundled with esbuild.
- New RPC methods — Low-level APIs for skills, MCP, extensions, plugins, UI elicitation, shell execution, and session logging.
Fixed
- .NET SessionEvent.ToJson() crash — Fixed serialization failures for events with JsonElement-backed payloads.
- .NET NativeAOT compatibility — Added fallback TypeInfoResolver for StreamJsonRpc.RequestId.
- .NET discriminated union codegen — Fixed code generation for nested discriminated unions.
- .NET unknown event handling — Session now gracefully handles unknown event types instead of throwing.
- Go EOF error spam — RPC client no longer logs expected EOF errors.
Breaking Changes
- autoRestart removed — Option deprecated across all SDKs and has no effect. Remove references from client options.
- Python API redesign —
CopilotClientconstructor now takes typed config dataclasses (ExternalServerConfig,SubprocessConfig) instead of TypedDict.create_session()andresume_session()now use keyword arguments with requiredon_permission_request.send()takes positionalpromptstring.MessageOptions,SessionConfig,ResumeSessionConfigremoved from public API. Internal modules renamed to private (_jsonrpc,_sdk_protocol_version,_telemetry). - Go context behavior change —
Client.Start()context no longer kills the 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: npm install @github/copilot-sdk@0.2.0 (Node.js) | dotnet add package GitHub.Copilot.Sdk --version 0.2.0 (.NET) | pip install github-copilot-sdk==0.2.0 (Python) | go get github.com/github/copilot-sdk-go@v0.2.0 (Go)
Source: Copilot SDK