claude-agent-sdk breaking changes
Updated December 4, 2026
On this page
Latest version 0.2.190, released December 4, 2026. Source repository
Packages on PyPI run on Python. Python end of life dates.
claude-agent-sdk 0.2.166 breaking changes
- Removed
claude_agent_sdk.SandboxIgnoreViolations.file
SandboxIgnoreViolations.file was removed in claude-agent-sdk 0.2.166 pypi.org - Removed
claude_agent_sdk.SandboxIgnoreViolations.network
SandboxIgnoreViolations.network was removed in claude-agent-sdk 0.2.166 pypi.org - Removed
claude_agent_sdk.types.SandboxIgnoreViolations.file
SandboxIgnoreViolations.file was removed in claude-agent-sdk 0.2.166 pypi.org - Removed
claude_agent_sdk.types.SandboxIgnoreViolations.network
SandboxIgnoreViolations.network was removed in claude-agent-sdk 0.2.166 pypi.org - Signature changed
claude_agent_sdk.SandboxIgnoreViolations
Was class SandboxIgnoreViolations(TypedDict); now SandboxIgnoreViolations: TypeAlias. pypi.org - Signature changed
claude_agent_sdk.types.SandboxIgnoreViolations
Was class SandboxIgnoreViolations(TypedDict); now SandboxIgnoreViolations: TypeAlias. pypi.org - Signature changed
SandboxSettings.ignoreViolations
The type changed from a TypedDict with file and network keys to dict[str, list[str]], matching the CLI schema. Code that passed file or network keys must switch to command-pattern keys such as {"*": [...]}. github.com
claude-agent-sdk 0.2.158 breaking changes
- Signature changed
claude_agent_sdk.ClaudeAgentOptions.__init__
Was def __init__(self, tools: list[str] | ToolsPreset | None = None, allowed_tools: list[str] = list(), system_prompt: str | SystemPromptPreset | SystemPromptCustom | SystemPromptFile | None = None, mcp_servers: dict[str, McpServerConfig]... pypi.org - Signature changed
claude_agent_sdk.types.ClaudeAgentOptions.__init__
Was def __init__(self, tools: list[str] | ToolsPreset | None = None, allowed_tools: list[str] = list(), system_prompt: str | SystemPromptPreset | SystemPromptCustom | SystemPromptFile | None = None, mcp_servers: dict[str, McpServerConfig]... pypi.org
claude-agent-sdk 0.2.153 breaking changes
- Configuration changed
SystemPromptPreset
SystemPromptPreset now has a snapshot field, and a new SystemPromptCustom typed dict was added. When snapshot is False the prompt is rebuilt on every request, which may change behavior for code that relies on the previous prompt handling. github.com - Signature changed
claude_agent_sdk.ClaudeAgentOptions.__init__
Was def __init__(self, tools: list[str] | ToolsPreset | None = None, allowed_tools: list[str] = list(), system_prompt: str | SystemPromptPreset | SystemPromptFile | None = None, mcp_servers: dict[str, McpServerConfig] | str | Path =... pypi.org - Signature changed
claude_agent_sdk.ClaudeAgentOptions.system_prompt
Was system_prompt: str | SystemPromptPreset | SystemPromptFile | None; now system_prompt: str | SystemPromptPreset | SystemPromptCustom | SystemPromptFile | None. pypi.org - Signature changed
claude_agent_sdk.types.ClaudeAgentOptions.__init__
Was def __init__(self, tools: list[str] | ToolsPreset | None = None, allowed_tools: list[str] = list(), system_prompt: str | SystemPromptPreset | SystemPromptFile | None = None, mcp_servers: dict[str, McpServerConfig] | str | Path =... pypi.org - Signature changed
claude_agent_sdk.types.ClaudeAgentOptions.system_prompt
Was system_prompt: str | SystemPromptPreset | SystemPromptFile | None; now system_prompt: str | SystemPromptPreset | SystemPromptCustom | SystemPromptFile | None. pypi.org
claude-agent-sdk 0.2.140 breaking changes
- Removed
claude_agent_sdk.client.HookEvent
claude_agent_sdk.client.HookEvent was removed in claude-agent-sdk 0.2.140 pypi.org - Removed
claude_agent_sdk.client.HookMatcher
claude_agent_sdk.client.HookMatcher was removed in claude-agent-sdk 0.2.140 pypi.org - Behavior changed
ProcessError
When the CLI exits after a terminal error result, the SDK now raises ResultError, a ProcessError subclass, instead of a bare exit-code error. Code that matches the old message text should branch on the new structured fields instead. github.com - Signature changed
claude_agent_sdk.ClaudeAgentOptions.__init__
Was def __init__(self, tools: list[str] | ToolsPreset | None = None, allowed_tools: list[str] = list(), system_prompt: str | SystemPromptPreset | SystemPromptFile | None = None, mcp_servers: dict[str, McpServerConfig] | str | Path =... pypi.org - Signature changed
claude_agent_sdk.SdkMcpTool.__init__
Was def __init__(self, name: str, description: str, input_schema: type[T] | dict[str, Any], handler: Callable[[T], Awaitable[dict[str, Any]]], annotations: ToolAnnotations | None = None) -> None; now def __init__(self, name: str... pypi.org - Signature changed
claude_agent_sdk.SdkMcpTool.annotations
Was annotations: ToolAnnotations | None; now annotations: _McpToolAnnotations | None. pypi.org - Signature changed
claude_agent_sdk.SessionMessage.__init__
Was def __init__(self, type: Literal['user', 'assistant'], uuid: str, session_id: str, message: Any, parent_tool_use_id: None = None) -> None; now def __init__(self, type: Literal['user', 'assistant'], uuid: str, session_id: str, message... pypi.org - Signature changed
claude_agent_sdk.SessionMessage.parent_tool_use_id
Was parent_tool_use_id: None; now parent_tool_use_id: str | None. pypi.org - Signature changed
claude_agent_sdk.tool
Was def tool(name: str, description: str, input_schema: type | dict[str, Any], annotations: ToolAnnotations | None = None) -> Callable[[Callable[[Any], Awaitable[dict[str, Any]]]], SdkMcpTool[Any]]; now def tool(name: str, description... pypi.org - Signature changed
claude_agent_sdk.types.ClaudeAgentOptions.__init__
Was def __init__(self, tools: list[str] | ToolsPreset | None = None, allowed_tools: list[str] = list(), system_prompt: str | SystemPromptPreset | SystemPromptFile | None = None, mcp_servers: dict[str, McpServerConfig] | str | Path =... pypi.org
And 2 more in this version. Sign up to see every change
claude-agent-sdk 0.2.137 breaking changes
- Signature changed
claude_agent_sdk.ClaudeAgentOptions.__init__
Was def __init__(self, tools: list[str] | ToolsPreset | None = None, allowed_tools: list[str] = list(), system_prompt: str | SystemPromptPreset | SystemPromptFile | None = None, mcp_servers: dict[str, McpServerConfig] | str | Path =... pypi.org - Signature changed
claude_agent_sdk.ResultMessage.__init__
Was def __init__(self, subtype: str, duration_ms: int, duration_api_ms: int, is_error: bool, num_turns: int, session_id: str, stop_reason: str | None = None, total_cost_usd: float | None = None, usage: dict[str, Any] | None = None, result... pypi.org - Signature changed
claude_agent_sdk.types.ClaudeAgentOptions.__init__
Was def __init__(self, tools: list[str] | ToolsPreset | None = None, allowed_tools: list[str] = list(), system_prompt: str | SystemPromptPreset | SystemPromptFile | None = None, mcp_servers: dict[str, McpServerConfig] | str | Path =... pypi.org - Signature changed
claude_agent_sdk.types.ResultMessage.__init__
Was def __init__(self, subtype: str, duration_ms: int, duration_api_ms: int, is_error: bool, num_turns: int, session_id: str, stop_reason: str | None = None, total_cost_usd: float | None = None, usage: dict[str, Any] | None = None, result... pypi.org - Signature changed
claude_agent_sdk.types.UserMessage.__init__
Was def __init__(self, content: str | list[ContentBlock], uuid: str | None = None, parent_tool_use_id: str | None = None, tool_use_result: dict[str, Any] | None = None) -> None; now def __init__(self, content: str | list[ContentBlock]... pypi.org - Signature changed
claude_agent_sdk.UserMessage.__init__
Was def __init__(self, content: str | list[ContentBlock], uuid: str | None = None, parent_tool_use_id: str | None = None, tool_use_result: dict[str, Any] | None = None) -> None; now def __init__(self, content: str | list[ContentBlock]... pypi.org - Signature changed
Message
The Message union now includes ConversationResetMessage, so code that exhaustively matches Message with assert_never must add a case for it. github.com
claude-agent-sdk 0.2.129 breaking changes
- Behavior changed
ClaudeAgentOptions.skills
Skill names containing parentheses, commas, control characters, wildcards, leading / or surrounding whitespace now raise ValueError at connect time. Replace skills=["plugin:*"] and skills=["*"] with skills="all" or a Skill(...) rule in... github.com
Older versions
3 older versions, each with its first changes. Sign up to see every change
Show 3 older versions
claude-agent-sdk 0.2.126 breaking changes
- Behavior changed
ResultMessage.model_usage
model_usage now holds ModelUsage TypedDict values rather than untyped dicts, so code that assumed the old untyped shape may need updating. github.com - Signature changed
claude_agent_sdk.ResultMessage.__init__
Was def __init__(self, subtype: str, duration_ms: int, duration_api_ms: int, is_error: bool, num_turns: int, session_id: str, stop_reason: str | None = None, total_cost_usd: float | None = None, usage: dict[str, Any] | None = None, result... pypi.org
And 3 more in this version.
claude-agent-sdk 0.2.124 breaking changes
- Behavior changed
The SDK now blocks launching .bat or .cmd CLI scripts on Windows, so setups that relied on the npm claude.cmd shim will stop working. Switch to the native installer, an explicit claude.exe path, or a platform wheel. github.com - Behavior changed
On Windows, resume and session_id values containing cmd.exe metacharacters or newlines now raise ValueError. Code that passed such values must sanitize them. github.com
claude-agent-sdk 0.2.82 breaking changes
- Removed
TodoWrite
Headless and SDK sessions now use the Task tools instead of TodoWrite. Tool consumers should accumulate tasks by task ID instead of replacing a snapshot list. github.com - Default changed
Sessions start immediately and slow servers report status pending in init until ready. Set MCP_CONNECTION_NONBLOCKING=0 to restore waiting up to 5s before the first query, or set alwaysLoad: true on a server to require it in turn 1. github.com
And 5 more in this version.
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.