Skip to content

Releases: anthropics/claude-agent-sdk-python

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

v0.1.61

16 Apr 22:03

Choose a tag to compare

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.112

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

pip install claude-agent-sdk==0.1.61

v0.1.60

16 Apr 15:34

Choose a tag to compare

New Features

  • Subagent transcript helpers: Added list_subagents() and get_subagent_messages() session helpers for reading subagent transcripts, enabling inspection of subagent message chains spawned during a session (#825)
  • Distributed tracing: Propagate W3C trace context (TRACEPARENT/TRACESTATE) to the CLI subprocess when an OpenTelemetry span is active, connecting SDK and CLI traces end-to-end. Install with pip install claude-agent-sdk[otel] for optional OpenTelemetry support (#821)
  • Cascading session deletion: delete_session() now removes the sibling subagent transcript directory alongside the session file, matching TypeScript SDK behavior (#805)

Bug Fixes

  • Empty setting sources: Fixed setting_sources=[] being silently dropped (treated as falsy), which caused the CLI to load default settings instead of disabling all filesystem settings. An empty list now correctly passes --setting-sources= to disable all sources (#822)

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.111

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

pip install claude-agent-sdk==0.1.60

v0.1.59

13 Apr 22:08

Choose a tag to compare

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.105

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

pip install claude-agent-sdk==0.1.59

v0.1.58

09 Apr 01:51

Choose a tag to compare

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.97

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

pip install claude-agent-sdk==0.1.58

v0.1.57

09 Apr 00:22

Choose a tag to compare

New Features

  • Cross-user prompt caching: Added exclude_dynamic_sections option to SystemPromptPreset, enabling cross-user prompt cache hits by moving per-user dynamic sections (working directory, memory, git status) out of the system prompt (#797)
  • Auto permission mode: Added "auto" to the PermissionMode type, bringing parity with the TypeScript SDK and CLI v2.1.90+ (#785)

Bug Fixes

  • Thinking configuration: Fixed thinking={"type": "adaptive"} incorrectly mapping to --max-thinking-tokens 32000 instead of --thinking adaptive. The disabled type similarly now uses --thinking disabled instead of --max-thinking-tokens 0, matching the TypeScript SDK behavior (#796)

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.96

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

pip install claude-agent-sdk==0.1.57