Agent SDK reference - TypeScript changedagent-sdk/typescript
Nearest release: v2.1.318, published 22 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 4 Nov 2026 20:00 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 4 Nov 2026 20:07 UTC.
Upstream edited
Recorded here
Lines+4added
Lines−1removed
From line
2,007
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits128to this page, all time
The whole hunk
from line 2007, 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 2007
20072007* A resume that Claude Code stops because it [can't return the session to its worktree](https://code.claude.com/docs/en/worktrees.md#the-session-resumes-outside-its-worktree), with `worktree_unverified` or `worktree_resume_refused`. That section says which error carries which value.
20082008* A refused [`continue`](#options) of a conversation that a background session holds, with `session_held_by_background`. For a refused [`resume`](#options) of such a conversation, Claude Code writes the result only when the variable is set.
20092009* A start that Claude Code refuses because [`failIfUnavailable`](#sandboxsettings) is on and the sandbox can't start, with `sandbox_required_unavailable`.
2010* A start that Claude Code refuses because `~/.claude.json` isn't valid JSON, with `config_file_invalid`.
20102011
20112012The `SDKStartupFailureReason` type lists the values `startup_failure_reason` can hold:
20122013
from line 2032
20312032 | "bypass_root"
20322033 | "org_config_required_unavailable"
20332034 | "org_config_refused"
2034 | "sandbox_required_unavailable";
2035 | "sandbox_required_unavailable"
2036 | "config_file_invalid";
20352037```
20362038
20372039Each value names one refusal:
from line 2060
20582060| `org_config_required_unavailable` | The session needs the organization's policies and managed settings before it can start, and they couldn't be loaded, for example because of a network failure or an Anthropic server error. Requires Agent SDK v0.3.293 or later |
20592061| `org_config_refused` | Anthropic refused to provide the organization's policies and managed settings for this sign-in, for example because the sign-in expired or was revoked, or the organization doesn't allow Claude Code for this account. Requires Agent SDK v0.3.293 or later |
20602062| `sandbox_required_unavailable` | [`failIfUnavailable`](#sandboxsettings) is on and the sandbox can't start. The text in `errors` ends with `Set sandbox.failIfUnavailable=false to allow unsandboxed execution.` Requires Agent SDK v0.3.314 or later |
2063| `config_file_invalid` | `~/.claude.json` isn't valid JSON. Claude Code leaves the file unchanged, so a retry fails the same way until someone repairs it. `errors` names the file and says how to restore or repair it. See [Configuration error in \~/.claude.json](https://code.claude.com/docs/en/errors.md#configuration-error-in-claude-json). Requires TypeScript Agent SDK v0.3.318 or later and Claude Code v2.1.318 or later |
20612064
20622065### `SDKSystemMessage`
20632066
from line 4777
47744777};
47754778```
47764779
4777Returns when the wake-up will fire as an epoch millisecond timestamp, the delay actually used, and whether the requested delay was clamped. The `stopped` field is `true` when the call ended the loop with `stop: true`. It requires Claude Code v2.1.202 or later. The `cancelledWakeups` field counts how many pending wakeups a `stop: true` call cancelled. A value of 0 means nothing was pending, and a recurring `/loop` cron isn't cancelled by `stop: true`. It requires Claude Code v2.1.206 or later.
4778
4779### RemoteTrigger
4780
4781**Tool name:** `RemoteTrigger`
4782
4783```typescript theme={null}
4784type RemoteTriggerOutput = {
4785 status: number;
4786 json: string;
4787 summary?: string;
4788};
4789```
4790
4791Returns the API response status and body for the trigger operation.
4792
4793### PushNotification
4794
4795**Tool name:** `PushNotification`
4796
4797```typescript theme={null}
4798type PushNoti
4780Returns when the wake-up will fire as an epoch millisecond timestamp, the delay actually used, and whether the requested delay was clamped. The `stopped` field is `true` when the call ended the loop with `stop: true`. It requires Claude Code v2.1.202 or later. The `cancelledW
No line in this hunk matches that.