Releases: anthropics/claude-agent-sdk-python
Releases · anthropics/claude-agent-sdk-python
v0.1.71
New Features
- Domain allowlist fields for sandbox network config: Added
allowedDomains,deniedDomains,allowManagedDomainsOnly, andallowMachLookupfields toSandboxNetworkConfig, 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.71v0.1.70
Bug Fixes
- In-process MCP tool results silently lost with older
mcpversions: Bumped themcpdependency floor to>=1.19.0. Older versions mishandledCallToolResultreturns 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 corruptedwhen breaking out ofquery()iteration inside a trio nursery withoptions.stderrset. The stderr reader now usesspawn_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.70v0.1.69
Documentation
- Added docstrings to
ClaudeAgentOptionsfields 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.69v0.1.68
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.68v0.1.67
Bug Fixes
- Trio compatibility restored: Fixed
RuntimeError: no running event loopwhen usingClaudeSDKClientorquery()under trio, a regression introduced in v0.1.51. Uses sniffio-based dispatch to select the correct async primitive (asyncio.Taskvstrio.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.0as 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.67v0.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.62