Breaking
- Breaking: MCP servers now connect in the background by default; sessions start immediately and slow servers report
status: "pending"ininituntil ready. SetMCP_CONNECTION_NONBLOCKING=0to restore the old behavior of waiting up to 5s before the first query, or mark a serveralwaysLoad: trueto require it in turn 1. - Breaking: Headless and SDK sessions now use Task tools (
TaskCreate/TaskUpdate/TaskGet/TaskList) instead ofTodoWrite. Tool consumers should accumulate by task ID instead of replacing a snapshot list.
New Features
EffortLeveltype export: Added a publicEffortLeveltype alias for Claude effort string levels ("low","medium","high","max","xhigh") and exported it from the package root, making it available for downstream SDK wrappers and type annotations (#951)
Bug Fixes
- Stderr callback isolation: Fixed an issue where a user-provided
stderrcallback that raises an exception would silently terminate the stderr reader loop, dropping all subsequent stderr lines for the rest of the session. Exceptions are now caught per-line so a failing callback does not prevent delivery of later lines (#932) - CancelledError in eager-flush done callback: Fixed noisy
Exception in callbacklog messages on shutdown when pending eager-flush tasks were cancelled. The done callback now gracefully handlesCancelledErrorinstead of unconditionally callingTask.exception()(#931) - Tighter
permission_suggestionstype: Replacedlist[Any] | Nonewithlist[dict[str, Any]] | NoneonSDKControlPermissionRequest.permission_suggestions, enabling proper type-checking on consumers of that field (#955)
Documentation
- Clarified that
hooksdispatch for a given event is concurrent (all matchers fire in parallel), not sequential, preventing incorrect assumptions about ordering-dependent hooks like rate limiters gating subsequent hooks (#956)
Internal/Other Changes
- Bumped
mcpdependency lower bound to>=1.23.0to address GHSA-9h52-p55h-vw2f (CVE-2025-66416), which disables DNS rebinding protection by default in older versions (#927) - Stabilized eager-flush transcript mirror tests with deterministic wait helpers instead of fixed
asyncio.sleep(0)yields (#933) - Updated bundled Claude CLI to version 2.1.142
PyPI: https://pypi.org/project/claude-agent-sdk/0.2.82/
pip install claude-agent-sdk==0.2.82