Rewrite SDK to Claude Code SDK for Go with Anthropic Focus#8
Draft
ryanhill4L wants to merge 1 commit intomainfrom
Draft
Rewrite SDK to Claude Code SDK for Go with Anthropic Focus#8ryanhill4L wants to merge 1 commit intomainfrom
ryanhill4L wants to merge 1 commit intomainfrom
Conversation
- Complete rewrite following the architecture of the official Python Claude Code SDK - Focus exclusively on Anthropic's Claude API with no multi-provider support - Introduce dual interface pattern: simple stateless queries and interactive client - Replace Agent/Runner with a unified Client interface - Replace guardrails with a new permission system - Replace tracing with an event-driven hook system - Add native streaming support for real-time responses - Add built-in session management with SQLite backend - Improve tool system with type safety and permission controls - Simplify package structure and imports - Provide comprehensive migration guide and updated examples - Add detailed error handling and custom error types - Remove agent handoffs in favor of tools for delegation This major update modernizes the SDK, improves usability, security, and aligns with Anthropic's official SDK. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Core SDK
claudecodepackage as main entry pointNewClientandQueryfunctions for interactive and simple query usageagents,providers, andrunnerpackagesclientpackage managing conversation state, tools, hooks, permissions, and transportanthropic-sdk-gofor API communicationerrorspackagePackage Structure
claudecodeandpkg/types,pkg/tools, etc.Features
Queryfor simple one-off queries,Clientfor stateful conversationsExamples
Documentation
Migration Notes
claudecode.NewClientandclient.SendMessageTest Plan
This rewrite modernizes the SDK, focusing on Anthropic Claude with a clean, idiomatic Go interface and improved developer experience.
🌿 Generated by Terry
ℹ️ Tag @terragon-labs to ask questions and address PR feedback
📎 Task: https://www.terragonlabs.com/task/cb2fc764-f070-499f-a35c-c65607bbe0d0