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