Feature Parity: Go vs Python SDK

~98% Feature Parity · Production Ready
v0.9.0 Go SDK Version
v0.1.81+ Python SDK Version
~98% Feature Parity
25+ Features at 100%

Both SDKs are fully functional and production-ready. This document provides a comprehensive comparison.


Core API & Session Management

FeaturePythonGoNotes
Query (one-shot)✓✓Simple one-off requests
Client (interactive)✓✓Full bidirectional communication
Message streaming✓✓Python: async generators, Go: channels
Session resumption✓✓Continue previous conversations
Session forking✓✓Branch from existing sessions
Message history✓✓Access and replay messages
Model selection✓✓Switch between models
Max turns control✓✓Limit conversation length
Session store✓✓Pluggable transcript persistence
Session management✓✓List, rename, tag, delete, fork sessions
Subagent transcripts✓✓List and read subagent messages

Message Types & Content Blocks

FeaturePythonGoNotes
User messages✓✓User input handling
Assistant messages✓✓Claude responses
System messages✓✓System notifications
Result messages✓✓Final cost/token info
Text content blocks✓✓Plain text responses
Tool use blocks✓✓Tool invocation requests
Tool result blocks✓✓Tool execution results
Thinking blocks✓✓Extended thinking output
Server tool use blocks✓✓Server-side tool requests
Server tool result blocks✓✓Server-side tool results
Task lifecycle messages✓✓Started, progress, notification
Hook event messages✓✓Hook lifecycle debugging
Mirror error messages✓✓Session store error reporting
Forward-compatible parsing✓✓Unknown types handled gracefully

Tool Integration & Permissions

FeaturePythonGoNotes
Tool permissions✓✓Permission callbacks
Permission modes✓✓default, acceptEdits, plan, bypass, auto
Tool filtering✓✓AllowedTools, DisallowedTools
Updated input support✓✓Callbacks can modify tool inputs

MCP (Model Context Protocol) Support

FeaturePythonGoNotes
SDK MCP servers✓✓Create tools in-process
External MCP servers✓✓stdio, SSE, HTTP connections
Custom MCP servers✓✓Implement MCPServer interface
MCP factory function-✓Go-exclusive convenience API
Tool annotations✓✓ReadOnly, Destructive, OpenWorld metadata
Typed MCP status✓✓McpServerInfo, McpStatusResponse
Strict MCP config✓✓Ignore default CLI MCP servers

Hook System

FeaturePythonGoNotes
Pre-tool hooks✓✓Before tool execution
Post-tool hooks✓✓After tool execution
User prompt hooks✓✓Before user input processing
Regex matching✓✓Filter by tool name pattern
Hook continuation✓✓Control execution flow

Extended Thinking

FeaturePythonGoNotes
Extended thinking✓✓Long-form reasoning
Max thinking tokens✓✓Limit thinking output
Thinking blocks✓✓Access reasoning process
Thinking control✓✓Enable/disable/adaptive

Cost Management

FeaturePythonGoNotes
Token counting✓✓Input/output token counts
Cost summary✓✓Usage statistics per message
Budget limiting✓✓Max budget in USD
Cost estimation✓✓Predict costs

When to Use Each SDK

Choose Go SDK When:

  • You need concurrent request handling (1M+ goroutines)
  • You want strong compile-time type safety
  • You need high-performance, low-latency responses
  • You want single-binary deployment
  • You're building microservices or cloud-native apps

Choose Python SDK When:

  • You prefer Python's syntax and ecosystem
  • You need rapid prototyping capabilities
  • You're working with Jupyter notebooks
  • You have an existing Python codebase
  • You prefer async/await patterns

Both SDKs use the same control protocol, so migrating code between them is straightforward. They are also interoperable in microservice architectures.


Compatibility

Both SDKs use the same control protocol and are forward-compatible. Install the Claude Code CLI once and use both SDKs on the same machine.

Go SDK VersionPython SDK VersionCompatible
v0.2.0+v0.1.0+✓ Yes
v0.1.0+v0.1.0+✓ Yes

Further reading: Architecture Differences | Migration Guide

Found a missing feature? Open an issue