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.65