Download Latest Version rust_v1.0.0-beta.9 source code.tar.gz (2.9 MB)
Email in envelope

Get an email when there's a new version of GitHub Copilot SDK

Home / v1.0.0-beta.8
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-05-26 10.5 kB
v1.0.0-beta.8 source code.tar.gz 2026-05-26 2.9 MB
v1.0.0-beta.8 source code.zip 2026-05-26 4.3 MB
Totals: 3 Items   7.2 MB 0

To make it easier to keep track of what's changed during the beta period, these release notes cover all the updates since beta 1.

This release consolidates a major round of API review, adds new capabilities (remote sessions, MCP hook, mode handlers), and introduces the Rust SDK. Every SDK went through a thorough final API review, resulting in cleaner, more consistent, and more idiomatic APIs that we can support post-GA.

🚀 GA timeline: The 1.0.0 GA release is planned for approximately one week from now.

⚠️ Breaking changes: This release includes breaking changes from the API review. See the breaking changes summary below and the detailed migration doc that you can give as context to Copilot to help it update your app code quickly.


Highlights

Rust SDK

A new Rust SDK joins the family, bringing the same Copilot capabilities to Rust applications. It supports the full feature set — sessions, tools, hooks, streaming, MCP, permissions, telemetry, canvases, and remote sessions — with idiomatic Rust patterns throughout.

:::rust
use github_copilot_sdk::{Client, ClientOptions, SessionConfig, permission::ApproveAllHandler};

let client = Client::new(ClientOptions::default());
client.start().await?;

let session = client.create_session(
    SessionConfig::default()
        .with_permission_handler(Arc::new(ApproveAllHandler))
).await?;

let reply = session.send_and_wait("Hello!").await?;

The Rust SDK ships with the Copilot runtime bundled by default — just add the crate and go. The runtime is downloaded when your app builds and is embedded in your distributable binary. Opt out of bundling with default-features = false if you manage the CLI yourself.

Remote sessions and cloud sessions

Remote sessions connect a local Copilot session to GitHub's backend services, producing a shareable URL that lets users access the session from GitHub web or mobile — useful for monitoring a locally-running agent from your phone, or sharing a session with a teammate. Enable it globally or toggle it per-session with session.rpc.remote.enable().

:::ts
const client = new CopilotClient({
  enableRemoteSessions: true,
});

// Each session emits a remote URL via session.info events
session.on("session.info", (event) => {
  if (event.data.infoType === "remote") {
    console.log("Remote URL:", event.data.url); // Share this or render as QR code
  }
});

:::cs
var client = new CopilotClient(new CopilotClientOptions {
    EnableRemoteSessions = true,
});

Requirements: the user must be authenticated (gitHubToken or useLoggedInUser), and the session's working directory must be a GitHub repository. The enableRemoteSessions option only applies when the SDK spawns the CLI process (ignored when connecting to an external server).

Cloud sessions go a step further — the session runs entirely in the cloud rather than on the local machine. Pass a cloud option with repository metadata when creating a session:

:::ts
const session = await client.createSession({
  onPermissionRequest: approveAll,
  cloud: {
    repository: { owner: "github", name: "my-repo", branch: "main" },
  },
});

Both features are available in all languages.

Pre-MCP tool call hook

A new preMcpToolCall hook fires before every MCP tool invocation, giving your application the chance to inspect, modify, or block MCP tool calls. This is useful for adding authorization, logging, or stripping sensitive metadata from tool call arguments.

:::ts
const session = await client.createSession({
  onPermissionRequest: approveAll,
  preMcpToolCall: async (context) => {
    console.log(
      `MCP tool: ${context.toolName} on server: ${context.serverName}`,
    );
    // Return modified args, or throw to block the call
    return context.arguments;
  },
});

:::cs
var session = await client.CreateSessionAsync(new SessionConfig {
    OnPermissionRequest = PermissionHandler.ApproveAll,
    PreMcpToolCall = async (context) => {
        Console.WriteLine($"MCP tool: {context.ToolName} on server: {context.ServerName}");
        return context.Arguments;
    },
});

Available in all languages.

Cleaner, more consistent APIs across all SDKs

Every SDK went through a comprehensive API review to make the developer experience cleaner and more idiomatic. The highlights:

Simplified client connection config — Instead of scattering transport options (cliPath, cliUrl, port, tcpConnectionToken, useStdio) across client options, there's now a single connection property with typed factory methods:

:::ts
// Connect to an external server
const client = new CopilotClient({
  connection: RuntimeConnection.forUri("http://localhost:3000"),
});

// Or spawn a local CLI over stdio (the default if no connection is specified)
const client = new CopilotClient({
  connection: RuntimeConnection.forStdio(),
});

:::cs
var client = new CopilotClient(new CopilotClientOptions {
    Connection = RuntimeConnection.ForStdio(),
});
  • Python: CopilotClient(connection=RuntimeConnection.for_uri("http://localhost:3000"))
  • Go: copilot.NewClient(&copilot.ClientOptions{Connection: copilot.UriConnection{Uri: "http://localhost:3000"}})
  • Rust: Client::new(ClientOptions { connection: Some(RuntimeConnection::Uri { uri: "http://localhost:3000".into() }), ..Default::default() })

send() now accepts a plain string — The most common case just got simpler:

:::ts
// Before
const reply = await session.send({ prompt: "Hello!" });

// After
const reply = await session.send("Hello!");
// Full options still available:
const reply = await session.send({ prompt: "Analyze this", attachments: [...] });

Permission decisions are now typed factories instead of stringly-typed objects:

:::cs
// Before
return new PermissionRequestResult { Kind = "approve-once" };

// After
return PermissionDecision.ApproveOnce();
// Also: PermissionDecision.Reject(), .UserNotAvailable(), .NoResult()

getMessages()getEvents() — The method name now accurately reflects what it returns (the full event stream, not just messages).

See the breaking changes guide for the complete list of API changes per language.

New features

  • Mode handler APIsonExitPlanModeRequest and onAutoModeSwitchRequest handlers let your app handle plan-approval flows and automatic mode switching (e.g., rate-limit recovery). Available in all languages.
  • runtime_instructions system message section — A new section in the system message customization API for runtime-generated instructions, giving you another hook to inject or transform prompt content.
  • enableSessionTelemetry — A per-session toggle to enable or disable telemetry collection, independent of the client-level telemetry config.
  • SDK tracing diagnostics — Built-in diagnostic tracing for troubleshooting SDK ↔ CLI communication issues.
  • Provider model and token limit overridesProviderConfig now supports modelId, wireModel, maxInputTokens, and maxOutputTokens, letting BYOK users decouple the model ID visible to agents from the wire model sent to the provider.
  • Canvas extensions (experimental, GitHub Copilot App only) — Sessions can now declare canvases — interactive UI surfaces that the model can open, close, and invoke actions on. This is currently specific to the GitHub Copilot App and is not yet available in other environments.

Changes and improvements

  • [.NET] Now compatible with .NET Framework (net472) in addition to .NET 8+, .NET 10, and .NET Standard 2.0 — broadening support for legacy applications.
  • [.NET] Session event enums are now forward-compatible string-backed types, so unknown event values from newer CLI versions don't cause deserialization failures.
  • [Go] Discriminated union types in generated RPC code are now proper typed interfaces instead of flattened structs.
  • [Go] CLI stderr is now captured and surfaced in error messages, making it easier to diagnose startup failures.
  • All SDKs — Generated RPC types have been streamlined with the latest schema. If you reference generated rpc.* types by name, expect renames.

⚠️ Breaking changes

This release includes breaking changes from a comprehensive API review. The changes are mechanical — mostly renames and reshaping — and make the APIs cleaner and more consistent as we finalize the 1.0.0 shape.

💡 Migrating your app? Pass the breaking changes document to GitHub Copilot and ask it to update your code. The document is structured as a machine-readable migration guide with before/after examples for every change.

Summary of breaking changes

Change All SDKs
Client transport config → RuntimeConnection
copilotHomebaseDirectory
getMessages()getEvents()
Permission results → PermissionDecision factories ✅ (C#, Python, Rust)
Handler renames (onExitPlanModeonExitPlanModeRequest)
Generated RPC type renames

Each language also has its own idiomatic changes beyond the shared ones above. See the detailed breaking changes document for the full per-language list.

Source: README.md, updated 2026-05-26