Agent SDK reference - TypeScript changedagent-sdk/typescript
Nearest release: v2.1.293, published 2 hours 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 7 Oct 2026 20:07 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 7 Oct 2026 20:37 UTC.
Upstream edited
Recorded here
Lines+3added
Lines−0removed
From line
5,334
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits114to this page, all time
The whole hunk
from line 5334, 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 5334
53345334 tasks: {
53355335 task_id: string;
53365336 task_type: string;
5337 subagent_type?: string;
53375338 description: string;
53385339 ambient?: boolean;
53395340 }[];
from line 5343
53425343};
53435344```
53445345
5346`subagent_type` names the subagent type on entries whose [`task_type`](#sdktaskstartedmessage) is `"local_agent"`, such as `general-purpose` or a custom subagent's name. The field requires Agent SDK v0.3.293 or later.
5347
53455348### `SDKThinkingTokensMessage`
53465349
53475350Emitted while Claude is producing a thinking block, including a redacted one. `estimated_tokens` is a running estimate of the thinking tokens generated so far in the current block, and `estimated_tokens_delta` is the increment carried by this frame. Use these estimates for progress display.
from line 5375
53725375* `idle`: Claude Code is waiting for your next prompt.
53735376* `requires_action`: the session is blocked on an answer to a request it sent your host, such as a permission prompt.
53745377
5375A turn's `idle` message and its `result` message can arrive in either order. To change whether `idle` waits for background work such as a background subagent or a [workflow](/docs/en/workflows) run, see [`CLAUDE_CODE_BG_TASKS_REPORT_RUNNING`](/docs/en/env-vars#variables).
5376
5377```types
5378A turn's `idle` message and its `re
No line in this hunk matches that.