Copilot SDK Rust v1.0.0-beta.6: Default Derives & Schema Fixes

Copilot SDK Rust beta.6 adds Default derives for generated types, preMcpToolCall hooks, cloud session support, and fixes codegen sanitization across all SDKs.

Copilot SDK Rust v1.0.0-beta.6: Default Derives & Schema Fixes

TL;DR

  • Rust types now derive Default trait automatically
  • Codegen identifier sanitization and schema comparison fixes across all SDKs
  • New preMcpToolCall hook support and optional tool callbacks

New

  • Derive Default on Rust types — Generated Rust structs now implement Default, reducing boilerplate in your agent code
  • preMcpToolCall hook — Intercept MCP tool calls before execution across all SDKs for logging, validation, or modification
  • Cloud session config support — SessionConfig now supports remote session routing for distributed deployments
  • SessionFs SQLite support — Runtime SQLite routing for session persistence without external databases
  • Optional tool callbacks — Tool callbacks are now optional across SDKs, simplifying minimal agent implementations

Fixed

  • Codegen identifier sanitization — Reserved keywords and invalid identifiers now properly escaped in generated code
  • Shared schema comparison for Go — Fixed schema deduplication logic preventing duplicate type definitions
  • Python from_dict() round-trip — Optional fields with schema defaults now serialize/deserialize correctly
  • Hook snapshot for runtime replay — Session hooks now capture and restore state accurately during replay
  • Sub-agent hook propagation — sessionId now exposed on hook inputs for proper context tracking
  • Permission handler documentation — Corrected handler kinds in SDK docs and samples
  • Flaky E2E tests — Stabilized compaction, pending-messages-modified, and MCP server acceptance tests

Breaking Changes

  • MCPStdioServerConfig.args is now optional — Update any code that required this field to be present
  • 32-bit types for bounded integers — Schema integers with bounds now use 32-bit types instead of 64-bit where applicable

Update: cargo install copilot-sdk or check the full release notes for language-specific installation.

Source: Copilot SDK