@anthropic-ai/claude-agent-sdk 0.3.285 → 0.3.287

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/manifest.json CHANGED
@@ -1,55 +1,53 @@
1
1
  {
2
- "version": "2.1.285",
2
+ "version": "2.1.287",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "afb212976052ab038df25d5e871f6c049e094d3b",
5
- "modsCommit": "dec92bc87ab6fe9c7be0fcba1f97966f902dd243",
6
- "buildDate": "2026-09-29T01:45:50Z",
4
+ "commit": "3c446a1b98aceb99a6cdee0f84a8bea42f4a8937",
5
+ "modsCommit": "6160717d8994f236ab381cf534fc1cde5347c12f",
6
+ "buildDate": "2026-10-01T16:26:16Z",
7
7
  "platforms": {
8
8
  "darwin-arm64": {
9
9
  "binary": "claude",
10
- "checksum": "51f09bd1e021d9fa8a1864c179799bd37cb39962a937935c5cf6823398e86db4",
11
- "size": 223821616
10
+ "checksum": "6eab8333fe2121553100d8f40bfada384a3e989b94f947e18ba6677a6fcb41ea",
11
+ "size": 227827120
12
12
  },
13
13
  "darwin-x64": {
14
14
  "binary": "claude",
15
- "checksum": "24835f7ca4b4338c33ad21c98a3402d9c22f89b8055075d18828e97973844ec3",
16
- "size": 232253440
15
+ "checksum": "f1863213e4f55aaadc2e6ee617f934ada29930e5de4c5e5f8f9e34a0d594fdd7",
16
+ "size": 236282368
17
17
  },
18
18
  "linux-arm64": {
19
19
  "binary": "claude",
20
- "checksum": "24fac77749bed3d91365d6b6915aa4b824e14318ecb6bc17adbc192f01c9173d",
21
- "size": 239722488
20
+ "checksum": "e4daf793d1e74fb0d9874dd09e98690bbfd7be515f78a87fd05b9e2b4bb33b03",
21
+ "size": 243720184
22
22
  },
23
23
  "linux-x64": {
24
24
  "binary": "claude",
25
- "checksum": "33dad1ec615a2e08cc78b494f05c110e49916de2c79d78ec8799ebf46b233d29",
26
- "size": 240327864
25
+ "checksum": "3920489a5109cff5786a1a392c25277408ff22bc796d5edb9c16a60e5a1718f0",
26
+ "size": 244317368
27
27
  },
28
28
  "linux-arm64-musl": {
29
29
  "binary": "claude",
30
- "checksum": "31efc4136bc678575f4c6730e248d34f89dbfea0468be1c5d012af199cd62ee8",
31
- "size": 232077120
30
+ "checksum": "83d95a9fa28b1fadd8c012fda873aed8f8998e23dfabe6dd4efd05bcdd7383ba",
31
+ "size": 236009280
32
32
  },
33
33
  "linux-x64-musl": {
34
34
  "binary": "claude",
35
- "checksum": "7b4414af1bc06eb6d91730759bd01c4c02a4976d0b8526237e9a6d8c33eaf102",
36
- "size": 234078296
35
+ "checksum": "ba22ce4b5744c6016e3076ccbd692a059fc4e9f1592f21361859a73938f4e722",
36
+ "size": 238063704
37
37
  },
38
38
  "win32-x64": {
39
39
  "binary": "claude.exe",
40
- "checksum": "121fc8151ed40bd9c144d68aa1cea23427803628ffab65e23da1cceda155697e",
41
- "size": 243751072
40
+ "checksum": "6d5be51f0edfe3429cd1a9885950db31c1e59eb9a2c9a30a47e64179d2ff98b4",
41
+ "size": 247736480
42
42
  },
43
43
  "win32-arm64": {
44
44
  "binary": "claude.exe",
45
- "checksum": "0865d6bdeec16e2d523dce329c3c73f2c3d7675b804e679c0fc3b477651b1059",
46
- "size": 231275168
45
+ "checksum": "11438981154e99af8f9aeabe193871c92b8b550b35354686a140fc056f1bfe54",
46
+ "size": 235259040
47
47
  }
48
48
  },
49
49
  "sdkCompat": {
50
50
  "testedWrapperVersions": [
51
- "0.3.245",
52
- "0.3.246",
53
51
  "0.3.247",
54
52
  "0.3.248",
55
53
  "0.3.250",
@@ -77,7 +75,8 @@
77
75
  "0.3.278",
78
76
  "0.3.280",
79
77
  "0.3.281",
80
- "0.3.282"
78
+ "0.3.282",
79
+ "0.3.285"
81
80
  ],
82
81
  "harnessSchema": 1
83
82
  }
package/manifest.zst.json CHANGED
@@ -1,63 +1,61 @@
1
1
  {
2
- "version": "2.1.285",
2
+ "version": "2.1.287",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "afb212976052ab038df25d5e871f6c049e094d3b",
5
- "modsCommit": "dec92bc87ab6fe9c7be0fcba1f97966f902dd243",
6
- "buildDate": "2026-09-29T01:46:59Z",
4
+ "commit": "3c446a1b98aceb99a6cdee0f84a8bea42f4a8937",
5
+ "modsCommit": "6160717d8994f236ab381cf534fc1cde5347c12f",
6
+ "buildDate": "2026-10-01T16:27:39Z",
7
7
  "platforms": {
8
8
  "darwin-arm64": {
9
9
  "binary": "claude.zst",
10
- "checksum": "37ef7ca4ef6486c44b8f88b41af4f269ba8322c7dd8a62261e54e3271f56a6a0",
11
- "size": 74510936,
10
+ "checksum": "2701dac04e02acbea7d7584fc35e04adddf6f24021d321e3ba7eb95994edcf96",
11
+ "size": 75949326,
12
12
  "bundle": {
13
- "checksum": "c793e6a936a0afe77ee4b0b36abb463e7a54c696cf6f27ef3aa10e2ead33f806",
14
- "size": 74521855
13
+ "checksum": "8939dd3a906fd909614c651595ba3636e5620cb1aafcf99d3d5ecd9b6b86c693",
14
+ "size": 75962691
15
15
  }
16
16
  },
17
17
  "darwin-x64": {
18
18
  "binary": "claude.zst",
19
- "checksum": "cd31b4ba8368bac728fdf75de6654df8f47d2023cd3cd16da49b429ae4d24648",
20
- "size": 78669066,
19
+ "checksum": "e4c6177a49a726d1a65dadf2fb08cdde0232a37a60017668246ab9246fcf11ad",
20
+ "size": 80136583,
21
21
  "bundle": {
22
- "checksum": "59130413242ea7f3290ac59919cf9586473d8bc9837fc4928c204ae30b83cc12",
23
- "size": 78670967
22
+ "checksum": "dc23e02cbacb6762d4033998e76e182459e7a539ea698eebe267207563def62d",
23
+ "size": 80141664
24
24
  }
25
25
  },
26
26
  "linux-arm64": {
27
27
  "binary": "claude.zst",
28
- "checksum": "df8bb286ad870d8db316fc6c8b34932598c1127d14f739d1fc995610204eb4d2",
29
- "size": 83619189
28
+ "checksum": "f95d466d03381abe9effcbcfe8408704262eb8861af3a1fc20b8e0563c1f770b",
29
+ "size": 85057873
30
30
  },
31
31
  "linux-x64": {
32
32
  "binary": "claude.zst",
33
- "checksum": "e88a8b40ed5a7e9213bf5047f5b12c360c33387b1bc36cf79ddbff0a3a40121c",
34
- "size": 84348572
33
+ "checksum": "add364007462fe694a95aa68c78bdf7a71b1ddf687f80dda603f58cc80cde574",
34
+ "size": 85795355
35
35
  },
36
36
  "linux-arm64-musl": {
37
37
  "binary": "claude.zst",
38
- "checksum": "1e86f455cbd30439ec4a4a38768e2d84e5be327827e2ec7f5c9c87b04b8f53ab",
39
- "size": 82026156
38
+ "checksum": "b277e35a54c5c3f891791276b1b5ca8959ab89c45e2123906f26c3b0c489c80a",
39
+ "size": 83460752
40
40
  },
41
41
  "linux-x64-musl": {
42
42
  "binary": "claude.zst",
43
- "checksum": "c436b04d973f0db928dd2321f34206de90a48e6a23aa486a6b69e5cac574d5b1",
44
- "size": 82790392
43
+ "checksum": "43f30b92560d69d1942dc7e9e4772a9c24f99cda2d71a1dc46b6033398d47a01",
44
+ "size": 84231480
45
45
  },
46
46
  "win32-x64": {
47
47
  "binary": "claude.exe.zst",
48
- "checksum": "5004d3bee5263ee011dcffcc28c837e40989808301f0b8bf64c3aa3d9b0ab8f1",
49
- "size": 86659568
48
+ "checksum": "0d03949c88db791ddee203b61c1cfbd69bf84214facc17dcfcd0c0987f6c27de",
49
+ "size": 88089498
50
50
  },
51
51
  "win32-arm64": {
52
52
  "binary": "claude.exe.zst",
53
- "checksum": "7067da6d07b9d78d2a75ae40f53c5764066953a853b83b8c1053dc35a9a6b323",
54
- "size": 82994951
53
+ "checksum": "bd8a2ec0abb532aea9e4f6a70177193cd7e06e4f4803d63fe75ac15442160dca",
54
+ "size": 84412071
55
55
  }
56
56
  },
57
57
  "sdkCompat": {
58
58
  "testedWrapperVersions": [
59
- "0.3.245",
60
- "0.3.246",
61
59
  "0.3.247",
62
60
  "0.3.248",
63
61
  "0.3.250",
@@ -85,7 +83,8 @@
85
83
  "0.3.278",
86
84
  "0.3.280",
87
85
  "0.3.281",
88
- "0.3.282"
86
+ "0.3.282",
87
+ "0.3.285"
89
88
  ],
90
89
  "harnessSchema": 1
91
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.285",
3
+ "version": "0.3.287",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -61,14 +61,14 @@
61
61
  "zod": "^4.0.0"
62
62
  },
63
63
  "optionalDependencies": {
64
- "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.285",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.285",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.285",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.285",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.285",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.285",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.285",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.285"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.287",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.287",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.287",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.287",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.287",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.287",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.287",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.287"
72
72
  },
73
73
  "files": [
74
74
  "sdk.mjs",
@@ -85,8 +85,8 @@
85
85
  "extractFromBunfs.d.ts",
86
86
  "manifest.json",
87
87
  "manifest.zst.json",
88
- "core-rf2bg9hj.mjs",
89
- "core-w2yya30y.mjs"
88
+ "core-kgfyd2t2.mjs",
89
+ "core-q38rzykt.mjs"
90
90
  ],
91
- "claudeCodeVersion": "2.1.285"
91
+ "claudeCodeVersion": "2.1.287"
92
92
  }
package/sdk.d.ts CHANGED
@@ -604,6 +604,11 @@ declare namespace coreTypes {
604
604
  * Tool calls are bounded by the MCP tool-call timeout — `options.timeout`
605
605
  * (ms) for this server, else the MCP_TOOL_TIMEOUT env var, effectively
606
606
  * unbounded by default.
607
+ *
608
+ * A tool in `options.tools` whose input schema cannot be converted to JSON
609
+ * Schema is left out of the server's tool list, with one warning naming it (a
610
+ * process warning with code CLAUDE_SDK_MCP_TOOL_SCHEMA_UNCONVERTIBLE, or
611
+ * console.warn where there is no process.emitWarning); its other tools load.
607
612
  */
608
613
  export declare function createSdkMcpServer(_options: CreateSdkMcpServerOptions): McpSdkServerConfigWithInstance;
609
614
 
@@ -1179,7 +1184,7 @@ export declare type McpHttpServerConfig = {
1179
1184
  timeout?: number;
1180
1185
 
1181
1186
  /**
1182
- * When true, all tools from this server are always included in the prompt and never deferred behind tool search, except a tool the server itself lists with _meta anthropic/alwaysLoad set to false. Equivalent to setting defer_loading: false on the API. Default: tools are deferred when tool search is enabled. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1187
+ * When true, all tools from this server are always included in the prompt and never deferred behind tool search, except a tool the server itself lists with _meta anthropic/alwaysLoad set to false. Equivalent to setting defer_loading: false on the API. When false, all tools from this server are deferred behind tool search. Default: tools are deferred when tool search is enabled. As a side effect, true also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1183
1188
  */
1184
1189
  alwaysLoad?: boolean;
1185
1190
 
@@ -1318,7 +1323,7 @@ export declare type McpSSEServerConfig = {
1318
1323
  timeout?: number;
1319
1324
 
1320
1325
  /**
1321
- * When true, all tools from this server are always included in the prompt and never deferred behind tool search, except a tool the server itself lists with _meta anthropic/alwaysLoad set to false. Equivalent to setting defer_loading: false on the API. Default: tools are deferred when tool search is enabled. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1326
+ * When true, all tools from this server are always included in the prompt and never deferred behind tool search, except a tool the server itself lists with _meta anthropic/alwaysLoad set to false. Equivalent to setting defer_loading: false on the API. When false, all tools from this server are deferred behind tool search. Default: tools are deferred when tool search is enabled. As a side effect, true also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1322
1327
  */
1323
1328
  alwaysLoad?: boolean;
1324
1329
 
@@ -1334,7 +1339,7 @@ export declare type McpStdioServerConfig = {
1334
1339
  */
1335
1340
  timeout?: number;
1336
1341
  /**
1337
- * When true, all tools from this server are always included in the prompt and never deferred behind tool search, except a tool the server itself lists with _meta anthropic/alwaysLoad set to false. Equivalent to setting defer_loading: false on the API. Default: tools are deferred when tool search is enabled. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1342
+ * When true, all tools from this server are always included in the prompt and never deferred behind tool search, except a tool the server itself lists with _meta anthropic/alwaysLoad set to false. Equivalent to setting defer_loading: false on the API. When false, all tools from this server are deferred behind tool search. Default: tools are deferred when tool search is enabled. As a side effect, true also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1338
1343
  */
1339
1344
  alwaysLoad?: boolean;
1340
1345
 
@@ -1971,12 +1976,18 @@ export declare type Options = {
1971
1976
  */
1972
1977
  pathToClaudeCodeExecutable?: string;
1973
1978
  /**
1974
- * Permission mode for the session.
1979
+ * Permission mode for the session. When omitted, Claude Code picks the
1980
+ * starting mode as it does for `claude -p`: a `permissions.defaultMode`
1981
+ * from the settings the session loads, else `'auto'` where that is the
1982
+ * default (and `'default'` where auto mode is unavailable). Pass
1983
+ * `'default'` to keep manual approvals through `canUseTool` (on a cloud
1984
+ * create or attach, `'default'` leaves the session's own mode).
1975
1985
  * - `'default'` - Standard permission behavior, prompts for dangerous operations
1976
1986
  * - `'acceptEdits'` - Auto-accept file edit operations
1977
1987
  * - `'bypassPermissions'` - Bypass all permission checks (requires `allowDangerouslySkipPermissions`)
1978
1988
  * - `'plan'` - Planning mode, no execution of tools
1979
1989
  * - `'dontAsk'` - Don't prompt for permissions, deny if not pre-approved
1990
+ * - `'auto'` - A model classifier approves or denies each call, prompting through `canUseTool` when it cannot decide
1980
1991
  */
1981
1992
  permissionMode?: PermissionMode;
1982
1993
  /**
@@ -3642,6 +3653,7 @@ export declare type SDKAssistantMessage = {
3642
3653
 
3643
3654
 
3644
3655
 
3656
+
3645
3657
  /**
3646
3658
  * ISO timestamp of when this content block finished on the originating process. One API assistant turn may produce several assistant messages sharing a message.id, each with its own timestamp. Uses the originating host's clock, so it's for display only; do not order messages by this field. Older emitters omit it; consumers should fall back to receive time.
3647
3659
  */
@@ -4191,6 +4203,35 @@ declare type SDKControlGetSettingsRequest = {
4191
4203
  subtype: 'get_settings';
4192
4204
  };
4193
4205
 
4206
+ /**
4207
+ * Reads the end of one background shell or Monitor task's output: at most the last 8 KiB the command wrote, the same tail the terminal's /tasks detail view reads. Read-only and no model turn; a host polls it while the task runs, and can read it once more after the task ends. The output is whatever the command printed, escape sequences included: render it as plain text. Refused for a task_id that is neither a shell or Monitor task of this session nor shaped like one (an ended task's id whose file is gone reads as empty), and on a lane that redacts what it persists (a Remote Control bridge worker, a tenant worker).
4208
+ */
4209
+ declare type SDKControlGetTaskOutputRequest = {
4210
+ subtype: 'get_task_output';
4211
+ /**
4212
+ * A shell or Monitor task of this session, running or ended: the task_id from task_started or background_tasks_changed.
4213
+ */
4214
+ task_id: string;
4215
+ };
4216
+
4217
+ /**
4218
+ * Success payload answering get_task_output.
4219
+ */
4220
+ declare type SDKControlGetTaskOutputResponse = {
4221
+ /**
4222
+ * The end of the output, decoded as UTF-8; empty when the command has written nothing yet.
4223
+ */
4224
+ output: string;
4225
+ /**
4226
+ * The size of the whole output in bytes.
4227
+ */
4228
+ total_bytes: number;
4229
+ /**
4230
+ * Whether output holds only the end of a longer output (the last 8 KiB).
4231
+ */
4232
+ truncated: boolean;
4233
+ };
4234
+
4194
4235
  /**
4195
4236
  * Requests the structured /usage data: session cost/usage totals plus claude.ai plan rate-limit utilization when available. Experimental — the response shape may change.
4196
4237
  */
@@ -4432,7 +4473,7 @@ declare type SDKControlInitializeRequest = {
4432
4473
  timeout?: number;
4433
4474
  }>;
4434
4475
  /**
4435
- * Optional, keyed by sdk server name (each key should also appear in sdkMcpServers; other keys are ignored). Unlike sdkMcpServerConfigs — host-declared settings the CLI keeps for the server's lifetime, same shape inline on mcp_set_servers — this is a one-shot cache of the servers' own handshake output: sent on initialize only, consumed by the connect that follows it, never retained. MCP handshake results the host already obtained from its in-process servers by delivering initialize + notifications/initialized (+ tools/list) to them itself before writing this request. For each such server the CLI answers its own MCP client's initialize and first tools/list from these results and skips the notifications/initialized round trip, so registering N in-process servers costs no mcp_message control round trips before the first turn; tools/call and everything after the handshake still flow as mcp_message exactly as before. The host MUST keep answering mcp_message for every server as if this field were absent: a CLI that predates the field ignores it and performs the full per-server handshake over the control channel, and a newer CLI does the same for any server whose entry is missing or malformed, whose initializeResult.protocolVersion differs from the MCP protocol version the CLI's client requests, or that the CLI had already connected. Entries apply only to the connect that follows this initialize; they are never retained for later reconnects. Absent (older hosts, the Python SDK, browser clients): unchanged behaviour.
4476
+ * Optional, keyed by sdk server name (each key should also appear in sdkMcpServers; other keys are ignored). Unlike sdkMcpServerConfigs — host-declared settings the CLI keeps for the server's lifetime, same shape inline on mcp_set_servers — this is a one-shot cache of the servers' own handshake output: sent on initialize only, consumed by the connect that follows it, never retained. MCP handshake results the host already obtained from its in-process servers by delivering initialize + notifications/initialized (+ tools/list) to them itself before writing this request. For each such server the CLI answers its own MCP client's initialize and first tools/list from these results and skips the notifications/initialized round trip, so registering N in-process servers costs no mcp_message control round trips before the first turn; tools/call and everything after the handshake still flow as mcp_message exactly as before. The host MUST keep answering mcp_message for every server as if this field were absent: a CLI that predates the field ignores it and performs the full per-server handshake over the control channel, and a newer CLI does the same for any server whose entry is missing or malformed, whose initializeResult.protocolVersion differs from the MCP protocol version the CLI's client requests, or that the CLI had already connected. Entries apply only to the connect that follows this initialize; they are never retained for later reconnects. Over a remote session transport the CLI uses the field only when sdkMcpServerManifestsOrigin is set (see that field); a host on the CLI's own stream-json stdio transport needs no marker. sdk_mcp_manifests_parked in the response reports what became of each entry. Absent (older hosts, the Python SDK, browser clients): unchanged behaviour.
4436
4477
  */
4437
4478
  sdkMcpServerManifests?: Record<string, {
4438
4479
  /**
@@ -4444,6 +4485,10 @@ declare type SDKControlInitializeRequest = {
4444
4485
  */
4445
4486
  toolsListResult?: Record<string, unknown>;
4446
4487
  }>;
4488
+ /**
4489
+ * The host's statement that it composed this request's sdkMcpServerManifests for this very send, from its servers' current state. Needed only by a host that reaches the CLI over a remote session transport, where an unmarked sdkMcpServerManifests is not used (a recorded registration could be handed to a later worker). The CLI also refuses a marked manifest whose session-stream frame is more than five minutes old, so capture the manifests when writing the request, not earlier; and it may still decline them when remote manifests are switched off in that CLI, or on any session where the session service has not told the CLI in the last five minutes that only the account owning the session can send events to it. sdk_mcp_manifests_parked in the response says what became of each entry. A value this CLI does not know counts as no marker. A host on the CLI's own stream-json stdio transport may omit this field; a host writing to the stdin of a remote-session worker cannot use manifests at all.
4490
+ */
4491
+ sdkMcpServerManifestsOrigin?: 'host_per_send';
4447
4492
  jsonSchema?: Record<string, unknown>;
4448
4493
  systemPrompt?: string[];
4449
4494
  appendSystemPrompt?: string;
@@ -4523,6 +4568,10 @@ export declare type SDKControlInitializeResponse = {
4523
4568
  */
4524
4569
  plugins_applied?: boolean;
4525
4570
 
4571
+ /**
4572
+ * What became of each entry of this initialize's sdkMcpServerManifests, keyed by sdk server name, for the entries whose name is in sdkMcpServers. 'parked': kept for the connect that follows this reply, which answers the server's MCP initialize and first tools/list from it (a later failure to replay shows up as live mcp_message frames, as when no entry was sent). 'already_connected': this CLI already had a live client for the server. 'protocol_version_mismatch': initializeResult.protocolVersion is not the version this CLI's client requests. 'malformed': the entry is not of the documented shape, reported whether or not manifests were honoured (every name in sdkMcpServers gets this when the field itself is not an object). 'not_honoured': the CLI did not use the entry: manifests or remote manifests are switched off in this CLI, the session service has not told this remote-session worker in the last five minutes that only the account owning the session can send events to it, or the request reached such a worker other than over its session stream (nothing for the host to change in any of these cases); or it came over the session stream without sdkMcpServerManifestsOrigin or on a frame too old to trust (the host's to fix). Absent when the request carried no sdkMcpServerManifests or named no sdkMcpServers, and on CLIs that predate the field.
4573
+ */
4574
+ sdk_mcp_manifests_parked?: Record<string, 'parked' | 'already_connected' | 'protocol_version_mismatch' | 'malformed' | 'not_honoured'>;
4526
4575
 
4527
4576
 
4528
4577
 
@@ -4539,6 +4588,7 @@ export declare type SDKControlInitializeResponse = {
4539
4588
 
4540
4589
 
4541
4590
 
4591
+
4542
4592
  };
4543
4593
 
4544
4594
  /**
@@ -4551,6 +4601,8 @@ declare type SDKControlInterruptRequest = {
4551
4601
  * When true, the interrupt also cancels every uuid-stamped main-thread command still in the queue or already dequeued for the imminent turn but not yet reachable by the abort (the first-command prewait window) — the same set the response would otherwise list under `still_queued`. Each is closed with a terminal 'cancelled' lifecycle and listed on the response's `cancelled` field. `still_queued` is then empty, except that a client driving a hosted session lists there what it can no longer recall (a send already in flight to that session, or the first prompt the session was created with) and, when the session's own sweep then cancels one of those or a send it had already delivered, follows up with a command_lifecycle 'cancelled' frame for it. (The isFoldInFlight guard cancel_async_message uses does not apply here: this request also aborts the running turn, so a fold-in-flight uuid is never delivered and is swept with the rest. A fold-in-flight uuid's queued_command attachment may already appear in the aborted turn's transcript if the abort landed after the fold's attachment yield — pre-existing leave-queued semantics; it never runs as its own turn.) Uuid-less commands (task notifications) still in the queue are also dequeued but cannot be listed; a uuid-less command already in the prewait window is unreachable by either cancel leg — the first-command prewait latch covers it (this request latches exactly like a plain interrupt; see still_queued): its turn starts aborted. When false or absent, queued commands survive the interrupt and are listed under `still_queued` — the interrupt_receipt_v1 contract is unchanged. A Stop-means-stop-everything client (a remote UI's Stop button) sets this true so one round-trip halts the session; a wrapper that wants per-uuid control leaves it false and follows up with cancel_async_message. Advertised by the `interrupt_cancel_queued_v1` capability on system/init; older CLIs ignore the field and behave as if false.
4552
4602
  */
4553
4603
  cancel_queued?: boolean;
4604
+
4605
+
4554
4606
  };
4555
4607
 
4556
4608
  /**
@@ -4561,6 +4613,7 @@ export declare type SDKControlInterruptResponse = {
4561
4613
  * Uuids of async user messages that survive this interrupt: commands still in the queue, plus any batch already dequeued for the imminent turn but not yet reachable by the abort. An interrupt — plain or cancel_queued:true — that lands during the FIRST-command prewait window (before the first turn of the session has armed a controller) is additionally LATCHED, scoped to the user-intent work pending at that instant — the batch already dequeued and parked for the imminent turn, plus the user-intent main-thread commands then in the queue (the work this list enumerates): the first turn to arm that carries any of that doomed work starts already aborted, exactly once, so the listed prewait batch is delivered into an immediately-aborted turn, its frames and result flowing through the normal abort path, instead of running to completion. A turn carrying none of it arms live and leaves the latch waiting: a system delivery turn (for example a replayed host event), or a prompt enqueued after the interrupt — post-interrupt work is never coalesced with the doomed work and never dies to the latch, so the Stop kills exactly what this receipt listed. The latch is released when the doomed work is retired without arming: if a parked prewait batch is entirely cancelled, the latch is released even when other queued commands remain (those arm and run normally); with nothing parked, it is released once none of the doomed commands remains queued — work enqueued after the interrupt neither holds it up nor is aborted by it. Survivors that ride any later turn run normally. These WILL run (subject to that latch) unless cancelled first (or unless the request set cancel_queued:true, in which case every uuid-stamped survivor this process holds is removed, emitted a terminal `cancelled` synchronously, and listed under `cancelled` instead — leaving here only what a client driving a hosted session can no longer recall: a send already in flight to that session, or the first prompt the session was created with; a send that client still holds on its own machine behind a send gate (it waits there until that session is ready to take it) has not gone out, so it is withdrawn and listed under `cancelled` like a queued one, and cancel_async_message can withdraw it too, while a plain interrupt leaves it held and lists it here). Cancellation granularity: uuids still in the queue are individually cancellable via cancel_async_message; once a batch is dequeued and coalesced into one turn, cancelling a NON-representative member uuid is a no-op (its content still runs), while cancelling the batch-representative uuid drops the WHOLE coalesced batch — in both cases the cancel response reports cancelled:false because the message was no longer in the queue. Coverage caveats: only uuid-STAMPED messages appear (a message enqueued without a uuid still runs but is never listed, so [] does not mean "nothing will run"); only main-thread messages are listed (subagent-addressed messages are out of scope); and the list may include internally-enqueued uuids the client never sent (cron triggers, auto-resume continuations) — ignore unknown uuids rather than treating them as an error. Ordering: on a clean interrupt this receipt is written before the interrupted turn result; a turn that crashes during interrupt handling emits its error result on a direct-write path that may precede the receipt. Snapshot is taken synchronously with abort processing — probing the queue after the interrupted result instead always loses the race against the drain loop, which starts the next queued turn immediately.
4562
4614
  */
4563
4615
  still_queued: string[];
4616
+
4564
4617
  /**
4565
4618
  * Present only when the request set cancel_queued:true — uuids of main-thread commands cancelled by this interrupt: every survivor that would otherwise have appeared under `still_queued`, including any uuid that was mid-fold at the interrupt instant (this request also aborts, so the fold never delivers it). Each listed uuid has been removed (queue-resident) or marked cancel-pending (the first-command prewait window, closed by the drain loop's backstop) and emits a terminal 'cancelled' lifecycle synchronously at the first such interrupt (a repeat interrupt over the same parked batch re-lists the uuid idempotently without re-emitting); none will run. Same coverage caveats as `still_queued` (uuid-stamped main-thread only; internally-enqueued uuids may appear). Advertised by the `interrupt_cancel_queued_v1` capability.
4566
4619
  */
@@ -4932,7 +4985,7 @@ export declare type SDKControlRequest = {
4932
4985
 
4933
4986
  };
4934
4987
 
4935
- declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlSetColorRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKControlGetSessionCostRequest | SDKControlListModelsRequest | SDKControlGetUsageRequest | SDKControlGetBinaryVersionRequest | SDKControlMcpCallRequest | SDKControlFileSuggestionsRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlReadFileRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlRegisterRepoRootRequest | SDKControlReloadPluginsRequest | SDKControlReloadSkillsRequest | SDKControlReloadOutputStylesRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlStopTaskRequest | SDKControlBackgroundTasksRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlGetHooksListingRequest | SDKControlUpdateSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest | SDKControlListPermissionRulesRequest | SDKControlMcpReadResourceRequest;
4988
+ declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlSetColorRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKControlGetSessionCostRequest | SDKControlListModelsRequest | SDKControlGetUsageRequest | SDKControlGetBinaryVersionRequest | SDKControlMcpCallRequest | SDKControlFileSuggestionsRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlReadFileRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlRegisterRepoRootRequest | SDKControlReloadPluginsRequest | SDKControlReloadSkillsRequest | SDKControlReloadOutputStylesRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlStopTaskRequest | SDKControlBackgroundTasksRequest | SDKControlGetTaskOutputRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlGetHooksListingRequest | SDKControlUpdateSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest | SDKControlListPermissionRulesRequest | SDKControlMcpReadResourceRequest;
4936
4989
 
4937
4990
  /**
4938
4991
  * Progress for a long-running client-originated control_request (currently only side_question), correlated by request_id. status 'started' means the worker accepted the request and launched the work; 'api_retry' carries the same retry counters as SDKAPIRetryMessage and is present only for that status.
@@ -5007,7 +5060,7 @@ declare type SDKControlSetColorRequest = {
5007
5060
  };
5008
5061
 
5009
5062
  /**
5010
- * Sets the maximum number of thinking tokens for extended thinking. When max_thinking_tokens is null, thinking resets to the session default: any mid-session budget override is cleared (back to the spawn-time budget, if one was set), and thinking stays off for sessions that have it disabled. When max_thinking_tokens is omitted, the budget is left as it is, so a request that only changes thinking_display can leave the field out. thinking_display optionally sets the thinking display mode for the rest of the session: a value replaces the session display mode, null clears that override so Claude Code's default display handling applies again, and when omitted the display mode from session start (--thinking-display) is kept. 'highlights' returns one short title per stretch of thinking instead of a prose summary. The API accepts it only from Claude Code sessions that Anthropic hosts; if the API rejects it, the session sends 'omitted' (no thinking text) in its place from then on. A request for 'highlights' gets an error reply after such a rejection, on Amazon Bedrock, Google Vertex AI or another provider without Anthropic's first-party beta features, when experimental betas are off (CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS or organization policy), or on a Claude 3 model (except on Microsoft Foundry). The error names which of these it was; the display stays as it was, and max_thinking_tokens still applies when the request has it.
5063
+ * Sets the maximum number of thinking tokens for extended thinking. When max_thinking_tokens is null, thinking resets to the session default: any mid-session budget override is cleared (back to the spawn-time budget, if one was set), and thinking stays off for sessions that have it disabled. When max_thinking_tokens is omitted, the budget is left as it is, so a request that only changes thinking_display can leave the field out. thinking_display optionally sets the thinking display mode for the rest of the session: a value replaces the session display mode, null clears that override so Claude Code's default display handling applies again, and when omitted the display mode from session start (--thinking-display) is kept. 'highlights' returns one short title per stretch of thinking instead of a prose summary. The API accepts it only from Claude Code sessions that Anthropic hosts; if the API rejects it, the session sends 'omitted' (no thinking text) in its place from then on. A request for 'highlights' gets an error reply after such a rejection, on Amazon Bedrock, Google Vertex AI or another provider to which Claude Code sends no first-party-only beta features, when experimental betas are off (CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS or organization policy), or on a Claude 3 model (except on Microsoft Foundry). The error names which of these it was; the display stays as it was, and max_thinking_tokens still applies when the request has it.
5011
5064
  */
5012
5065
  declare type SDKControlSetMaxThinkingTokensRequest = {
5013
5066
  subtype: 'set_max_thinking_tokens';
@@ -5682,11 +5735,14 @@ export declare type SDKResultSuccess = {
5682
5735
 
5683
5736
 
5684
5737
 
5738
+
5685
5739
  user_message_uuid?: string;
5686
5740
  user_message_uuids?: string[];
5687
5741
  resume_reason?: string;
5688
5742
  local_command?: string;
5689
5743
  request_sent_wall_ms?: number;
5744
+
5745
+
5690
5746
  first_content_frame_ms?: number;
5691
5747
  first_stream_post_ms?: number;
5692
5748
  first_stream_post_ack_ms?: number;
@@ -5700,6 +5756,8 @@ export declare type SDKResultSuccess = {
5700
5756
 
5701
5757
 
5702
5758
  first_text_post_ms?: number;
5759
+ first_text_post_queue_wait_ms?: number;
5760
+ first_text_post_queued_behind?: 'durable_post' | 'ephemeral_post' | 'retry_backoff' | 'hold' | 'none';
5703
5761
  first_text_post_wall_ms?: number;
5704
5762
  time_to_request_from_spawn_ms?: number;
5705
5763
  warm_spare_claimed?: boolean;
@@ -6164,7 +6222,7 @@ export declare type SDKUserMessage = {
6164
6222
  parent_tool_use_id: string | null;
6165
6223
  isSynthetic?: boolean;
6166
6224
  /**
6167
- * Structured tool output — the tool's full Output object, not the string content sent to the model. The shape is per-tool, keyed by the matching tool_use block's name (see the *Output types in toolTypes); MCP and dynamic tools carry their own shapes, so the field stays unknown-typed. For the Agent/Task tool the completed shape is the subagent's final report without the model-directed agentId/usage trailer, plus run totals — render from it instead of parsing the tool_result text.
6225
+ * Structured tool output — the tool's full Output object, not the string content sent to the model. The shape is per-tool, keyed by the matching tool_use block's name (see the *Output types in toolTypes); MCP and dynamic tools carry their own shapes, so the field stays unknown-typed. For the Agent/Task tool the completed shape is the subagent's final report without the model-directed agentId/usage trailer, plus run totals — render from it instead of parsing the tool_result text. A call that stepped aside for a message the user sent (today a WebFetch or WebSearch call) carries `{ detachedToolCall: true }` in place of its Output: the call is still running, and its result reaches the model in a later turn.
6168
6226
  */
6169
6227
  tool_use_result?: unknown;
6170
6228
  priority?: 'now' | 'next' | 'later';
@@ -6193,6 +6251,7 @@ export declare type SDKUserMessage = {
6193
6251
 
6194
6252
 
6195
6253
 
6254
+
6196
6255
 
6197
6256
 
6198
6257
  /**
@@ -6252,7 +6311,7 @@ export declare type SDKUserMessageReplay = {
6252
6311
  parent_tool_use_id: string | null;
6253
6312
  isSynthetic?: boolean;
6254
6313
  /**
6255
- * Structured tool output — the tool's full Output object, not the string content sent to the model. The shape is per-tool, keyed by the matching tool_use block's name (see the *Output types in toolTypes); MCP and dynamic tools carry their own shapes, so the field stays unknown-typed. For the Agent/Task tool the completed shape is the subagent's final report without the model-directed agentId/usage trailer, plus run totals — render from it instead of parsing the tool_result text.
6314
+ * Structured tool output — the tool's full Output object, not the string content sent to the model. The shape is per-tool, keyed by the matching tool_use block's name (see the *Output types in toolTypes); MCP and dynamic tools carry their own shapes, so the field stays unknown-typed. For the Agent/Task tool the completed shape is the subagent's final report without the model-directed agentId/usage trailer, plus run totals — render from it instead of parsing the tool_result text. A call that stepped aside for a message the user sent (today a WebFetch or WebSearch call) carries `{ detachedToolCall: true }` in place of its Output: the call is still running, and its result reaches the model in a later turn.
6256
6315
  */
6257
6316
  tool_use_result?: unknown;
6258
6317
  priority?: 'now' | 'next' | 'later';
@@ -6281,6 +6340,7 @@ export declare type SDKUserMessageReplay = {
6281
6340
 
6282
6341
 
6283
6342
 
6343
+
6284
6344
 
6285
6345
 
6286
6346
  /**
@@ -7451,7 +7511,7 @@ export declare interface Settings {
7451
7511
  */
7452
7512
  url: string;
7453
7513
  /**
7454
- * Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.
7514
+ * Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Checked out sparsely — over https or ssh as a partial clone (--filter=tree:0) — to minimize bandwidth for monorepos.
7455
7515
  */
7456
7516
  path: string;
7457
7517
  /**
@@ -7703,7 +7763,7 @@ export declare interface Settings {
7703
7763
  */
7704
7764
  url: string;
7705
7765
  /**
7706
- * Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.
7766
+ * Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Checked out sparsely — over https or ssh as a partial clone (--filter=tree:0) — to minimize bandwidth for monorepos.
7707
7767
  */
7708
7768
  path: string;
7709
7769
  /**
@@ -7950,7 +8010,7 @@ export declare interface Settings {
7950
8010
  */
7951
8011
  url: string;
7952
8012
  /**
7953
- * Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.
8013
+ * Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Checked out sparsely — over https or ssh as a partial clone (--filter=tree:0) — to minimize bandwidth for monorepos.
7954
8014
  */
7955
8015
  path: string;
7956
8016
  /**
@@ -8187,7 +8247,7 @@ export declare interface Settings {
8187
8247
  */
8188
8248
  url: string;
8189
8249
  /**
8190
- * Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.
8250
+ * Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Checked out sparsely — over https or ssh as a partial clone (--filter=tree:0) — to minimize bandwidth for monorepos.
8191
8251
  */
8192
8252
  path: string;
8193
8253
  /**
@@ -8424,7 +8484,7 @@ export declare interface Settings {
8424
8484
  */
8425
8485
  url: string;
8426
8486
  /**
8427
- * Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.
8487
+ * Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Checked out sparsely — over https or ssh as a partial clone (--filter=tree:0) — to minimize bandwidth for monorepos.
8428
8488
  */
8429
8489
  path: string;
8430
8490
  /**