@anthropic-ai/claude-agent-sdk 0.3.267 → 0.3.268

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.267",
2
+ "version": "2.1.268",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "a9e1808c8204fef901336d54bac7d4ab442955cb",
5
- "buildDate": "2026-09-09T17:39:36Z",
4
+ "commit": "8d19e585f3f1e02a7e31642695321906d38609a3",
5
+ "buildDate": "2026-09-10T17:38:45Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude",
9
- "checksum": "a681f3008f0050029aeebcab3af51bb6a55ddeb625a3af3141a4416d43cd2558",
10
- "size": 200489184
9
+ "checksum": "06a96d5423f83770f120859f1c58e60d7252cc4c122aa13043b7e7cd716bc76a",
10
+ "size": 202081536
11
11
  },
12
12
  "darwin-x64": {
13
13
  "binary": "claude",
14
- "checksum": "071988cb2e5a4378d8543d78e0ff5f8ed1ecc5e113271774a0582ee74fb0ef79",
15
- "size": 209165280
14
+ "checksum": "f94c0d5ab0ab79f28e8dc9129ae7c980c2c1af65f3ea67ee6e9256bed3da67e9",
15
+ "size": 210766944
16
16
  },
17
17
  "linux-arm64": {
18
18
  "binary": "claude",
19
- "checksum": "226a4e009574044a18bf5495f127806b2a1bfcbf25b3c01608705fafee95fefb",
20
- "size": 216718760
19
+ "checksum": "116fd031f939ef1e09edf170d62c489e1cc28ed6bfbda49f948773ba168c8f62",
20
+ "size": 218291624
21
21
  },
22
22
  "linux-x64": {
23
23
  "binary": "claude",
24
- "checksum": "0399c793ff571d5946ef923d80b4f330d05ac4b6842a6b0775468f5d389403c0",
25
- "size": 217013744
24
+ "checksum": "9691a2b7bd796712ca8cffb8e32e54ff7fc45b662540233171a16a94a0425653",
25
+ "size": 218602992
26
26
  },
27
27
  "linux-arm64-musl": {
28
28
  "binary": "claude",
29
- "checksum": "2aa337b3610742cdc9ed5dc5123d0ac41094849235182a5e6f2b7956da7ccaa5",
30
- "size": 209663640
29
+ "checksum": "a1cb086b8b65ff5e2068eb764d2aff7c8a48f914df4741dd9bdb2d3aa5db971b",
30
+ "size": 211236504
31
31
  },
32
32
  "linux-x64-musl": {
33
33
  "binary": "claude",
34
- "checksum": "3c336039170511e6592be624097e95eb9e85be0ecf96f78b331907497512c401",
35
- "size": 211034064
34
+ "checksum": "1e9b0013268c023266438653eb4beac34d71311a451a9f45988e5f176fdf2e24",
35
+ "size": 212623312
36
36
  },
37
37
  "win32-x64": {
38
38
  "binary": "claude.exe",
39
- "checksum": "23dde2a47cf1d7d9c4a2d96d21fa80ea9bfc872dfde0ee06e9982d2908603350",
40
- "size": 220051616
39
+ "checksum": "1e472bcfd49449e73ef76698c87f6583055aeb88dc41ca190a9c12c6791b5eea",
40
+ "size": 221637792
41
41
  },
42
42
  "win32-arm64": {
43
43
  "binary": "claude.exe",
44
- "checksum": "0dc306259e3036af4255f66b77451d3f7297bcd376bfae20f7b42e2fa1473607",
45
- "size": 211294368
44
+ "checksum": "30f0dbc7f1520ff0af1a2eb0167e11f09363a49f5dfd2f719ccd95e05809112c",
45
+ "size": 212880032
46
46
  }
47
47
  },
48
48
  "sdkCompat": {
49
49
  "testedWrapperVersions": [
50
- "0.3.225",
51
50
  "0.3.226",
52
51
  "0.3.227"
53
52
  ],
package/manifest.zst.json CHANGED
@@ -1,61 +1,60 @@
1
1
  {
2
- "version": "2.1.267",
2
+ "version": "2.1.268",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "a9e1808c8204fef901336d54bac7d4ab442955cb",
5
- "buildDate": "2026-09-09T17:40:48Z",
4
+ "commit": "8d19e585f3f1e02a7e31642695321906d38609a3",
5
+ "buildDate": "2026-09-10T17:39:52Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude.zst",
9
- "checksum": "c5a8405e56c2c26b7cef16fa2ada72515478d5e5288b69360fec2741be65b71b",
10
- "size": 66621695,
9
+ "checksum": "3e816cb773480b1c4aeadc1841be32a48fdcb3fec1ea56f59440bfb6faf457df",
10
+ "size": 67166011,
11
11
  "bundle": {
12
- "checksum": "c6e30bda69ce84e5b44f9eb7b48c31ccb7794a2bb50932da13b940d15cfd8eee",
13
- "size": 66619481
12
+ "checksum": "0f3074519ba4406a1c49349620b83ec7f5ac4fd478862df84e29ca6710661e99",
13
+ "size": 67167063
14
14
  }
15
15
  },
16
16
  "darwin-x64": {
17
17
  "binary": "claude.zst",
18
- "checksum": "dbfe2fb95376f711d82e4652d978b8deb83c98c6eba340a68ecdc1d78f67ddb6",
19
- "size": 70666263,
18
+ "checksum": "ca8221fe78907f5d614f2bd17423ab25245d6a5c641a53ebdb7c9c9e53ffb86a",
19
+ "size": 71216486,
20
20
  "bundle": {
21
- "checksum": "24034ea1d3368bd9b0a8ac36c1de1a2b4ab72123912e3f366318d6573a44a29b",
22
- "size": 70672085
21
+ "checksum": "2ad4c1df5a66acc116034232d335d305c42e38baedb737363a9d0f5e82b558be",
22
+ "size": 71218953
23
23
  }
24
24
  },
25
25
  "linux-arm64": {
26
26
  "binary": "claude.zst",
27
- "checksum": "96b42c224156eb36f92362e29e789070079599538e6974e90d4fdc3cc7fb560d",
28
- "size": 75836752
27
+ "checksum": "d1ddeff370da9df19480e700b94c2ee0c298fa538607d5f6be01e025e9a233e0",
28
+ "size": 76373529
29
29
  },
30
30
  "linux-x64": {
31
31
  "binary": "claude.zst",
32
- "checksum": "f21ed66d02ebdd75b33b8ce19c930968b2a006a6dad5c5b59d5f2b355622c4c0",
33
- "size": 76440981
32
+ "checksum": "9e2eca59e1ac7c7d9d9b8a031e4498de137e1da0a2fa3d8a69c00f071bd4495d",
33
+ "size": 76977785
34
34
  },
35
35
  "linux-arm64-musl": {
36
36
  "binary": "claude.zst",
37
- "checksum": "5ba1666b27024a2ae2fd3fd4d29c4ab5a358611d0cb767c4bb9784a0a3a72169",
38
- "size": 74320070
37
+ "checksum": "24a52891b9963d34b0fcb21f4a07228dc61e84a6f1c1d7475199fc004763143c",
38
+ "size": 74855137
39
39
  },
40
40
  "linux-x64-musl": {
41
41
  "binary": "claude.zst",
42
- "checksum": "5553328b7a7fedd67a44cfbc2640dd236168298387e5c1e750227bc0c0b305c8",
43
- "size": 74956187
42
+ "checksum": "9574030b5f9c07b9d9b8d3ba55c0e12051df56faec14135aaa36ada7c226caf0",
43
+ "size": 75492207
44
44
  },
45
45
  "win32-x64": {
46
46
  "binary": "claude.exe.zst",
47
- "checksum": "8ffcd85e6f6668e6185d8bc7c7b185ce93323019902c59c6e809a9ed2eec892f",
48
- "size": 78827899
47
+ "checksum": "02657300b90b53ab28bc478e1880b792c1650f3ad0b7bae6ffe461120e82d0f1",
48
+ "size": 79365973
49
49
  },
50
50
  "win32-arm64": {
51
51
  "binary": "claude.exe.zst",
52
- "checksum": "aa946837470a721111a3a66b437c784b72a6394e56033b15a9fb7e67632098f1",
53
- "size": 75605903
52
+ "checksum": "8d32284fdb5255b158ae88755a717aa3b1521fde1235af57727bfdbb7b7642c0",
53
+ "size": 76145008
54
54
  }
55
55
  },
56
56
  "sdkCompat": {
57
57
  "testedWrapperVersions": [
58
- "0.3.225",
59
58
  "0.3.226",
60
59
  "0.3.227"
61
60
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.267",
3
+ "version": "0.3.268",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -57,14 +57,14 @@
57
57
  "zod": "^4.0.0"
58
58
  },
59
59
  "optionalDependencies": {
60
- "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.267",
61
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.267",
62
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.267",
63
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.267",
64
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.267",
65
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.267",
66
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.267",
67
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.267"
60
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.268",
61
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.268",
62
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.268",
63
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.268",
64
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.268",
65
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.268",
66
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.268",
67
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.268"
68
68
  },
69
69
  "files": [
70
70
  "sdk.mjs",
@@ -80,5 +80,5 @@
80
80
  "manifest.json",
81
81
  "manifest.zst.json"
82
82
  ],
83
- "claudeCodeVersion": "2.1.267"
83
+ "claudeCodeVersion": "2.1.268"
84
84
  }
package/sdk-tools.d.ts CHANGED
@@ -2940,7 +2940,7 @@ export interface ProposeSkillsInput {
2940
2940
  */
2941
2941
  target?: string;
2942
2942
  /**
2943
- * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
2943
+ * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024, and no angle brackets. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
2944
2944
  */
2945
2945
  description: string;
2946
2946
  /**
@@ -2965,7 +2965,7 @@ export interface ProposeSkillsInput {
2965
2965
  */
2966
2966
  target?: string;
2967
2967
  /**
2968
- * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
2968
+ * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024, and no angle brackets. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
2969
2969
  */
2970
2970
  description: string;
2971
2971
  /**
@@ -2988,7 +2988,7 @@ export interface ProposeSkillsInput {
2988
2988
  */
2989
2989
  target?: string;
2990
2990
  /**
2991
- * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
2991
+ * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024, and no angle brackets. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
2992
2992
  */
2993
2993
  description: string;
2994
2994
  /**
@@ -3013,7 +3013,7 @@ export interface ProposeSkillsInput {
3013
3013
  */
3014
3014
  target?: string;
3015
3015
  /**
3016
- * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
3016
+ * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024, and no angle brackets. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
3017
3017
  */
3018
3018
  description: string;
3019
3019
  /**
@@ -3036,7 +3036,7 @@ export interface ProposeSkillsInput {
3036
3036
  */
3037
3037
  target?: string;
3038
3038
  /**
3039
- * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
3039
+ * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024, and no angle brackets. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
3040
3040
  */
3041
3041
  description: string;
3042
3042
  /**
@@ -3059,7 +3059,7 @@ export interface ProposeSkillsInput {
3059
3059
  */
3060
3060
  target?: string;
3061
3061
  /**
3062
- * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
3062
+ * One short sentence saying when to use this skill: aim for under 200 characters, never more than 1024, and no angle brackets. Shown on the review card and saved as the skill's description, which is what decides when the skill is used. For an improvement, reuse the existing skill's description unless the change alters when the skill applies.
3063
3063
  */
3064
3064
  description: string;
3065
3065
  /**
@@ -3104,9 +3104,13 @@ export interface ArtifactInput {
3104
3104
  */
3105
3105
  file_path?: string;
3106
3106
  /**
3107
- * Browser-tab icon: one or two emoji (e.g. "📊"). No markup. Required on a page's first publish; omit on a redeploy (same file path this session, or `url`) to keep the artifact's icon — pass a new one only when the user asks.
3107
+ * The artifact's emoji: one or two emoji (e.g. "📊"). No markup. Required on a page's first publish; omit on a redeploy (same file path this session, or `url`) to keep the artifact's emoji — pass a new one only when the user asks.
3108
3108
  */
3109
3109
  favicon?: string;
3110
+ /**
3111
+ * Optional. One short generic word for the artifact's tab icon, such as chart, calendar, recipe, code or map — a plain signifier, not a product or brand name. Omit when republishing to keep the current icon.
3112
+ */
3113
+ icon?: string;
3110
3114
  /**
3111
3115
  * list only: maximum artifacts to return (default 25).
3112
3116
  */
package/sdk.d.ts CHANGED
@@ -241,6 +241,16 @@ export declare type CanUseTool = (toolName: string, input: Record<string, unknow
241
241
  * read and write access to files in ~/Downloads").
242
242
  */
243
243
  description?: string;
244
+ /**
245
+ * The ask must not be approvable by a single stray keystroke: open the
246
+ * prompt on its decline option and offer no one-key approve shortcut.
247
+ */
248
+ defaultToNo?: boolean;
249
+ /**
250
+ * The ask must not offer a persistent "don't ask again" choice: the
251
+ * rule it would write grants more than this ask's own action.
252
+ */
253
+ suppressAlwaysAllowRule?: boolean;
244
254
  /**
245
255
  * Unique identifier for this specific tool call within the assistant message.
246
256
  * Multiple tool calls in the same assistant message will have different toolUseIDs.
@@ -293,11 +303,11 @@ declare type ControlErrorResponse = {
293
303
  */
294
304
  error: string;
295
305
  /**
296
- * Permission requests still awaiting a response. Sent on the `initialize` response so a client joining an already-initialized session learns about in-flight prompts.
306
+ * can_use_tool requests this CLI process has issued and not yet resolved, so a client joining an already-initialized session learns about in-flight prompts. Always present (possibly empty) on a success `initialize` response from Claude Code v2.1.268 or later; earlier versions could omit it, so treat absence as an older CLI rather than as "nothing pending". A prompt inherited from a previous worker of the same session can remain answerable without appearing here and without a control_cancel_request; session_state "requires_action" on the same reply signals one the CLI is holding, but not every inherited prompt is signalled.
297
307
  */
298
308
  pending_permission_requests?: SDKControlRequest[];
299
309
  /**
300
- * request_user_dialog requests still awaiting a response. Sent on the `initialize` response (sibling of pending_permission_requests) so a client joining an already-initialized session can re-arm in-flight dialogs. Receivers must tolerate the same request_id also arriving as a live or replayed control_request frame and render it once.
310
+ * request_user_dialog requests this CLI process has issued and not yet resolved (sibling of pending_permission_requests, with the same inherited-prompt caveat), so a client joining an already-initialized session can re-arm in-flight dialogs. Always present (possibly empty) on a success `initialize` response from Claude Code v2.1.268 or later; earlier versions could omit it, so treat absence as an older CLI rather than as "nothing pending". Receivers must tolerate the same request_id also arriving as a live or replayed control_request frame and render it once.
301
311
  */
302
312
  pending_user_dialog_requests?: SDKControlRequest[];
303
313
  };
@@ -316,11 +326,11 @@ declare type ControlResponse = {
316
326
  */
317
327
  response?: Record<string, unknown>;
318
328
  /**
319
- * Permission requests still awaiting a response. Sent on the `initialize` response so a client joining an already-initialized session learns about in-flight prompts.
329
+ * can_use_tool requests this CLI process has issued and not yet resolved, so a client joining an already-initialized session learns about in-flight prompts. Always present (possibly empty) on a success `initialize` response from Claude Code v2.1.268 or later; earlier versions could omit it, so treat absence as an older CLI rather than as "nothing pending". A prompt inherited from a previous worker of the same session can remain answerable without appearing here and without a control_cancel_request; session_state "requires_action" on the same reply signals one the CLI is holding, but not every inherited prompt is signalled.
320
330
  */
321
331
  pending_permission_requests?: SDKControlRequest[];
322
332
  /**
323
- * request_user_dialog requests still awaiting a response. Sent on the `initialize` response (sibling of pending_permission_requests) so a client joining an already-initialized session can re-arm in-flight dialogs. Receivers must tolerate the same request_id also arriving as a live or replayed control_request frame and render it once.
333
+ * request_user_dialog requests this CLI process has issued and not yet resolved (sibling of pending_permission_requests, with the same inherited-prompt caveat), so a client joining an already-initialized session can re-arm in-flight dialogs. Always present (possibly empty) on a success `initialize` response from Claude Code v2.1.268 or later; earlier versions could omit it, so treat absence as an older CLI rather than as "nothing pending". Receivers must tolerate the same request_id also arriving as a live or replayed control_request frame and render it once.
324
334
  */
325
335
  pending_user_dialog_requests?: SDKControlRequest[];
326
336
  };
@@ -2814,9 +2824,19 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
2814
2824
  * Reload plugins from disk and return the refreshed commands, agents,
2815
2825
  * plugins, and MCP server status.
2816
2826
  *
2817
- * @returns The refreshed session components after plugin reload
2827
+ * With `holdOnCacheImpact`, the CLI first runs the check the interactive
2828
+ * /reload-plugins makes: when applying would change the session's tool
2829
+ * list while the conversation's prompt cache depends on it, nothing is
2830
+ * applied and the response carries `held: true` with `cache_impact`
2831
+ * describing what applying would change; call again without the option
2832
+ * to apply anyway.
2833
+ *
2834
+ * @returns The refreshed session components after plugin reload, or the
2835
+ * unchanged ones with `held: true` when the reload was held
2818
2836
  */
2819
- reloadPlugins(): Promise<SDKControlReloadPluginsResponse>;
2837
+ reloadPlugins(options?: {
2838
+ holdOnCacheImpact?: boolean;
2839
+ }): Promise<SDKControlReloadPluginsResponse>;
2820
2840
  /**
2821
2841
  * Reload skills from disk and return the refreshed skill list.
2822
2842
  *
@@ -3328,13 +3348,17 @@ export declare type SDKAssistantMessage = {
3328
3348
  session_id: string;
3329
3349
  request_id?: string;
3330
3350
  /**
3331
- * Client uuid of the user message this turn is answering (submitMessage options.uuid), stamped on a reply frame each time that send changes — the turn's FIRST reply frame, and then, for a turn started by a synthetic (meta) prompt, the first reply frame after each queued user message folded in mid-turn takes the echo over. In complete-message mode the frame is the first assistant message; with --include-partial-messages the stamp normally rides the first non-ping stream event instead (see SDKPartialAssistantMessage), and a turn that produces no stream events still stamps its first assistant message — so a consumer can bind 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 its first reply frame only. 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 such as the boot-time rescue turn; 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 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.
3351
+ * Client uuid of the user message this turn is answering (submitMessage options.uuid), stamped on a reply frame each time that send changes — the turn's FIRST reply frame, and then, for a turn started by a synthetic (meta) prompt, the first reply frame after each queued user message folded in mid-turn takes the echo over. In complete-message mode the frame is the first assistant message; with --include-partial-messages the stamp normally rides the first non-ping stream event instead (see SDKPartialAssistantMessage), and a turn that produces no stream events still stamps its first assistant message — so a consumer can bind 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 its first reply frame only. 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 the boot-time rescue turn re-running a turn a worker restart interrupted mid-way stamps the interrupted turn's own last user prompt (with resume_reason), the send that re-run answers; 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 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.
3332
3352
  */
3333
3353
  user_message_uuid?: string;
3334
3354
  /**
3335
3355
  * Client uuids of every user message whose prompt this turn has consumed so far, in consumption order — all members of a prompt batch the host merged into this one turn (several messages sent close together run as one turn whose user_message_uuid is the LAST member's), then any user message folded into the turn before this frame — so a consumer that sent any of them can bind this reply to its own send by finding its uuid anywhere in the list. Always contains user_message_uuid; at most 64 entries. Present exactly when user_message_uuid is, on the same frames; absent from older producers (fall back to user_message_uuid).
3336
3356
  */
3337
3357
  user_message_uuids?: string[];
3358
+ /**
3359
+ * Why this frame's turn is the automatic re-run of a turn a worker restart interrupted (CLAUDE_CODE_RESUME_INTERRUPTED_TURN): the host's CLAUDE_CODE_RESUME_REASON when it set one (host_draining, checkpoint_restore, container_recreated, …), else 'interrupted_turn'. Stamped on the same reply frames as user_message_uuid (which on such a re-run names the interrupted turn's own last user prompt), so a consumer can tell the re-run's first reply from the interrupted attempt's. Absent on every other turn, on thinking_tokens frames, and from older producers.
3360
+ */
3361
+ resume_reason?: string;
3338
3362
  /**
3339
3363
  * This turn continued the preceding truncated assistant turn inside its trailing signed thinking block (max-output-tokens recovery). Its thinking signatures are cumulative over that preceding thinking-only turn, so a history replayed through the bridge must carry this flag back for the normalizer to keep the run's prefix on the wire. Wrapper-level sibling — never inside `message.content` — so it is not replayed to the model.
3340
3364
  */
@@ -3383,7 +3407,7 @@ export declare type SDKAssistantMessage = {
3383
3407
 
3384
3408
  };
3385
3409
 
3386
- export declare type SDKAssistantMessageError = 'authentication_failed' | 'oauth_org_not_allowed' | 'account_on_hold' | 'billing_error' | 'rate_limit' | 'overloaded' | 'invalid_request' | 'model_not_found' | 'server_error' | 'unknown' | 'max_output_tokens' | 'cloud_credential_error';
3410
+ export declare type SDKAssistantMessageError = 'authentication_failed' | 'oauth_org_not_allowed' | 'account_on_hold' | 'verification_required' | 'billing_error' | 'rate_limit' | 'overloaded' | 'invalid_request' | 'model_not_found' | 'server_error' | 'unknown' | 'max_output_tokens' | 'cloud_credential_error';
3387
3411
 
3388
3412
  export declare type SDKAuthStatusMessage = {
3389
3413
  type: 'auth_status';
@@ -3644,6 +3668,10 @@ export declare type SDKControlGetContextUsageResponse = {
3644
3668
  tokens: number;
3645
3669
  color: string;
3646
3670
  isDeferred?: boolean;
3671
+ /**
3672
+ * What the row is, the same classification the /context result's context_usage rows carry: 'used' content occupies the window; 'free' is the remaining window; 'buffer' is the compaction reserve; 'deferred' rows are out-of-window tool schemas. Classify on this, never on the English name.
3673
+ */
3674
+ kind: 'used' | 'free' | 'buffer' | 'deferred';
3647
3675
  }[];
3648
3676
  totalTokens: number;
3649
3677
  maxTokens: number;
@@ -4054,6 +4082,7 @@ export declare type SDKControlInitializeResponse = {
4054
4082
  agents: coreTypes.AgentInfo[];
4055
4083
  output_style: string;
4056
4084
  available_output_styles: string[];
4085
+
4057
4086
  models: coreTypes.ModelInfo[];
4058
4087
 
4059
4088
  /**
@@ -4263,6 +4292,7 @@ declare type SDKControlPermissionRequest = {
4263
4292
  * True when one-tap Approve/Deny must not be offered: the tool's approval card IS the user-interaction surface (Tool.requiresUserInteraction() — the user responds on the card itself), OR the pending ask is localDisplayOnly (its consent disclosure cannot ride this wire and only the local dialog renders it). Either way the user has to open the session to answer.
4264
4293
  */
4265
4294
  requires_user_interaction?: boolean;
4295
+
4266
4296
  };
4267
4297
 
4268
4298
  /**
@@ -4321,6 +4351,10 @@ export declare type SDKControlReloadOutputStylesResponse = {
4321
4351
  */
4322
4352
  declare type SDKControlReloadPluginsRequest = {
4323
4353
  subtype: 'reload_plugins';
4354
+ /**
4355
+ * 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.
4356
+ */
4357
+ hold_on_cache_impact?: boolean;
4324
4358
  };
4325
4359
 
4326
4360
  /**
@@ -4340,6 +4374,18 @@ export declare type SDKControlReloadPluginsResponse = {
4340
4374
  }[];
4341
4375
  mcpServers: coreTypes.McpServerStatus[];
4342
4376
  error_count: number;
4377
+ /**
4378
+ * Present only when the request asked to hold on cache impact and this CLI ran the check. True: the reload was not applied, the lists above describe the session as it still is, and cache_impact says what applying would change. False: the check found no impact and the reload was applied. Absent: the request did not ask, or the CLI predates the option and applied the reload unchecked.
4379
+ */
4380
+ held?: boolean;
4381
+ /**
4382
+ * What applying the held reload would change in the session's tool list: plugin MCP servers it would register or drop (scoped plugin:<plugin>:<server> names, plugin-authored — validate before showing) and whether it would add or remove the LSP tool (the may- forms mean the preview could not fully see the pending plugin set). Present only with held: true.
4383
+ */
4384
+ cache_impact?: {
4385
+ mcp_servers_added: string[];
4386
+ mcp_servers_removed: string[];
4387
+ lsp_tool_change: ('adds' | 'may-add' | 'removes' | 'may-remove') | null;
4388
+ };
4343
4389
  };
4344
4390
 
4345
4391
  /**
@@ -4867,6 +4913,10 @@ export declare type SDKPartialAssistantMessage = {
4867
4913
  * Client uuids of every user message whose prompt this turn has consumed so far, in consumption order — all members of a prompt batch the host merged into this one turn (several messages sent close together run as one turn whose user_message_uuid is the LAST member's), then any user message folded into the turn before this frame — so a consumer that sent any of them can bind this reply to its own send by finding its uuid anywhere in the list. Always contains user_message_uuid; at most 64 entries. Present exactly when user_message_uuid is, on the same frames; absent from older producers (fall back to user_message_uuid).
4868
4914
  */
4869
4915
  user_message_uuids?: string[];
4916
+ /**
4917
+ * Why this frame's turn is the automatic re-run of a turn a worker restart interrupted (CLAUDE_CODE_RESUME_INTERRUPTED_TURN): the host's CLAUDE_CODE_RESUME_REASON when it set one (host_draining, checkpoint_restore, container_recreated, …), else 'interrupted_turn'. Stamped on the same reply frames as user_message_uuid (which on such a re-run names the interrupted turn's own last user prompt), so a consumer can tell the re-run's first reply from the interrupted attempt's. Absent on every other turn, on thinking_tokens frames, and from older producers.
4918
+ */
4919
+ resume_reason?: string;
4870
4920
  };
4871
4921
 
4872
4922
  export declare type SDKPermissionDenial = {
@@ -4975,6 +5025,10 @@ export declare type SDKRateLimitInfo = {
4975
5025
 
4976
5026
 
4977
5027
 
5028
+ /**
5029
+ * Which spend limit blocked the request when it is not the member's own cap: 'group_pool' means a pooled group budget shared by the member's team is used up (the denial otherwise looks like the member's own monthly cap). Absent on a plain member denial and from older CLIs.
5030
+ */
5031
+ limitScope?: 'service' | 'channel' | 'group_pool';
4978
5032
  errorCode?: 'credits_required';
4979
5033
  canUserPurchaseCredits?: boolean;
4980
5034
  hasChargeableSavedPaymentMethod?: boolean;
@@ -5016,7 +5070,15 @@ export declare type SDKResultError = {
5016
5070
  * Client uuids of every user message whose prompt this turn consumed, in consumption order — all members of a prompt batch the host merged into this one turn (several messages sent close together run as one turn whose user_message_uuid is the LAST member's), then any queued user message folded into the running turn between tool rounds, once taken off the queue — so a consumer that sent any of them can bind this result to its own send by finding its uuid anywhere in the list. Always contains user_message_uuid; at most 64 entries; can be longer than the list on the turn's first reply frame. Present when a headless turn that ran echoes user_message_uuid; absent on delivery-failure and zeroed results and from older producers (fall back to user_message_uuid).
5017
5071
  */
5018
5072
  user_message_uuids?: string[];
5073
+ /**
5074
+ * Why this turn was the automatic re-run of a turn a worker restart interrupted (CLAUDE_CODE_RESUME_INTERRUPTED_TURN): the host's CLAUDE_CODE_RESUME_REASON when it set one (host_draining, checkpoint_restore, container_recreated, …), else 'interrupted_turn'. Present on a headless re-run's result, success or error, with or without an echo (a re-run whose opener could not be vouched still carries the reason); absent on every other turn, on the Remote Control bridge's per-turn synthetic results, and from older producers.
5075
+ */
5076
+ resume_reason?: string;
5019
5077
  terminal_reason?: TerminalReason;
5078
+ /**
5079
+ * Delivery sequence of this result within the run: how many results the run numbered before this one, starting at 0, in the order the process writes them. A result held back while background work finishes is numbered when it is finally written, not when its text was produced; a result whose write fails still consumes its number, so a gap in a stream-json sequence means a result was lost. Distinct from num_turns, which counts model round-trips within one turn. Numbered by the process that hosts the run (`claude -p`, stream-json): a local client relaying a cloud session passes the cloud session's numbering through and its own locally built error results carry none; the in-process engine surface does not number yet. Absent from older producers.
5080
+ */
5081
+ result_index?: number;
5020
5082
  fast_mode_state?: FastModeState;
5021
5083
  fast_mode_disabled_reason?: FastModeDisabledReason;
5022
5084
  origin?: SDKMessageOrigin;
@@ -5039,6 +5101,8 @@ export declare type SDKResultSuccess = {
5039
5101
  time_to_request_ms?: number;
5040
5102
  user_message_uuid?: string;
5041
5103
  user_message_uuids?: string[];
5104
+ resume_reason?: string;
5105
+ local_command?: string;
5042
5106
  request_sent_wall_ms?: number;
5043
5107
  first_content_frame_ms?: number;
5044
5108
  first_stream_post_ms?: number;
@@ -5073,6 +5137,10 @@ export declare type SDKResultSuccess = {
5073
5137
  structured_output?: unknown;
5074
5138
  deferred_tool_use?: SDKDeferredToolUse;
5075
5139
  terminal_reason?: TerminalReason;
5140
+ /**
5141
+ * Delivery sequence of this result within the run: how many results the run numbered before this one, starting at 0, in the order the process writes them. A result held back while background work finishes is numbered when it is finally written, not when its text was produced; a result whose write fails still consumes its number, so a gap in a stream-json sequence means a result was lost. Distinct from num_turns, which counts model round-trips within one turn. Numbered by the process that hosts the run (`claude -p`, stream-json): a local client relaying a cloud session passes the cloud session's numbering through and its own locally built error results carry none; the in-process engine surface does not number yet. Absent from older producers.
5142
+ */
5143
+ result_index?: number;
5076
5144
  fast_mode_state?: FastModeState;
5077
5145
  fast_mode_disabled_reason?: FastModeDisabledReason;
5078
5146
  origin?: SDKMessageOrigin;
@@ -6472,7 +6540,14 @@ export declare interface Settings {
6472
6540
  [k: string]: unknown;
6473
6541
  };
6474
6542
  };
6475
-
6543
+ /**
6544
+ * Managed plugins (plugin\@marketplace ids that managed enabledPlugins sets true) whose hooks run first, outermost, in the listed order: the first id listed sees every event before any other plugin and every result after it. Managed plugins not listed here or in appendPlugins follow the listed ones; user, project and marketplace plugins come after those; then appendPlugins; then the built-in plugins. The bundled sec-default\@builtin seats itself outermost (on a machine with managed settings and for Team and Enterprise organizations) unless this list is set, in which case list sec-default\@builtin where it should sit or leave it out. Any other id that is not an enabled managed plugin is skipped; an id listed in both keys is prepended. Only honored from managed settings (or, on a machine with none, from user settings for your own plugins); ignored in project, local and --settings sources.
6545
+ */
6546
+ prependPlugins?: string[];
6547
+ /**
6548
+ * Managed plugins (plugin\@marketplace ids that managed enabledPlugins sets true) whose hooks run last among plugins, innermost, in the listed order: the last id listed sits just above the built-in plugins and sees each event as every other plugin left it. Only honored from managed settings (or, on a machine with none, from user settings for your own plugins); ignored in project, local and --settings sources.
6549
+ */
6550
+ appendPlugins?: string[];
6476
6551
  /**
6477
6552
  * Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources.
6478
6553
  */
@@ -7668,12 +7743,16 @@ export declare interface Settings {
7668
7743
  * Cloud gateway URL to pre-fill and auto-connect to during login, alongside forceLoginMethod: "gateway". Honored only from admin-controlled managed settings (MDM / managed-settings.json / policy helper); ignored in user, project, and remote-delivered settings.
7669
7744
  */
7670
7745
  forceLoginGatewayUrl?: string;
7746
+ /**
7747
+ * IPv4 CIDR blocks (at most 4, each /8 to /32, not overlapping) your Cloud gateway sits in: the public block your organization numbers its internal network from, which lets /login reach a gateway there. A block must lie entirely outside private space, where /login accepts a gateway without this key. /login accepts a gateway inside a listed block over a direct connection only, and only when this machine's own address on that connection is inside the same block, so /login must happen from a machine whose own address is inside the block (not through a proxy, VPN pool, container or NAT segment outside it). A bar against copied settings files, not proof of location. Honored only from admin-controlled managed settings (MDM / managed-settings.json / policy helper); ignored in user, project, and remote-delivered settings.
7748
+ */
7749
+ gatewayInternalNetworks?: string[];
7671
7750
  /**
7672
7751
  * Controls whether the SDK parent tier (Options.managedSettings / --managed-settings) layers under this admin tier. "first-wins" (default): parent is dropped — admin tiers are the only policy source. "merge": parent's restrictive-only-filtered settings union under the admin winner. Has no effect when no admin tier exists (parent applies as the sole policy tier, still filtered restrictive-only).
7673
7752
  */
7674
7753
  parentSettingsBehavior?: 'first-wins' | 'merge';
7675
7754
  /**
7676
- * Controls how the managed settings sources compose. "first-wins" (default): the highest-priority source present (server-managed > MDM (managed plist / HKLM) > managed-settings.json) is the managed tier alone. "merge": every present source deep-merges with fixed precedence server-managed > MDM > managed-settings.json — scalars take the highest source's value (a restrictive boolean or enum — the allowManaged*Only locks, the disable* switches, the sandbox lock family — takes the strictest value any source sets) and arrays union, except fallbackModel, the restriction allowlists allowedMcpServers, availableModels, strictKnownMarketplaces and allowedChannelPlugins, and sandbox.credentials.awsPairs and sandbox.ripgrep (the highest source that sets one owns it whole), modelOverrides (the whole map of the highest source that sets it, dropped when that source sits below the one that sets availableModels), managedMcpServers (server names union; a name set by two sources takes the higher source's whole entry), and the keys taken from the highest source only: the auth pins forceLoginOrgUUID, forceLoginMethod and forceLoginGatewayUrl, the credential helpers apiKeyHelper, awsAuthRefresh, awsCredentialExport, gcpAuthRefresh, otelHeadersHelper and proxyAuthHelper, modelPicker, permissions.defaultMode, parentSettingsBehavior and the policyHelper configuration (env keeps its own per-key union). Honored only from the highest-priority source present; enable it only when every lower source is admin-controlled, since lower sources then contribute entries such as permissions.allow. HKCU and --managed-settings never take part in the merge.
7755
+ * Controls how the managed settings sources compose. "first-wins" (default): the highest-priority source present (server-managed > MDM (managed plist / HKLM) > managed-settings.json) is the managed tier alone. "merge": every present source deep-merges with fixed precedence server-managed > MDM > managed-settings.json — scalars take the highest source's value (a restrictive boolean or enum — the allowManaged*Only locks, the disable* switches, the sandbox lock family — takes the strictest value any source sets) and arrays union, except fallbackModel, the restriction allowlists allowedMcpServers, availableModels, strictKnownMarketplaces and allowedChannelPlugins, and sandbox.credentials.awsPairs and sandbox.ripgrep (the highest source that sets one owns it whole), modelOverrides (the whole map of the highest source that sets it, dropped when that source sits below the one that sets availableModels), managedMcpServers (server names union; a name set by two sources takes the higher source's whole entry), and the keys taken from the highest source only: the auth pins forceLoginOrgUUID, forceLoginMethod, forceLoginGatewayUrl and gatewayInternalNetworks, the credential helpers apiKeyHelper, awsAuthRefresh, awsCredentialExport, gcpAuthRefresh, otelHeadersHelper and proxyAuthHelper, modelPicker, permissions.defaultMode, parentSettingsBehavior and the policyHelper configuration (env keeps its own per-key union). Honored only from the highest-priority source present; enable it only when every lower source is admin-controlled, since lower sources then contribute entries such as permissions.allow. HKCU and --managed-settings never take part in the merge.
7677
7756
  */
7678
7757
  managedSourcesBehavior?: 'first-wins' | 'merge';
7679
7758
  /**
@@ -8697,6 +8776,7 @@ export declare type ToolConfig = {
8697
8776
  */
8698
8777
  previewFormat?: 'markdown' | 'html';
8699
8778
 
8779
+
8700
8780
  };
8701
8781
  };
8702
8782