---
title: "claude-agent-sdk 0.2.166 Breaking Changes on PyPI"
description: "What each claude-agent-sdk release removed, renamed or changed: 48 breaking changes in 9 versions on PyPI, each with its source."
canonical_url: https://since.dev/packages/pypi/claude-agent-sdk
last_updated: 2026-12-04
---

# claude-agent-sdk breaking changes

claude-agent-sdk 0.2.166 (October 14, 2026) is its newest release with breaking changes, 7 of them. The first: Removed claude_agent_sdk.SandboxIgnoreViolations.file. Every breaking API change we have recorded in claude-agent-sdk on PyPI: 48 breaking changes in 9 versions. Below, its 9 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `0.2.190`, released December 4, 2026. [Source repository](https://github.com/anthropics/claude-agent-sdk-python)

Packages on PyPI run on Python. [Python end of life dates](https://since.dev/calendar/python.md).

- From [0.2.82](#v-0-2-82) to [0.2.166](#v-0-2-166): 41 breaking changes in 8 versions.

## claude-agent-sdk 0.2.166 breaking changes

claude-agent-sdk 0.2.166, released October 14, 2026: 7 breaking changes.

- **Removed** `claude_agent_sdk.SandboxIgnoreViolations.file`  

SandboxIgnoreViolations.file was removed in claude-agent-sdk 0.2.166 [pypi.org](https://pypi.org/project/claude-agent-sdk/0.2.166/)
- **Removed** `claude_agent_sdk.SandboxIgnoreViolations.network`  

SandboxIgnoreViolations.network was removed in claude-agent-sdk 0.2.166 [pypi.org](https://pypi.org/project/claude-agent-sdk/0.2.166/)
- **Removed** `claude_agent_sdk.types.SandboxIgnoreViolations.file`  

SandboxIgnoreViolations.file was removed in claude-agent-sdk 0.2.166 [pypi.org](https://pypi.org/project/claude-agent-sdk/0.2.166/)
- **Removed** `claude_agent_sdk.types.SandboxIgnoreViolations.network`  

SandboxIgnoreViolations.network was removed in claude-agent-sdk 0.2.166 [pypi.org](https://pypi.org/project/claude-agent-sdk/0.2.166/)
- **Signature changed** `claude_agent_sdk.SandboxIgnoreViolations`  

Was class SandboxIgnoreViolations(TypedDict); now SandboxIgnoreViolations: TypeAlias. [pypi.org](https://pypi.org/project/claude-agent-sdk/0.2.166/)
- **Signature changed** `claude_agent_sdk.types.SandboxIgnoreViolations`  

Was class SandboxIgnoreViolations(TypedDict); now SandboxIgnoreViolations: TypeAlias. [pypi.org](https://pypi.org/project/claude-agent-sdk/0.2.166/)
- **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](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.166)

## claude-agent-sdk 0.2.158 breaking changes

claude-agent-sdk 0.2.158, released September 23, 2026: 2 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](https://pypi.org/project/claude-agent-sdk/0.2.158/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.158/)

## claude-agent-sdk 0.2.153 breaking changes

claude-agent-sdk 0.2.153, released September 15, 2026: 5 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](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.153)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.153/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.153/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.153/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.153/)

## claude-agent-sdk 0.2.140 breaking changes

claude-agent-sdk 0.2.140, released August 18, 2026: 12 breaking changes.

- **Removed** `claude_agent_sdk.client.HookEvent`  

claude_agent_sdk.client.HookEvent was removed in claude-agent-sdk 0.2.140 [pypi.org](https://pypi.org/project/claude-agent-sdk/0.2.140/)
- **Removed** `claude_agent_sdk.client.HookMatcher`  

claude_agent_sdk.client.HookMatcher was removed in claude-agent-sdk 0.2.140 [pypi.org](https://pypi.org/project/claude-agent-sdk/0.2.140/)
- **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](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.140)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.140/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.140/)
- **Signature changed** `claude_agent_sdk.SdkMcpTool.annotations`  

Was annotations: ToolAnnotations | None; now annotations: \_McpToolAnnotations | None. [pypi.org](https://pypi.org/project/claude-agent-sdk/0.2.140/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.140/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.140/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.140/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.140/)

And 2 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## claude-agent-sdk 0.2.137 breaking changes

claude-agent-sdk 0.2.137, released August 12, 2026: 7 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](https://pypi.org/project/claude-agent-sdk/0.2.137/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.137/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.137/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.137/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.137/)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.137/)
- **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](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.137)

## claude-agent-sdk 0.2.129 breaking changes

claude-agent-sdk 0.2.129, released August 4, 2026: 1 breaking change.

- **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](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.129)

## Older versions

3 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### claude-agent-sdk 0.2.126 breaking changes

claude-agent-sdk 0.2.126, released July 22, 2026: 5 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](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.126)
- **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](https://pypi.org/project/claude-agent-sdk/0.2.126/)

And 3 more in this version.

### claude-agent-sdk 0.2.124 breaking changes

claude-agent-sdk 0.2.124, released July 20, 2026: 2 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](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.124)
- **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](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.124)

### claude-agent-sdk 0.2.82 breaking changes

claude-agent-sdk 0.2.82, released May 15, 2026: 7 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](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.82)
- **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](https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.82)

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](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
