Agent SDK reference - TypeScript changedagent-sdk/typescript
Nearest release: v2.1.299, published an hour before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 14 Oct 2026 01:57 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 14 Oct 2026 02:07 UTC.
Upstream edited
Recorded here
Lines+14added
Lines−4removed
From line
802
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits113to this page, all time
The whole hunk
from line 802, old and new numbered
/
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
from line 802
802802 | "malformed"
803803 | "not_honoured"
804804 >;
805 claude_code_version?: string;
805806};
806807```
807808
from line 817
816817
817818The request's `sdkMcpServerManifests` field and the response's `sdk_mcp_manifests_parked` field are for the in-process [SDK MCP servers](/docs/en/agent-sdk/custom-tools) you created with [`createSdkMcpServer()`](#createsdkmcpserver). Your application doesn't set or read either field.
818819
820`claude_code_version` is the Claude Code version of the process that runs the session's turns. It is the same value the [`SDKSystemMessage`](#sdksystemmessage) init message carries, so you can read the CLI version before the first turn.
821
822* The field requires Agent SDK v0.3.296 or later, which bundles Claude Code v2.1.296.
823* If the field is `undefined` and you set `pathToClaudeCodeExecutable`, point it at Claude Code v2.1.296 or later.
824
819825The response always reports `fast_mode_state`, and when something blocks [fast mode](/docs/en/fast-mode), `fast_mode_disabled_reason` carries the reason code alongside it, so you can explain the blocked state instead of re-deriving availability. Both behaviors require Claude Code v2.1.219 or later. Before v2.1.219, the response omitted `fast_mode_state` when fast mode wasn't available and never carried a reason. For the reason codes and their meanings, see [`fast_mode_disabled_reason`](#sdkresultmessage) on the result message.
820826
821827The control-response wrapper for a successful `initialize` also carries a `pending_permission_requests` array. The field is on the response wrapper itself, not in the `SDKControlInitializeResponse` payload above. Each entry is a complete `control_request` message with the same `{ type: "control_request", request_id, request }` shape the session streams for permission requests while running.
from line 3144
31383144 offset?: number;
31393145 limit?: number;
31403146 pages?: string;
3147 allow_large?: boolean;
31413148};
31423149```
31433150
3144Reads files from the local filesystem, including text, images, PDFs, and Jupyter notebooks. Use `pages` for PDF page ranges (for example, `"1-5"`).
3151Reads files from the local filesystem, including text, images, PDFs, and Jupyter notebooks.
31453152
3153* Use `pages` for PDF page ranges (for example, `"1-5"`).
3154* `allow_large` lets Claude read a text file past the [usual size limits](/docs/en/tools-reference#large-files) when the session's context window has room. It requires Agent SDK v0.3.296 or later, which bundles Claude Code v2.1.296.
3155
31463156For a PDF, Claude receives the file's contents inside the Read call's `tool_result` content. A read that returns the `pdf` [output](#tool-output-types) carries a summary `text` block followed by a `document` block. One that returns the `parts` output carries the summary `text` block followed by one block per extracted page: an `image` block, or a `text` block naming the page when Claude Code couldn't render it as an image. Before Agent SDK v0.3.242, Claude Code delivered the file's contents as a separate `user` message after the tool result.
31473157
31483158### Write
from line 5276
52665276type SDKToolUseSummaryMessage = {
52675277 type: "tool_use_summary";
52685278 summary: string;
5269 preceding_tool_use_ids: string[];
5270 uuid: UUID;
5271 session_id: string;
5272};
5273```
5274
5275### `SDKHookStartedMessage`
5276
5277Emitted when a hook begins executing.
5278
5279Claude Code delivers this message, [`SDKHookProgressMessage`](#sdkhookprogressmessage), and [`SDKHookResponseMessage`](#sdkhookresponsemessage) to the message stream immediately, including while a `SessionStart` or `Setup` hook is still running during session startup. Claude Code v2.1.169 through v2.1.203 delivered these messages in one batch after a `SessionStart` or `Setup` hook completed; v2.1.204 restored live delivery.
5280
5281```typescript theme={null}
5282type SDKHookStartedMessage = {
5283 type: "system";
5284 subtype: "hook_started";
5285 hook_id: string;
5286 hook_name: string;
5287 hook_event: string;
5288 uuid: UUID;
5289 sess
5279 preceding_tool_use_ids: str
No line in this hunk matches that.