@anthropic-ai/claude-agent-sdk 0.3.299 → 0.3.301

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,53 +1,52 @@
1
1
  {
2
- "version": "2.1.299",
2
+ "version": "2.1.301",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "c416f56ec7eca27e49747c35af51d5c92c856ba1",
5
- "buildDate": "2026-10-13T22:05:00Z",
4
+ "commit": "12a1baed117fbcc7e0695ab8aa6d2a4c6bd00cbb",
5
+ "buildDate": "2026-10-15T14:01:03Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude",
9
- "checksum": "ba5ab7b8c195fa03ab8d5bf3915c76153b576a2c40e79a5c46e265e7ed9744b3",
10
- "size": 247931696
9
+ "checksum": "1f04c69e1c24e4d0a716a863af0aad8fc64d49a499334c29701f073700276b99",
10
+ "size": 250541840
11
11
  },
12
12
  "darwin-x64": {
13
13
  "binary": "claude",
14
- "checksum": "099dcc53dabbbefabed8926dab25b0318775c175a7c87bb6ba6c54fde9f8ece2",
15
- "size": 257765072
14
+ "checksum": "3439427bfce962fddcf557c5a058ca914fa63e06fee894f8e12a3f10e04d1871",
15
+ "size": 260406992
16
16
  },
17
17
  "linux-arm64": {
18
18
  "binary": "claude",
19
- "checksum": "4cd5ab006b49dc12a247fed4dbc42a925ad1aea1e711d9aa24587d285ee87c2f",
20
- "size": 264626168
19
+ "checksum": "1e119036a802d359ba5f9886428e031586e8796f7a858d5a8ee179ac7b8604f0",
20
+ "size": 267247608
21
21
  },
22
22
  "linux-x64": {
23
23
  "binary": "claude",
24
- "checksum": "2d894a4b1bfaaa9aab72aeff7803e3c73bc2510f279a171f6b8f59f72d17d077",
25
- "size": 265342136
24
+ "checksum": "bc1aad9982c7b59c7d889ff92595d61cf46e0a6eae074cb551d932a989bcd222",
25
+ "size": 267955384
26
26
  },
27
27
  "linux-arm64-musl": {
28
28
  "binary": "claude",
29
- "checksum": "3e90af8f81cf7db932bbda3ab2ba57facb1e2a19a43f911b70536bf627472757",
30
- "size": 256784472
29
+ "checksum": "d0a6b24d157d061cd5c406eb4b8f3d4016b646c8802b47babd3625c636e4433d",
30
+ "size": 259405912
31
31
  },
32
32
  "linux-x64-musl": {
33
33
  "binary": "claude",
34
- "checksum": "af9b922a7a018c69eb6de3a9d401b32b6cdfba3c01bf75a5edb6b477ef17f117",
35
- "size": 258953576
34
+ "checksum": "081a7219cf075e5c5d2a39796517ae2fa06610d99f3498e7ee5c577f0da687fa",
35
+ "size": 261566824
36
36
  },
37
37
  "win32-x64": {
38
38
  "binary": "claude.exe",
39
- "checksum": "295b49ec092f31a7de9c6ff286d9d8f120a4f029b9ad9a5ac0b12c35cbf4df2b",
40
- "size": 269231264
39
+ "checksum": "84d61feeb1a07e5a5b3354d68432591cac18a5d38a419a30d86d0f3ad8cba397",
40
+ "size": 271840416
41
41
  },
42
42
  "win32-arm64": {
43
43
  "binary": "claude.exe",
44
- "checksum": "a34fe98210ae38e55543e094036fea698db93bb4bba458c63d560b19ed2a56a2",
45
- "size": 255381152
44
+ "checksum": "20ec11897e18c156de0be6b35a54b709c503d0b61070c98ec34dd9102423a4a2",
45
+ "size": 257987744
46
46
  }
47
47
  },
48
48
  "sdkCompat": {
49
49
  "testedWrapperVersions": [
50
- "0.3.266",
51
50
  "0.3.267",
52
51
  "0.3.268",
53
52
  "0.3.269",
package/manifest.zst.json CHANGED
@@ -1,61 +1,60 @@
1
1
  {
2
- "version": "2.1.299",
2
+ "version": "2.1.301",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "c416f56ec7eca27e49747c35af51d5c92c856ba1",
5
- "buildDate": "2026-10-13T22:06:14Z",
4
+ "commit": "12a1baed117fbcc7e0695ab8aa6d2a4c6bd00cbb",
5
+ "buildDate": "2026-10-15T14:02:29Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude.zst",
9
- "checksum": "b510036268e62391c50f72c846319325958289283ee2dcc2b93c48f6f3c1d0ab",
10
- "size": 83064935,
9
+ "checksum": "499703a087a5395ed31e96e5cb19a6d3257cfeffbf812e5dba97347a33c84c5a",
10
+ "size": 83877124,
11
11
  "bundle": {
12
- "checksum": "4fa9694b79752a9a7e755eefa26978f0645aacfc39556267795fe45b6aa9f8fc",
13
- "size": 83068622
12
+ "checksum": "491300b6499480e9240856191ad45b750f2cd90d1c9d00e1d4d37ba15c7d2f41",
13
+ "size": 83879655
14
14
  }
15
15
  },
16
16
  "darwin-x64": {
17
17
  "binary": "claude.zst",
18
- "checksum": "47d60e863db060992020f1b6add9b1342cf1808248239e920fb29a7a136cd1f6",
19
- "size": 87828689,
18
+ "checksum": "157e1ad1310d96edcbadc7308debdec4cd5a40ea92b7e6e487ba88d056c3e934",
19
+ "size": 88633774,
20
20
  "bundle": {
21
- "checksum": "d55abe38f7972556711bb138728a10cd4e9544cbacf0ec95f13de063debdf17b",
22
- "size": 87803040
21
+ "checksum": "5a9d4ca1a59dadb842467cd863ceb8cfe453f28dea02557e7a909d4edf0b8dea",
22
+ "size": 88642019
23
23
  }
24
24
  },
25
25
  "linux-arm64": {
26
26
  "binary": "claude.zst",
27
- "checksum": "c9c8b11eb1d5bfad71820e6bf39254b75bd75c95f9e2921332526c60fcb32587",
28
- "size": 92333403
27
+ "checksum": "b94d6bca4549db066a3ffdbdb3d0f64083aa11d4557f672fd1eb77173b665d0f",
28
+ "size": 93160808
29
29
  },
30
30
  "linux-x64": {
31
31
  "binary": "claude.zst",
32
- "checksum": "20ca25213130255bacdcae3ed5df3fc99e1d8e86cdf46e9188b7ff9c1b478fa4",
33
- "size": 93164406
32
+ "checksum": "7121db492db6a44a756ae9581890613d914f78abba35cd57fa3bb4ed5e873e39",
33
+ "size": 93994767
34
34
  },
35
35
  "linux-arm64-musl": {
36
36
  "binary": "claude.zst",
37
- "checksum": "8aedb90a7351fba268cc3c4aaaa585d43def1a6076fcca37a37859fabc48a8ee",
38
- "size": 90689368
37
+ "checksum": "d60d859afeb94325c2603934b8e9514227d87c1802eb6021c1d572db7456a908",
38
+ "size": 91515582
39
39
  },
40
40
  "linux-x64-musl": {
41
41
  "binary": "claude.zst",
42
- "checksum": "61255662f269895254de0b696558d0132e992ab868d1ea185fe07217bfd6d985",
43
- "size": 91585340
42
+ "checksum": "8b131b3cb1d9dbf753edb003e66d49c91b2e58e0411906803694d8f4b1b9ede2",
43
+ "size": 92405915
44
44
  },
45
45
  "win32-x64": {
46
46
  "binary": "claude.exe.zst",
47
- "checksum": "f0584be0fbaf0853072de7b532e6c4078f5d2c38ea70a4c711032408a78edd8a",
48
- "size": 95700039
47
+ "checksum": "825816dcf3b81a989bfb8c931ed02485f3e2014fe954326710607f7af0f10c4d",
48
+ "size": 96514855
49
49
  },
50
50
  "win32-arm64": {
51
51
  "binary": "claude.exe.zst",
52
- "checksum": "e40a912906de9dff61624b5d36a66c65e32a67d1603cc8a0174d887721bf1fed",
53
- "size": 91644699
52
+ "checksum": "e85bee152b8e0e2216a97e3494708b66935e0279f05cc00ff32fea04a19cfe4a",
53
+ "size": 92454500
54
54
  }
55
55
  },
56
56
  "sdkCompat": {
57
57
  "testedWrapperVersions": [
58
- "0.3.266",
59
58
  "0.3.267",
60
59
  "0.3.268",
61
60
  "0.3.269",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.299",
3
+ "version": "0.3.301",
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.299",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.299",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.299",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.299",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.299",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.299",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.299",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.299"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.301",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.301",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.301",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.301",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.301",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.301",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.301",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.301"
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-x6a2shyd.mjs",
89
- "core-xcjrj654.mjs"
88
+ "core-6z7brxfa.mjs",
89
+ "core-x118ntbh.mjs"
90
90
  ],
91
- "claudeCodeVersion": "2.1.299"
91
+ "claudeCodeVersion": "2.1.301"
92
92
  }
package/sdk.d.ts CHANGED
@@ -204,6 +204,17 @@ export declare type BaseOutputFormat = {
204
204
  type: OutputFormatType;
205
205
  };
206
206
 
207
+ /**
208
+ * Names of built-in tools, as permission rules, hook matchers, `tools` and
209
+ * `disallowedTools` spell them. A name is listed even where a platform or
210
+ * setting turns its tool off. The list is not complete: the CLI has tools that
211
+ * are not on it, so it cannot stand for "every tool". What a session has is
212
+ * the `tools` field of its `system/init` message.
213
+ *
214
+ * @alpha
215
+ */
216
+ export declare const BUILTIN_TOOL_NAMES: readonly ['Agent', 'Artifact', 'AskUserQuestion', 'Bash', 'ClaudeDesign', 'CronCreate', 'CronDelete', 'CronList', 'Edit', 'EndConversation', 'EnterPlanMode', 'EnterWorktree', 'ExitPlanMode', 'ExitWorktree', 'Glob', 'Grep', 'ListAgents', 'ListMcpResourcesTool', 'LSP', 'Monitor', 'NotebookEdit', 'OfferChromeSetup', 'PowerShell', 'Projects', 'propose_skills', 'ProposeGoal', 'PushNotification', 'Read', 'ReadMcpResourceDirTool', 'ReadMcpResourceTool', 'ReadNotifications', 'RemoteTrigger', 'ReportFindings', 'ScheduleWakeup', 'SendFeedback', 'SendMessage', 'SendUserFile', 'SendUserMessage', 'ShareOnboardingGuide', 'ShowOnboardingRolePicker', 'Skill', 'SubagentHandback', 'TaskCreate', 'TaskGet', 'TaskList', 'TaskStop', 'TaskUpdate', 'TodoWrite', 'ToolSearch', 'WaitForMcpServers', 'WebFetch', 'WebSearch', 'Workflow', 'Write'];
217
+
207
218
  /**
208
219
  * Permission callback function for controlling tool usage.
209
220
  * Called before each tool execution to determine if it should be allowed.
@@ -1080,6 +1091,15 @@ export declare type JsonSchemaOutputFormat = {
1080
1091
  schema: Record<string, unknown>;
1081
1092
  };
1082
1093
 
1094
+ /**
1095
+ * Former names that permission rules, hook matchers, `tools` and
1096
+ * `disallowedTools` still accept, each mapped to the tool's current name. An
1097
+ * entry is dropped when its tool is removed.
1098
+ *
1099
+ * @alpha
1100
+ */
1101
+ export declare const LEGACY_TOOL_NAME_ALIASES: Readonly<Record<string, string>>;
1102
+
1083
1103
  /**
1084
1104
  * List sessions with metadata.
1085
1105
  *
@@ -1205,6 +1225,10 @@ export declare type McpSdkServerConfig = {
1205
1225
  */
1206
1226
  timeout?: number;
1207
1227
 
1228
+ /**
1229
+ * Per-tool permission policy the host declares for this server's tools (not the tool definitions passed to createSdkMcpServer). always_ask: the CLI asks the host (canUseTool or the permission prompt tool) before each call, even where an allow rule or allowedTools covers the tool, and under bypassPermissions outside a hosted remote session (CLAUDE_CODE_REMOTE); under dontAsk the call is denied; in auto mode the classifier decides, except that by default a tool annotated destructiveHint still asks. always_deny: calls are denied. always_allow and org_max_permission are ignored on sdk servers; grant allows with allowedTools or canUseTool. Read from initialize (sdkMcpServerConfigs) and from each mcp_set_servers entry that names the server. On the wire an entry without tools states no policy: on initialize the stored list and the rules stand; on mcp_set_servers the rules are replaced without them. The Agent SDK always re-sends the registered list. An entry whose policy is not one of the three asks; an entry without a string name is dropped and the rest apply; a value that is not a list reads as absent.
1230
+ */
1231
+ tools?: McpServerToolPolicy[];
1208
1232
  };
1209
1233
 
1210
1234
  /**
@@ -1281,7 +1305,7 @@ export declare type McpServerStatus = {
1281
1305
  openWorld?: boolean;
1282
1306
  };
1283
1307
  /**
1284
- * The MCP Apps (SEP-1865) members of the tool's `_meta`, for a host that renders the tool's `ui://` resource, under the keys the server used: `ui` (an object: `resourceUri`, a `ui://` string; `visibility`, an array of 'model' | 'app'; and any other member the server sent) and the deprecated flat `ui/resourceUri` (a `ui://` string). Validated and size-bounded; every other `_meta` key is withheld. Present only on a tool that declares one, from CLIs that advertise `mcp_tool_ui_meta_v1`.
1308
+ * The MCP Apps (SEP-1865) members of the tool's `_meta`, for a host that renders the tool's `ui://` resource, under the keys the server used: `ui` (an object: `resourceUri`, a `ui://` string; `visibility`, an array of 'model' | 'app'; and any other member the server sent) and the deprecated flat `ui/resourceUri` (a `ui://` string). Each is validated and size-bounded, and withheld if it fails. Of a `ui` that fails, only `visibility` still arrives: the 'model' and 'app' entries the server listed, or `[]` (neither audience) if `ui` is not an object or `visibility` not an array; `null` counts as absent. So a tool with no `visibility` declared none. A CLI that does not advertise `mcp_call_result_not_for_model_v1` may withhold a failed `ui` whole. Every other `_meta` key is withheld. Present only on a tool that declares one, from CLIs that advertise `mcp_tool_ui_meta_v1`.
1285
1309
  */
1286
1310
  _meta?: Record<string, unknown>;
1287
1311
  }[];
@@ -1291,7 +1315,7 @@ export declare type McpServerStatus = {
1291
1315
  export declare type McpServerStatusConfig = McpServerConfigForProcessTransport | McpClaudeAIProxyServerConfig;
1292
1316
 
1293
1317
  /**
1294
- * Per-tool permission policy carried on mcp_set_servers for remote servers.
1318
+ * Per-tool permission policy for an MCP server: carried on mcp_set_servers for remote (http/sse) servers, and on mcp_set_servers or initialize (sdkMcpServerConfigs) for host-registered sdk servers, where only always_ask and always_deny take effect.
1295
1319
  */
1296
1320
  export declare type McpServerToolPolicy = {
1297
1321
  name: string;
@@ -1433,6 +1457,7 @@ export declare type ModelInfo = {
1433
1457
  supportsAutoMode?: boolean;
1434
1458
 
1435
1459
 
1460
+
1436
1461
  };
1437
1462
 
1438
1463
  export declare type ModelUsage = {
@@ -3111,11 +3136,16 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
3111
3136
  * describing what applying would change; call again without the option
3112
3137
  * to apply anyway.
3113
3138
  *
3139
+ * With `addPlugins`, the reload also loads those plugins, as if each had
3140
+ * been in the `plugins` option at launch; plugins already loaded stay. Each
3141
+ * path must be absolute.
3142
+ *
3114
3143
  * @returns The refreshed session components after plugin reload, or the
3115
3144
  * unchanged ones with `held: true` when the reload was held
3116
3145
  */
3117
3146
  reloadPlugins(options?: {
3118
3147
  holdOnCacheImpact?: boolean;
3148
+ addPlugins?: SdkPluginConfig[];
3119
3149
  }): Promise<SDKControlReloadPluginsResponse>;
3120
3150
  /**
3121
3151
  * Reload skills from disk and return the refreshed skill list.
@@ -3641,6 +3671,7 @@ export declare type SDKAssistantMessage = {
3641
3671
 
3642
3672
  session_id: string;
3643
3673
  request_id?: string;
3674
+
3644
3675
  /**
3645
3676
  * Client uuid of the user message this turn is answering (submitMessage options.uuid), stamped on an assistant message each time that send changes — the turn's FIRST top-level assistant message (which may carry only a thinking block, or be a synthetic API-error message), and then, for a turn started by a synthetic (meta) prompt, the first assistant message after each queued user message folded in mid-turn (the fold takes the echo over); with --include-partial-messages the turn's first non-ping stream event is stamped too, independently (see SDKPartialAssistantMessage), so the same uuid may appear on both — either binds the reply to the send it answers without waiting for the result; the server keeps the first stamp it sees per uuid. A turn started by a typed prompt keeps that uuid for its whole turn, so it stamps once per frame kind. A meta turn's own uuid is stamped only when the host vouches it is the client event's own (on a hosted session, the uuid the session server persisted: delivered content such as a Slack owner ping, a Slack-bot observation or a client-injected synthetic turn), never for a prompt the CLI minted itself — except that a turn carrying resume_reason, such as the boot-time rescue turn re-running a turn a worker restart interrupted mid-way, stamps the interrupted turn's own last user prompt, the send it answers, where that can be vouched for (a turn that goes on from a permission answer or from in-flight tool calls may first re-send, unstamped, the assistant message that made those calls); either way a user message folded into a meta turn takes the echo over from it (the rescue turn absorbing messages sent while the session was down; a bot-observation turn absorbing a human's post), and the first reply frame of each kind after that fold carries the folded message's uuid — the first reply that message got. Wrapper-level sibling — never inside `message.content` — so it is not replayed to the model. Absent on every other frame of the turn, on subagent frames (parent_tool_use_id set), on turns that neither had a client uuid nor folded a user message in, and from older producers.
3646
3677
  */
@@ -4510,7 +4541,7 @@ declare type SDKControlInitializeRequest = {
4510
4541
  hooks?: Partial<Record<coreTypes.HookEvent, SDKHookCallbackMatcher[]>>;
4511
4542
  sdkMcpServers?: string[];
4512
4543
  /**
4513
- * Settings for the SDK-hosted MCP servers named in sdkMcpServers, keyed by server name. Sent as a separate field so a CLI that predates it ignores it; entries whose name is not in sdkMcpServers, and values that do not match this shape, are ignored rather than rejected. Applied when the server is first registered.
4544
+ * Settings for the SDK-hosted MCP servers named in sdkMcpServers, keyed by server name. Sent as a separate field so a CLI that predates it ignores it; entries whose name is not in sdkMcpServers, and values that do not match this shape, are ignored rather than rejected. timeout and disableAutoBackground apply when the server is first registered; tools (the per-tool permission policy) adds its ask and deny rules on every initialize that names the server. An initialize never removes a rule; mcp_set_servers replaces them.
4514
4545
  */
4515
4546
  sdkMcpServerConfigs?: Record<string, {
4516
4547
  /**
@@ -4518,6 +4549,10 @@ declare type SDKControlInitializeRequest = {
4518
4549
  */
4519
4550
  timeout?: number;
4520
4551
 
4552
+ /**
4553
+ * Per-tool permission policy the host declares for this server's tools (not the tool definitions passed to createSdkMcpServer). always_ask: the CLI asks the host (canUseTool or the permission prompt tool) before each call, even where an allow rule or allowedTools covers the tool, and under bypassPermissions outside a hosted remote session (CLAUDE_CODE_REMOTE); under dontAsk the call is denied; in auto mode the classifier decides, except that by default a tool annotated destructiveHint still asks. always_deny: calls are denied. always_allow and org_max_permission are ignored on sdk servers; grant allows with allowedTools or canUseTool. Read from initialize (sdkMcpServerConfigs) and from each mcp_set_servers entry that names the server. On the wire an entry without tools states no policy: on initialize the stored list and the rules stand; on mcp_set_servers the rules are replaced without them. The Agent SDK always re-sends the registered list. An entry whose policy is not one of the three asks; an entry without a string name is dropped and the rest apply; a value that is not a list reads as absent.
4554
+ */
4555
+ tools?: coreTypes.McpServerToolPolicy[];
4521
4556
  }>;
4522
4557
  /**
4523
4558
  * 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.
@@ -4702,7 +4737,7 @@ export declare type SDKControlListPermissionRulesResponse = {
4702
4737
  };
4703
4738
 
4704
4739
  /**
4705
- * Invokes an MCP tool via the subprocess MCP client without a model turn. No permission check (control channel is trusted, same as other subtypes). SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call. STAGED calls (input_files/output_files declared) additionally stage lane rows in/out around the call — see the input_files describe. Staged failures come back as a success-subtype response whose staging field carries a typed error_code; subtype:error is emitted only when the call could not be attempted at all (server not connected, kill switch, dispatch failure) and means nothing ran. A target server that is not yet connected is brought up on demand: dispatch runs the deferred plugin/MCP startup resolution (the work a first model turn would have done) and waits up to 30s — shortened by expires_at when that is sooner — for the server to connect before answering "MCP server not connected", so a dispatch that races plugin startup (e.g. after an idle-wake reattach) succeeds instead of failing until a turn runs. Standard RPC semantics: a redelivered request_id supersedes the in-flight run (it is aborted and its response suppressed — exactly one response per request_id); conversion is idempotent, so re-running is safe. Cancellable via control_cancel_request.
4740
+ * Invokes an MCP tool via the subprocess MCP client without a model turn. No permission check (control channel is trusted, same as other subtypes). SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls, unless result_not_for_model is set. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call. STAGED calls (input_files/output_files declared) additionally stage lane rows in/out around the call — see the input_files describe. Staged failures come back as a success-subtype response whose staging field carries a typed error_code; subtype:error is emitted only when the call could not be attempted at all (server not connected, kill switch, dispatch failure) and means nothing ran. A target server that is not yet connected is brought up on demand: dispatch runs the deferred plugin/MCP startup resolution (the work a first model turn would have done) and waits up to 30s — shortened by expires_at when that is sooner — for the server to connect before answering "MCP server not connected", so a dispatch that races plugin startup (e.g. after an idle-wake reattach) succeeds instead of failing until a turn runs. Standard RPC semantics: a redelivered request_id supersedes the in-flight run (it is aborted and its response suppressed — exactly one response per request_id); conversion is idempotent, so re-running is safe. Cancellable via control_cancel_request.
4706
4741
  */
4707
4742
  declare type SDKControlMcpCallRequest = {
4708
4743
  subtype: 'mcp_call';
@@ -4722,6 +4757,10 @@ declare type SDKControlMcpCallRequest = {
4722
4757
  * Tool-execution timeout (staging and collection have their own transport timeouts). Clamped to [1000, 600000]; default 120000. Sending timeout_ms routes the call through the staging engine — so it is always enforced when present and the response carries a staging result; omit it for a plain call. Staged calls are POSIX-worker-only: on a Windows worker any staged-field call fails with a typed staging refusal.
4723
4758
  */
4724
4759
  timeout_ms?: number;
4760
+ /**
4761
+ * The caller hands the result to a program (a host that renders it, a script), not to a model, and bounds it itself. content is then the server's own content blocks as MCP defines them (the MCP SDK drops members it does not define), not what a model turn would be handed: no image is resized or put in the Messages API's shape, nothing is saved under tool-results, no embedded resource is flattened, and text blocks beside structuredContent stay. They are untrusted third-party data: any mimeType, images neither re-encoded nor bounded in pixels, each block's annotations and _meta unfiltered. The size check that protects a model's context is skipped too: no count_tokens request (which uploads the result), no truncation, no note in place of the content. Instead a result over 10485760 characters (content with its base64, structuredContent and _meta together) fails though the tool ran: a plain call answers the error subtype, a staged call staging.error_code tool_error with the text in detail, before its outputs are collected. A legacy toolResult still comes back as a string. Does not route the call through the staging engine. Absent or false: as before. Honoured only for a host on this process's own pipes, not over a remote transport nor on a lane that redacts what it persists. Feature-detected as `mcp_call_result_not_for_model_v1` in system/init.capabilities and in the initialize response's capabilities; where it is not said, and by a CLI without it, the member is ignored.
4762
+ */
4763
+ result_not_for_model?: boolean;
4725
4764
  /**
4726
4765
  * Declaring input_files or output_files makes this a STAGED call: rows are fetched from the synced-file lane into a private per-request temp dir the WORKER chooses (random, per-UID — the caller never sees or computes paths; it references files via tokens in arguments), the tool runs, and declared outputs are written back as lane rows (durable-at-ack PUT). The response then carries a `staging` result the caller switches on.
4727
4766
  */
@@ -4853,6 +4892,9 @@ declare type SDKControlPermissionRequest = {
4853
4892
 
4854
4893
 
4855
4894
 
4895
+
4896
+
4897
+
4856
4898
  /**
4857
4899
  * Set when a safetyCheck is present anywhere in the decision reason (including nested inside subcommandResults for compound bash). false = at least one safety check requires manual approval (e.g. Windows path bypass, dangerous rm); true = all safety checks MAY be classifier-approved (e.g. sensitive-file paths). Absent when no safetyCheck is involved.
4858
4900
  */
@@ -4971,6 +5013,10 @@ declare type SDKControlReloadPluginsRequest = {
4971
5013
  * When true, the reload is not applied if applying it would change the session's tool list while the conversation's prompt cache depends on that list (the same check the interactive /reload-plugins makes before it asks for --force): the response then carries held: true and cache_impact, and the session keeps its current plugins. Default false: apply unconditionally.
4972
5014
  */
4973
5015
  hold_on_cache_impact?: boolean;
5016
+ /**
5017
+ * Plugins for the reload to load as well, in the same shape as the SDK `plugins` option: each entry joins the session as one more --plugin-dir would (--plugin-dir-no-mcp when skipMcpDiscovery is set). Plugins already loaded stay; nothing is removed. A held or failed reload adds none of them. Refused for a malformed list or a path that is not absolute, when managed settings set disableSideloadFlags, on a connection whose frames persist server-side (any Remote Control or cloud worker), in a cloud-hosted session, and when a running sandbox cannot keep shell commands out of the folders (always on Windows).
5018
+ */
5019
+ add_plugins?: coreTypes.SdkPluginConfig[];
4974
5020
  };
4975
5021
 
4976
5022
  /**
@@ -5154,6 +5200,7 @@ declare type SDKControlSetPermissionModeRequest = {
5154
5200
  */
5155
5201
  mode: coreTypes.PermissionMode;
5156
5202
 
5203
+
5157
5204
  };
5158
5205
 
5159
5206
  /**
@@ -5434,6 +5481,7 @@ export declare type SDKMessageOrigin = {
5434
5481
 
5435
5482
 
5436
5483
 
5484
+
5437
5485
  } | {
5438
5486
  kind: 'task-notification';
5439
5487
  /**
@@ -5449,6 +5497,7 @@ export declare type SDKMessageOrigin = {
5449
5497
  * On a background task's own notification: the run_id its task_* events carried, as of when the notification was queued. Not part of the text the model reads.
5450
5498
  */
5451
5499
  runId?: string;
5500
+
5452
5501
  } | {
5453
5502
  kind: 'coordinator';
5454
5503
  } | {
@@ -6079,6 +6128,9 @@ export declare type SDKSystemMessage = {
6079
6128
 
6080
6129
 
6081
6130
 
6131
+
6132
+
6133
+
6082
6134
  uuid: UUID;
6083
6135
  session_id: string;
6084
6136
  };
@@ -6406,6 +6458,7 @@ export declare type SDKUserMessage = {
6406
6458
 
6407
6459
 
6408
6460
 
6461
+
6409
6462
  uuid?: UUID;
6410
6463
  /**
6411
6464
  * Content the user pasted into the prompt rather than typed: each entry a string or an array of content blocks. The CLI appends the text of each entry after the typed text, in order, and may wrap it in `<pasted_content>` tags. Blocks other than text are ignored; send images and documents in `message.content`. A list of over 1,000 entries and blocks in all is ignored.
@@ -6500,6 +6553,7 @@ export declare type SDKUserMessageReplay = {
6500
6553
 
6501
6554
 
6502
6555
 
6556
+
6503
6557
  uuid: UUID;
6504
6558
  session_id: string;
6505
6559
  isReplay: true;