Copilot SDK Go v1.0.0-beta.6: preMcpToolCall Hooks & API Renames

Go SDK v1.0.0-beta.6 adds preMcpToolCall hooks for metadata interception and renames cwd to workingDirectory across all SDKs. Breaking changes in Go public API.

Copilot SDK Go v1.0.0-beta.6: preMcpToolCall Hooks & API Renames

TL;DR

  • preMcpToolCall hook — intercept and modify metadata before MCP tool calls execute across all SDKs
  • cwd → workingDirectory rename — consistent public API naming across Node.js, Python, Go, .NET, and Rust
  • Breaking change — Go ClientOptions.Cwd and SessionContext.Cwd are now WorkingDirectory; update your code

New

  • preMcpToolCall hook support — fires before MCP tool dispatch; receives serverName, toolName, arguments, toolCallId, and _meta; tri-state output lets you preserve, remove, or replace metadata
  • E2E hook tests — Node.js, Python, Go, and Rust now have full test coverage for set/replace/remove metadata scenarios

Fixed

  • Java PingResponse timestamp deserialization — now handles ISO-8601 strings instead of numeric epoch milliseconds
  • Node.js Windows CI flakiness — increased CLI start timeout from 10s to 30s; restructured SQL snapshot to prevent concurrent dependent tool calls
  • Go mcp_and_agents_e2e_test — corrected field reference from Cwd to WorkingDirectory

Breaking Changes

  • Go API renames — ClientOptions.Cwd → WorkingDirectory, SessionFsConfig.InitialCwd → InitialWorkingDirectory, SessionContext.Cwd → WorkingDirectory, SessionListFilter.Cwd → WorkingDirectory. JSON wire format ("cwd") unchanged via struct tags.
  • All SDKs — cwd field renamed to workingDirectory (Node.js, Python, Go, .NET, Rust) for API consistency. Wire format preserved through serialization layers.

Update via: go get github.com/github/copilot-sdk/go@v1.0.0-beta.6

Source: Copilot SDK