Feature Parity: Go vs Python SDK

~95% Feature Parity · Production Ready
v0.7.1 Go SDK Version
v0.1.18+ Python SDK Version
~95% Feature Parity
19+ 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 streamingPython: async generators, Go: channels
Session resumptionContinue previous conversations
Session forkingBranch from existing sessions
Message historyAccess and replay messages
Model selectionSwitch between models
Max turns controlLimit conversation length

Message Types & Content Blocks

FeaturePythonGoNotes
User messagesUser input handling
Assistant messagesClaude responses
System messagesSystem notifications
Result messagesFinal cost/token info
Text content blocksPlain text responses
Tool use blocksTool invocation requests
Tool result blocksTool execution results
Thinking blocksExtended thinking output

Tool Integration & Permissions

FeaturePythonGoNotes
Tool permissionsPermission callbacks
Permission modesdefault, acceptEdits, plan, bypass
Tool filteringAllowedTools, DisallowedTools
Updated input supportCallbacks can modify tool inputs

MCP (Model Context Protocol) Support

FeaturePythonGoNotes
SDK MCP serversCreate tools in-process
External MCP serversstdio, SSE, HTTP connections
Custom MCP serversImplement MCPServer interface
MCP factory function-Go-exclusive convenience API

Hook System

FeaturePythonGoNotes
Pre-tool hooksBefore tool execution
Post-tool hooksAfter tool execution
User prompt hooksBefore user input processing
Regex matchingFilter by tool name pattern
Hook continuationControl execution flow

Extended Thinking

FeaturePythonGoNotes
Extended thinkingLong-form reasoning
Max thinking tokensLimit thinking output
Thinking blocksAccess reasoning process
Thinking controlEnable/disable/adaptive

Cost Management

FeaturePythonGoNotes
Token countingInput/output token counts
Cost summaryUsage statistics per message
Budget limitingMax budget in USD
Cost estimationPredict 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