Skip to content

Conversation

@severity1
Copy link
Owner

Summary

Rename from claude-code-sdk-go to claude-agent-sdk-go to align with official Python SDK rename.

Closes #54

Changes

  • Updated module path in go.mod to github.com/severity1/claude-agent-sdk-go
  • Updated all import statements using ast-grep (27 Go files)
  • Updated documentation (README.md, CLAUDE.md, doc.go)
  • Updated CI/CD workflows and build configs
  • Updated example files (14 examples with go.mod updates)

Verification

  • No remaining references to old module name
  • go fmt ./... - clean
  • go vet ./... - clean
  • go build ./... - success
  • go test -race ./... - all pass
  • go test -cover ./... - 90.1% coverage
  • golangci-lint run - 0 issues

Post-Merge Steps

After merging this PR:

  1. Rename the GitHub repository: gh repo rename claude-agent-sdk-go
  2. GitHub will automatically set up redirects from the old URL

Notes

  • Type names (Options, Client) remain unchanged per Go conventions
  • CLAUDE_CODE_ENTRYPOINT env var unchanged (CLI-controlled)

Aligns with official Python SDK rename (Issue #54):
- Update module path in go.mod
- Update all import statements (ast-grep)
- Update documentation and badges
- Update CI/CD workflows and build configs

All tests pass with 90.1% coverage.
@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Bug fixes:
- Remove omitempty from hook Matcher fields to allow empty string
  matchers (wildcard matching) to serialize correctly
- Auto-configure PermissionPromptToolName when CanUseTool callback is set

Example improvements:
- Refactor MCP examples (06, 07) to use mcp-server-time instead of
  non-existent AWS tools
- Update permission callback example (11) to use Write/Bash operations
  that trigger callbacks (Read operations are auto-approved by CLI)
- Add exampleDir() helper to examples 11, 12, 13 for correct demo file
  paths when run from any directory
- Remove unused demo files from example 11 (now uses /tmp)

Documentation:
- Add note about Read/Glob being auto-approved and not triggering
  permission callbacks
The input parameter in runToolFilterExample's permission callback
was unused since the callback only filters by tool name.
The error channel may emit shutdown errors before closing when the
transport is disconnected. The test now drains any errors and verifies
the channel eventually closes rather than expecting immediate closure.
…lName

When CanUseTool callback is set but PermissionPromptToolName is not,
validateOptions automatically configures it to "stdio" to enable the
control protocol to route permission prompts back to the SDK.
- Fix *string type mismatch in examples 01-10: properly check nil and
  dereference msg.Result before using with format verbs
- Remove emojis from examples 04, 05, 08, 09, 10 per code standards
- Fix race condition in example 13: drain message channel completely
  before exiting to ensure UserMessage UUID is captured
- Update example 11 to use PermissionModeAcceptEdits for proper
  callback invocation (callbacks run after permission mode check)
- Update README.md documentation to match actual example names
Example 11 (permission_callback):
- Changed PermissionModeAcceptEdits to PermissionModeDefault to ensure
  callbacks are invoked (AcceptEdits auto-approves without callbacks)
- Added documentation about known CLI bug with ALLOW responses
- Updated comments to clarify permission mode requirements

Example 13 (file_checkpointing):
- Changed query to trigger actual file operations (read demo/notes.txt)
  since simple queries don't generate UserMessage with UUID
- Improved message loop with drain timeout pattern to prevent blocking
- Fixed goto labels to ensure Step 3 output is displayed
- Increased context timeout from 60s to 90s
…tures

- Fix nil pointer dereference bugs in Query and Client API examples
  (msg.Result is *string, not string)
- Add all 14 examples in clean table format with correct paths
- Add Advanced Features section linking to examples 11-14
- Remove emojis from section headers per CLAUDE.md guidelines
- Add "Advanced capabilities" to Key Features list
Update all references from "Claude Code SDK" to "Claude Agent SDK"
to align with the module rename to claude-agent-sdk-go.

Files updated:
- README.md, CLAUDE.md, doc.go
- .goreleaser.yml release header
- All 14 examples (print statements and comments)
- examples/README.md, examples/CLAUDE.md
- internal/CLAUDE.md, internal/shared/errors.go, internal/shared/options.go

Note: References to "Claude Code CLI" remain unchanged as that
refers to the Anthropic CLI tool this SDK integrates with.
@severity1 severity1 merged commit a112689 into main Jan 1, 2026
26 checks passed
@severity1 severity1 deleted the chore/rename-to-claude-agent-sdk-go branch January 1, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: Rename project from claude-code-sdk-go to claude-agent-sdk-go

3 participants