Agent SDK reference - TypeScript changedagent-sdk/typescript
Nearest release: v2.1.295, 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 8 Oct 2026 19:27 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 8 Oct 2026 19:37 UTC.
Upstream edited
Recorded here
Lines+5added
Lines−1removed
From line
1,715
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits90to this page, all time
The whole hunk
from line 1715, 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 1715
17151715 | "worktree_resume_refused"
17161716 | "worktree_unverified"
17171717 | "cli_version_too_old"
1718 | "bypass_root";
1718 | "bypass_root"
1719 | "org_config_required_unavailable"
1720 | "org_config_refused";
17191721```
17201722
17211723Each value names one refusal:
from line 1741
17391741| `worktree_unverified` | The session's worktree couldn't be verified right now, and retrying may succeed |
17401742| `cli_version_too_old` | This Claude Code version is below the minimum Anthropic requires |
17411743| `bypass_root` | Bypass permissions mode was requested while running as root |
1744| `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 |
1745| `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 |
17421746
17431747### `SDKSystemMessage`
17441748
from line 5369
53655369};
53665370```
53675371
5368### `SDKSessionStateChangedMessage`
5369
5370Emitted when Claude Code reports the session's state. To receive these messages, set [`CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS=1`](/docs/en/env-vars#variables). Claude Code can report the same state more than once, so read a message as the session's current state rather than as a transition.
5371
5372The `state` field carries one of these values:
5373
5374* `running`: the session is working.
5375* `idle`: Claude Code is waiting for your next prompt.
5376* `requires_action`: the session is blocked on an answer to a request it sent your host, such as a permission prompt.
5377
5378A turn's `idle` message and its `re
5372### `SDKSession
No line in this hunk matches that.