Releases: anthropics/claude-agent-sdk-python
Releases · anthropics/claude-agent-sdk-python
v0.1.66
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.66v0.1.65
New Features
- Batch session summaries: Added
SessionStore.list_session_summaries()optional protocol method andfold_session_summary()helper for O(1)-per-session list views. Stores that maintain append-time summary sidecars can now servelist_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 anySessionStoreadapter, enabling migration from local storage to remote stores (#858) - Thinking display control: Added
displayfield toThinkingConfigtypes, forwarded as--thinking-displayto 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
ServerToolUseBlockandAdvisorToolResultBlockcontent 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_useandadvisor_tool_resultcontent blocks being silently dropped by the message parser, which caused messages carrying only server-side tool calls to arrive as emptyAssistantMessage(content=[])(#836)
Documentation
- Fixed misleading
permission_modedocstrings:dontAsknow correctly described as denying unapproved tools (was inverted), andautoclarified as using a model classifier (#863)
Internal/Other Changes
- Dropped
--debug-to-stderrdetection from the transport layer in preparation for CLI flag removal; stderr piping now depends solely on whether astderrcallback 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.65v0.1.64
New Features
- SessionStore adapter: Full SessionStore support at parity with the TypeScript SDK. Includes a
SessionStoreprotocol with 5 methods (append,load,list_sessions,delete,list_subkeys),InMemorySessionStorereference 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 atclaude_agent_sdk.testing.run_session_store_conformancefor third-party adapter authors (#837) - Reference SessionStore adapters: Three copy-in reference
SessionStoreadapters underexamples/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.64v0.1.63
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.63v0.1.62
New Features
- Top-level
skillsoption: Addedskillsparameter toClaudeAgentOptionsfor enabling skills on the main session without manually configuringallowed_toolsandsetting_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.62v0.1.61
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.61v0.1.60
New Features
- Subagent transcript helpers: Added
list_subagents()andget_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 withpip 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.60v0.1.59
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.59v0.1.58
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.58v0.1.57
New Features
- Cross-user prompt caching: Added
exclude_dynamic_sectionsoption toSystemPromptPreset, 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 thePermissionModetype, 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 32000instead of--thinking adaptive. Thedisabledtype similarly now uses--thinking disabledinstead 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