Overview
The Claude Code SDK has been renamed to the Claude Agent SDK and its documentation has been reorganized. This change reflects the SDK’s broader capabilities for building AI agents beyond just coding tasks.What’s Changed
Migration Steps
For TypeScript/JavaScript Projects
1. Uninstall the old package:@anthropic-ai/claude-code to @anthropic-ai/claude-agent-sdk:
package.json, update it:
Before:
For Python Projects
1. Uninstall the old package:WARNING: Skipping claude-code-sdk as it is not installed. That’s expected and you can continue to the next step.
2. Install the new package:
claude-code-sdk is listed in your requirements.txt or pyproject.toml, replace it with claude-agent-sdk.
3. Update your imports:
Change all imports from claude_code_sdk to claude_agent_sdk:
Breaking changes
Python: ClaudeCodeOptions renamed to ClaudeAgentOptions
What changed: The Python SDK typeClaudeCodeOptions has been renamed to ClaudeAgentOptions.
Migration:
System prompt no longer default
What changed: The SDK no longer uses Claude Code’s system prompt by default. Migration:Settings sources default
This default was briefly changed in v0.1.0 to load no filesystem settings and then reverted, so no migration action is needed. Current behavior: OmittingsettingSources on query() loads user, project, and local filesystem settings, matching the CLI. This includes ~/.claude/settings.json, .claude/settings.json, .claude/settings.local.json, CLAUDE.md files, and custom commands.
To run isolated from filesystem settings, pass an empty array:
Python SDK 0.1.59 and earlier treated an empty list the same as omitting the option, so upgrade before relying on
setting_sources=[]. See What settingSources does not control for inputs that are read even when settingSources is [].Next Steps
- Explore the Agent SDK Overview to learn about available features
- Check out the TypeScript SDK Reference for detailed API documentation
- Review the Python SDK Reference for Python-specific documentation
- Learn about Custom Tools and MCP Integration