Agent SDK reference - TypeScript changedagent-sdk/typescript
Nearest release: v2.1.335, published an hour after 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 2 Dec 2026 20:52 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 2 Dec 2026 21:07 UTC.
Upstream edited
Recorded here
Lines+4added
Lines−4removed
From line
1,093
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits157to this page, all time
The whole hunk
from line 1093, 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 1093
10931093
10941094`totalTokens` is the session's current context usage, and `maxTokens` is the window that usage is measured against. That window is the model's context window, or the lower auto-compaction window when one applies. `rawMaxTokens` carries the same value as `maxTokens`, and `percentage` is `totalTokens` as a rounded percentage of that window. `apiUsage` holds the usage from the latest API response, not a running total for the session.
10951095
1096Claude Code leaves the optional `deferredBuiltinTools`, `systemTools`, and `systemPromptSections` diagnostics unset, so expect them to be absent even though the type declares them.
1096The optional `deferredBuiltinTools`, `systemTools`, and `systemPromptSections` fields are absent from the response.
10971097
10981098#### Find a row by ID, a server's instruction tokens, or an entry's plugin and file
10991099
from line 4620
46204620| Field | Type | Description |
46214621| - | - | - |
46224622| `status` | `"async_launched" \| "remote_launched"` | The tool accepted the invocation. `"async_launched"` for in-process runs, `"remote_launched"` for runs dispatched to a cloud session instead of running in-process |
4623| `taskId` | `string` | Background task ident
4623| `taskId` | `string` | Background task identifier for the run |
4624| `taskType` | `"local_workflow" \| "remote_a
No line in this hunk matches that.