Sweep 22 Sep 2026 · 15:52Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
Reading a new release v2.1.280 Building the pages · 4/6 1043 findings $36.88 so far
One change · claude-code

Agent SDK reference - Python changed

agent-sdk/python

Nearest release: v2.1.274, published 2 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+21added
Lines−2removed
From line 749 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits28to this page, all time

### `SystemPromptCustom`

The whole hunk

from line 749, old and new numbered
/
lines
from line 749
749749class ClaudeAgentOptions:
750750 tools: list[str] | ToolsPreset | None = None
751751 allowed_tools: list[str] = field(default_factory=list)
752 system_prompt: str | SystemPromptPreset | SystemPromptFile | None = None
752 system_prompt: str | SystemPromptPreset | SystemPromptCustom | SystemPromptFile | None = None
753753 mcp_servers: dict[str, McpServerConfig] | str | Path = field(default_factory=dict)
754754 strict_mcp_config: bool = False
755755 permission_mode: PermissionMode | None = None
from line 801
801801| :---------------------------- | :------------------------------------------------------------------------------------ | :--------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
802802| `tools` | `list[str] \| ToolsPreset \| None` | `None` | Tools configuration. Use `{"type": "preset", "preset": "claude_code"}` for Claude Code's default tools |
803803| `allowed_tools` | `list[str]` | `[]` | Tools to auto-approve without prompting. This does not restrict Claude to only these tools. If you name one of the [task-tracking tools](/docs/en/agent-sdk/todo-tracking#model-availability) here, Claude Code also opts the session in. Other unlisted tools fall through to `permission_mode` and `can_use_tool`. Use `disallowed_tools` to block tools. See [Permissions](/docs/en/agent-sdk/permissions#allow-and-deny-rules) |
804| `system_prompt` | `str \| SystemPromptPreset \| SystemPromptFile \| None` | `None` | System prompt configuration. Pass a string for a custom prompt, `{"type": "preset", "preset": "claude_code"}` for Claude Code's system prompt with optional `"append"`, or `{"type": "file", "path": "..."}` to load a large prompt from disk. See [`SystemPromptPreset`](#systempromptpreset) and [`SystemPromptFile`](#systempromptfile) |
804| `system_prompt` | `str \| SystemPromptPreset \| SystemPromptCustom \| SystemPromptFile \| None` | `None` | System prompt configuration. Pass a string for a custom prompt, `{"type": "preset", "preset": "claude_code"}` for Claude Code's system prompt with optional `"append"`, `{"type": "custom", "prompt": "..."}` for a custom prompt that can also set `"snapshot"`, or `{"type": "file", "path": "..."}` to load a large prompt from disk. See [`SystemPromptPreset`](#systempromptpreset), [`SystemPromptCustom`](#systempromptcustom), and [`SystemPromptFile`](#systempromptfile) |
805805| `mcp_servers` | `dict[str, McpServerConfig] \| str \| Path` | `{}` | MCP server configurations or path to config file |
806806| `strict_mcp_config` | `bool` | `False` | When `True`, use only the servers passed in `mcp_servers` and ignore project `.mcp.json`, user settings, plugin-provided MCP servers, and [claude.ai connectors](/docs/en/mcp#use-mcp-servers-from-claude-ai). Maps to the CLI `--strict-mcp-config` flag |
807807| `permission_mode` | `PermissionMode \| None` | `None` | Permission mode for tool usage |
from line 900
900900 preset: Literal["claude_code"]
901901 append: NotRequired[str]
902902 exclude_dynamic_sections: NotRequired[bool]
903 snapshot: NotRequired[bool]
903904```
904905 
905906| Field | Required | Description |
from line 909
908909| `preset` | Yes | Must be `"claude_code"` to use Claude Code's system prompt |
909910| `append` | No | Additional instructions to append to the preset system prompt |
910911| `exclude_dynamic_sections` | No | Move per-session context such as working directory, the git-repo flag, and auto memory paths from the system prompt into the first user message. Improves prompt-cache reuse across users and machines. See [Modify system prompts](/docs/en/agent-sdk/modifying-system-prompts#improve-prompt-caching-across-users-and-machines) |
912| `snapshot` | No | Set to `False` to rebuild the system prompt on every request instead of [reusing the prompt the session recorded on its first request](/docs/en/agent-sdk/modifying-system-prompts#change-the-prompt-of-an-existing-session). Requires `claude-agent-sdk` v0.2.153 or later |
913 
914### `SystemPromptCustom`
915 
916A custom system prompt in object form, equivalent to passing a string as `system_prompt`, that can also set `snapshot`. Requires `claude-agent-sdk` v0.2.153 or later.
917 
918```python theme={null}
919class SystemPromptCustom(TypedDict):
920 type: Literal["custom"]
921 prompt: str
922 snapshot: NotRequired[bool]
923```
924 
925| Field | Required | Description |
926| :--------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------- |
927| `type` | Yes | Must be `"custom"` |
928| `prompt` | Yes | The system prompt text. Passed to the CLI as a command-line argument, so the [command-line length limits](#systempromptfile) apply |
929| `snapshot` | No | Same as [`SystemPromptPreset.snapshot`](#systempromptpreset), applied to `prompt` |
911930 
912931### `SystemPromptFile`
913932