Feature request: Official Go SDK for Claude Code Agent
Summary
Currently the Claude Code SDK is available for TypeScript and Python. I'd like to propose adding official Go language support.
Go is widely used for building backend services, CLI tools, and infrastructure — all areas where an agent SDK is valuable. A Go SDK would expand the reach of Claude Code to a significant developer community.
Community Reference Implementation
I've built a pure Go implementation of the Claude Agent SDK as a community effort:
Repository: https://github.com/armatrix/claude-agent-sdk-go (v0.0.1)
It covers the core feature set:
- Agent loop with streaming, server-side compaction + client-side fallback
Tool[T]generic interface with auto JSON Schema generation from Go structs- 6 built-in tools (Read, Write, Edit, Bash, Glob, Grep)
- Hook system with 12 event types (PreToolUse, PostToolUse, Stop, etc.)
- Permission rules (declarative allow/deny)
- Subagent delegation (Task tool + Runner for parent→child agent spawning)
- MCP client (Stdio/HTTP transport, Manager, Bridge)
- 6 team topologies (LeaderTeammate, Pipeline, PeerRing, SupervisorTree, Blackboard, MapReduce)
- Checkpoint file change tracking + rewind
- Plugin loading (commands, agents, MCP servers, skills)
- Budget tracking with
decimal.Decimal(no float64 for costs)
It builds directly on top of anthropic-sdk-go with no Claude Code binary dependency.
Why Go?
- Strong concurrency primitives (
goroutines,channels) are a natural fit for multi-agent topologies and streaming - Static typing + generics (Go 1.18+) enable type-safe tool definitions
- Single binary deployment simplifies distribution
- Large ecosystem for CLI tools, servers, and infrastructure
Happy to share architectural insights or collaborate if the team considers adding Go support. The implementation above can serve as a reference for API design decisions in a Go context.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗