Download Latest Version v0.1.56 source code.tar.gz (176.1 kB)
Email in envelope

Get an email when there's a new version of Claude Code SDK Python

Home / v0.1.52
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-03-29 1.2 kB
v0.1.52 source code.tar.gz 2026-03-29 170.4 kB
v0.1.52 source code.zip 2026-03-29 221.9 kB
Totals: 3 Items   393.5 kB 0

New Features

  • Context usage: Added get_context_usage() method to ClaudeSDKClient for querying context window usage by category (#764)
  • Annotated parameter descriptions: The @tool decorator and create_sdk_mcp_server now support typing.Annotated for per-parameter descriptions in JSON Schema (#762)
  • ToolPermissionContext fields: Exposed tool_use_id and agent_id in ToolPermissionContext for distinguishing parallel permission requests (#754)
  • Session ID option: Added session_id option to ClaudeAgentOptions for specifying custom session IDs (#750)

Bug Fixes

  • String prompt in connect(): Fixed connect(prompt="...") silently dropping the string prompt, causing receive_messages() to hang indefinitely (#769)
  • Cancel request handling: Implemented control_cancel_request handling so in-flight hook callbacks are properly cancelled when the CLI abandons them (#751)

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.87
  • Increased CI timeout for example tests and reduced sleep duration in error handling example (#760)

PyPI: https://pypi.org/project/claude-agent-sdk/0.1.52/

:::bash
pip install claude-agent-sdk==0.1.52
Source: README.md, updated 2026-03-29