Skip to content

Releases: anthropics/claude-agent-sdk-python

v0.1.71

29 Apr 03:41

Choose a tag to compare

New Features

  • Domain allowlist fields for sandbox network config: Added allowedDomains, deniedDomains, allowManagedDomainsOnly, and allowMachLookup fields to SandboxNetworkConfig, bringing parity with the TypeScript schema and enabling Python SDK users to configure network allowlists with proper type hints (#893)

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.123

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

pip install claude-agent-sdk==0.1.71

v0.1.70

28 Apr 22:18

Choose a tag to compare

Bug Fixes

  • In-process MCP tool results silently lost with older mcp versions: Bumped the mcp dependency floor to >=1.19.0. Older versions mishandled CallToolResult returns from SDK MCP tool handlers, causing the model to receive a validation-error blob instead of the actual tool output (#891)
  • Trio nursery corruption on early cancellation: Fixed RuntimeError: Nursery stack corrupted when breaking out of query() iteration inside a trio nursery with options.stderr set. The stderr reader now uses spawn_detached() instead of manually managing a task group, matching the approach already used for the read loop (#885)

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.122

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

pip install claude-agent-sdk==0.1.70

v0.1.69

28 Apr 00:44

Choose a tag to compare

Documentation

  • Added docstrings to ClaudeAgentOptions fields for improved IDE autocompletion and inline documentation (#873)

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.121

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

pip install claude-agent-sdk==0.1.69

v0.1.68

25 Apr 02:07

Choose a tag to compare

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.119

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

pip install claude-agent-sdk==0.1.68

v0.1.67

25 Apr 00:27

Choose a tag to compare

Bug Fixes

  • Trio compatibility restored: Fixed RuntimeError: no running event loop when using ClaudeSDKClient or query() under trio, a regression introduced in v0.1.51. Uses sniffio-based dispatch to select the correct async primitive (asyncio.Task vs trio.lowlevel.spawn_system_task) at runtime while preserving the asyncio CPU-spin and cancel-scope fixes from #746 (#870)

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.120
  • Added sniffio>=1.0.0 as an explicit runtime dependency (already a transitive dep of anyio)

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

pip install claude-agent-sdk==0.1.67

v0.1.66

23 Apr 23:36

Choose a tag to compare

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.119

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

pip install claude-agent-sdk==0.1.66

v0.1.65

23 Apr 00:53

Choose a tag to compare

New Features

  • Batch session summaries: Added SessionStore.list_session_summaries() optional protocol method and fold_session_summary() helper for O(1)-per-session list views. Stores that maintain append-time summary sidecars can now serve list_sessions_from_store() without loading full transcripts, reducing round-trips from N to 1 for N sessions (#847)
  • Import local sessions to store: Added import_session_to_store() for replaying a local on-disk session into any SessionStore adapter, enabling migration from local storage to remote stores (#858)
  • Thinking display control: Added display field to ThinkingConfig types, forwarded as --thinking-display to the CLI. This lets callers override Opus 4.7's default "omitted" behavior and receive summarized thinking text (#830)
  • Server tool use and advisor result blocks: Added ServerToolUseBlock and AdvisorToolResultBlock content block types, surfacing server-executed tool calls (e.g., advisor, web_search) and their results that were previously silently dropped (#836)

Bug Fixes

  • Missing content blocks: Fixed server_tool_use and advisor_tool_result content blocks being silently dropped by the message parser, which caused messages carrying only server-side tool calls to arrive as empty AssistantMessage(content=[]) (#836)

Documentation

  • Fixed misleading permission_mode docstrings: dontAsk now correctly described as denying unapproved tools (was inverted), and auto clarified as using a model classifier (#863)

Internal/Other Changes

  • Dropped --debug-to-stderr detection from the transport layer in preparation for CLI flag removal; stderr piping now depends solely on whether a stderr callback is registered (#860)
  • Added bounded retry on session mirror append and UUID idempotency documentation (#857)
  • Updated bundled Claude CLI to version 2.1.118

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

pip install claude-agent-sdk==0.1.65

v0.1.64

20 Apr 22:31

Choose a tag to compare

New Features

  • SessionStore adapter: Full SessionStore support at parity with the TypeScript SDK. Includes a SessionStore protocol with 5 methods (append, load, list_sessions, delete, list_subkeys), InMemorySessionStore reference implementation, transcript mirroring via --session-mirror, session resume from store, and 9 new async store-backed helper functions (list_sessions_from_store, get_session_messages_from_store, fork_session_via_store, etc.). Also adds a 13-contract conformance test harness at claude_agent_sdk.testing.run_session_store_conformance for third-party adapter authors (#837)
  • Reference SessionStore adapters: Three copy-in reference SessionStore adapters under examples/session_stores/ — S3 (JSONL part files, mirrors the TS S3 reference), Redis (RPUSH/LRANGE lists + zset index), and Postgres (asyncpg + jsonb rows). Not shipped in the wheel; users copy the file they need into their project (#842)

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.116

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

pip install claude-agent-sdk==0.1.64

v0.1.63

18 Apr 01:49

Choose a tag to compare

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.114

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

pip install claude-agent-sdk==0.1.63

v0.1.62

17 Apr 19:54

Choose a tag to compare

New Features

  • Top-level skills option: Added skills parameter to ClaudeAgentOptions for enabling skills on the main session without manually configuring allowed_tools and setting_sources. Supports "all" for every discovered skill, a list of named skills, or [] to suppress all skills (#804)

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.113

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

pip install claude-agent-sdk==0.1.62