@anthropic-ai/claude-agent-sdk 0.3.272 → 0.3.274

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,56 +1,53 @@
1
1
  {
2
- "version": "2.1.272",
2
+ "version": "2.1.274",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "013cad548b76e5d315ae72da82dce47cd7c99678",
5
- "modsCommit": "f4ceeecabff13e814dc4302620e2da1a688e47f8",
6
- "buildDate": "2026-09-14T23:03:38Z",
4
+ "commit": "1efcc1361e649ab98800b43a7df307043397a9ba",
5
+ "modsCommit": "744fb6ab02aca7c50c43f1676a870cff184e1fca",
6
+ "buildDate": "2026-09-16T21:56:00Z",
7
7
  "platforms": {
8
8
  "darwin-arm64": {
9
9
  "binary": "claude",
10
- "checksum": "195e24e8e1f9bf46f1eaee72d434a33e18f9f5796f29a6348a00d16c5f8aee75",
11
- "size": 210702192
10
+ "checksum": "3509913f9d1576316c8845b88837f8fd3bbbcf26625833ac82cfb6b8985da94a",
11
+ "size": 214149552
12
12
  },
13
13
  "darwin-x64": {
14
14
  "binary": "claude",
15
- "checksum": "6377b8e95ecbf90fd6b91e543b3c23e1b23c9c968b2acb7ad460ce5573d3e41c",
16
- "size": 219487840
15
+ "checksum": "b18e8c9d7666d8987a174ac65e0019f4ba6befa73d2f75c05cbe92e5093431eb",
16
+ "size": 222955360
17
17
  },
18
18
  "linux-arm64": {
19
19
  "binary": "claude",
20
- "checksum": "214a90efdd16ee0ea81132ffecced588dba394d178cc494f285ba04b5288c8de",
21
- "size": 227074288
20
+ "checksum": "2db904daea17addff9de557ba26a725916888aa7b546e2c5dd989c20d9d49ab3",
21
+ "size": 230482160
22
22
  },
23
23
  "linux-x64": {
24
24
  "binary": "claude",
25
- "checksum": "d81396a668eb76fbddb49a2a5841f1b5d7af96b4c1f6500ced92f2c988f5bcd4",
26
- "size": 227115320
25
+ "checksum": "15e2d05148f801b5774032faad87e624ecd172e9903288bda448b892eb58fa07",
26
+ "size": 230580536
27
27
  },
28
28
  "linux-arm64-musl": {
29
29
  "binary": "claude",
30
- "checksum": "226928f89d344b80f5f32aa13b79cba8816c0a7fb0b43c8b3b47c8840f11d580",
31
- "size": 219625120
30
+ "checksum": "5d50bd99667904879d95142dbd604b24d0273c13fb79f3abc2346cb00048049f",
31
+ "size": 223098528
32
32
  },
33
33
  "linux-x64-musl": {
34
34
  "binary": "claude",
35
- "checksum": "e30bb3ac07c4f1c3f63b47312e9a73ba6875256b7768c4cdb784d2b179417489",
36
- "size": 221036504
35
+ "checksum": "9f64fb9e79752c676234087573f05a794e2a8fbd49c91482c6567be258752e15",
36
+ "size": 224501720
37
37
  },
38
38
  "win32-x64": {
39
39
  "binary": "claude.exe",
40
- "checksum": "cd8d8d33e549ba5973428bcf18310164227d68ca756925242c47d3b0d48bf4dc",
41
- "size": 230228640
40
+ "checksum": "4e4c1746aff835bb05e5ed14cda72d21ee6fbda4147aa99b3135718614da117e",
41
+ "size": 233691808
42
42
  },
43
43
  "win32-arm64": {
44
44
  "binary": "claude.exe",
45
- "checksum": "e8fbdb138cb3b438929286f234663f98fe0a914d77d6c8589a51f3ecf8915462",
46
- "size": 221452448
45
+ "checksum": "da93e462c34ec86efee80c70ac791d3232ed98bd44c6abbafb1b5ffa2a9185c4",
46
+ "size": 224916128
47
47
  }
48
48
  },
49
49
  "sdkCompat": {
50
50
  "testedWrapperVersions": [
51
- "0.3.232",
52
- "0.3.233",
53
- "0.3.234",
54
51
  "0.3.235",
55
52
  "0.3.236",
56
53
  "0.3.237",
@@ -67,6 +64,7 @@
67
64
  "0.3.250",
68
65
  "0.3.251",
69
66
  "0.3.252",
67
+ "0.3.257",
70
68
  "0.3.258",
71
69
  "0.3.259",
72
70
  "0.3.260",
@@ -77,7 +75,9 @@
77
75
  "0.3.268",
78
76
  "0.3.269",
79
77
  "0.3.270",
80
- "0.3.271"
78
+ "0.3.271",
79
+ "0.3.272",
80
+ "0.3.273"
81
81
  ],
82
82
  "harnessSchema": 1
83
83
  }
package/manifest.zst.json CHANGED
@@ -1,64 +1,61 @@
1
1
  {
2
- "version": "2.1.272",
2
+ "version": "2.1.274",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "013cad548b76e5d315ae72da82dce47cd7c99678",
5
- "modsCommit": "f4ceeecabff13e814dc4302620e2da1a688e47f8",
6
- "buildDate": "2026-09-14T23:04:39Z",
4
+ "commit": "1efcc1361e649ab98800b43a7df307043397a9ba",
5
+ "modsCommit": "744fb6ab02aca7c50c43f1676a870cff184e1fca",
6
+ "buildDate": "2026-09-16T21:57:10Z",
7
7
  "platforms": {
8
8
  "darwin-arm64": {
9
9
  "binary": "claude.zst",
10
- "checksum": "9bc86af289b3acd06d88ecdc6fab53e2c3590467984639d251aa28ca1d589f66",
11
- "size": 69282560,
10
+ "checksum": "7b1d7e51232bf46da0ad4d84d3c9821933275b3712111c4a94c18c4ede8e9694",
11
+ "size": 70548622,
12
12
  "bundle": {
13
- "checksum": "0f1472f473c0b0397efcb71906931bf14aac14d1487290c8dcfeeb4380123d1b",
14
- "size": 69289478
13
+ "checksum": "e655712248ebb48efe48daf7c8920be45989d77fcd4c9b812bf7e259393a95a6",
14
+ "size": 70550725
15
15
  }
16
16
  },
17
17
  "darwin-x64": {
18
18
  "binary": "claude.zst",
19
- "checksum": "ceaee8ea1f6e3c7f468cd6e486367f6b129a1b76899b086b83ad7ccb1608b0b8",
20
- "size": 73437901,
19
+ "checksum": "90b036a45b6d99de8b01051148953617060fd464e9f1f18996f3799e57e8f198",
20
+ "size": 74720985,
21
21
  "bundle": {
22
- "checksum": "6aecf0d1b0668278f0027d07bb5ce190aac1da74c1417113f87961f49584b28e",
23
- "size": 73438431
22
+ "checksum": "17faafe638136427f4d719d7ea060298ee7e6f3e38803f4809c26556dd0efc1b",
23
+ "size": 74724749
24
24
  }
25
25
  },
26
26
  "linux-arm64": {
27
27
  "binary": "claude.zst",
28
- "checksum": "cc54fca24f7dec6ed921996121ae65e435cadbb50d256850e1cc70f3ae8b02e2",
29
- "size": 78477860
28
+ "checksum": "5873a7beb9793643b9c0287f5873ea507e92f33477b1bbb86f0451caaf08b8fd",
29
+ "size": 79737410
30
30
  },
31
31
  "linux-x64": {
32
32
  "binary": "claude.zst",
33
- "checksum": "ef2c2de4f3464443e55e91b8552d67459e92f98b691198d1888de3bd49baaf4d",
34
- "size": 79104422
33
+ "checksum": "ea049d5d46d5e6deaaadef9549f45879917d39a196d912c99bd3981a0cfdc7d8",
34
+ "size": 80357615
35
35
  },
36
36
  "linux-arm64-musl": {
37
37
  "binary": "claude.zst",
38
- "checksum": "4c704bfab338332a6ea08b34fd57d2a961db55a16513252abfa6058160bb8bda",
39
- "size": 76932867
38
+ "checksum": "21b69fbc9fdc9021317dcd6fc236c38216664e6def4a5127d40e3c2434db59fb",
39
+ "size": 78191631
40
40
  },
41
41
  "linux-x64-musl": {
42
42
  "binary": "claude.zst",
43
- "checksum": "9bc829d18b604f36764f53436ce3c5340de26e657f7c38367074cf28da41f159",
44
- "size": 77594510
43
+ "checksum": "0bd16f3afb6b87b06ca70f80f17a6436da6acb4310c08b7453dcdf1a62913a70",
44
+ "size": 78856280
45
45
  },
46
46
  "win32-x64": {
47
47
  "binary": "claude.exe.zst",
48
- "checksum": "f6b1c5f9c3a457d2aad026084ad459d8695a3d546be8b6ca972140b2ed7c0e31",
49
- "size": 81487963
48
+ "checksum": "37f1c37f19824b021cbc043076d6db4aa2e4ff5a4327812c40a3ad85243659aa",
49
+ "size": 82752486
50
50
  },
51
51
  "win32-arm64": {
52
52
  "binary": "claude.exe.zst",
53
- "checksum": "bb01dee14a4084375e712bdcb467c591b7dfa9674b905bbcf66b5cd3d8c69376",
54
- "size": 78223647
53
+ "checksum": "936419143051d84621a3d84cef019d0498d40fc00d2fc1f5a6d3672aac1224fb",
54
+ "size": 79501465
55
55
  }
56
56
  },
57
57
  "sdkCompat": {
58
58
  "testedWrapperVersions": [
59
- "0.3.232",
60
- "0.3.233",
61
- "0.3.234",
62
59
  "0.3.235",
63
60
  "0.3.236",
64
61
  "0.3.237",
@@ -75,6 +72,7 @@
75
72
  "0.3.250",
76
73
  "0.3.251",
77
74
  "0.3.252",
75
+ "0.3.257",
78
76
  "0.3.258",
79
77
  "0.3.259",
80
78
  "0.3.260",
@@ -85,7 +83,9 @@
85
83
  "0.3.268",
86
84
  "0.3.269",
87
85
  "0.3.270",
88
- "0.3.271"
86
+ "0.3.271",
87
+ "0.3.272",
88
+ "0.3.273"
89
89
  ],
90
90
  "harnessSchema": 1
91
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.272",
3
+ "version": "0.3.274",
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.272",
61
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.272",
62
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.272",
63
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.272",
64
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.272",
65
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.272",
66
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.272",
67
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.272"
60
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.274",
61
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.274",
62
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.274",
63
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.274",
64
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.274",
65
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.274",
66
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.274",
67
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.274"
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.272"
83
+ "claudeCodeVersion": "2.1.274"
84
84
  }
package/sdk-tools.d.ts CHANGED
@@ -583,6 +583,7 @@ export type ArtifactOutput =
583
583
  };
584
584
  next?: string;
585
585
  cowritten?: true;
586
+ outside_writer?: true;
586
587
  };
587
588
  }
588
589
  | {
@@ -593,6 +594,8 @@ export type ArtifactOutput =
593
594
  content_type: string;
594
595
  sha256: string;
595
596
  cowritten?: true;
597
+ outside_writer?: true;
598
+ public_read?: true;
596
599
  foreign?: true;
597
600
  };
598
601
  }
@@ -3088,7 +3091,7 @@ export interface ProposeGoalInput {
3088
3091
  }
3089
3092
  export interface ArtifactInput {
3090
3093
  /**
3091
- * Omit (or 'publish') to publish file_path. 'list' enumerates artifacts — the user's own by default, see `scope`; only `limit` and `scope` may accompany it. 'read' returns the content of the published artifact at `url` (raw HTML for the user's own; an isolated summary, steered by the optional `prompt`, for one shared with them, though a page published in this session's own Slack channel can come back in full as untrusted content) — see **Calls**. 'watch', 'unwatch', and 'status' manage live-update subscriptions that notify a session when an artifact is republished elsewhere, and those aren't available in this session: 'watch' only reports that — no republish notification reaches this session — and 'status' lists this session's artifact watches (pass `url` to check one). 'upload_asset' adds one local media, PDF, font, or text file to an existing artifact — pass `url` and `file_path`. 'list_assets' lists the files in an artifact's asset store (pass `url`; `after` continues a listing), 'read_asset' saves one of them to a local file named by its id (pass `url` and `asset_id`, optionally `out_dir`), and 'delete_asset' permanently removes one (pass `url` and `asset_id`). See **Artifact assets** above.
3094
+ * Omit (or 'publish') to publish file_path. 'list' enumerates artifacts — the user's own by default, see `scope`; only `limit` and `scope` may accompany it. 'read' returns the content of the published artifact at `url` (raw HTML for the user's own; an isolated summary, steered by the optional `prompt`, for one shared with them, though a page published in this session's own Slack channel can come back in full as untrusted content) — see **Calls**. 'watch', 'unwatch', and 'status' manage live-update subscriptions through which a session keeps track of new versions of an artifact published elsewhere, and those aren't available in this session: 'watch' only reports that — this session does not keep track of new versions — and 'status' lists this session's artifact watches (pass `url` to check one). 'upload_asset' adds one local media, PDF, font, or text file to an existing artifact — pass `url` and `file_path`. 'list_assets' lists the files in an artifact's asset store (pass `url`; `after` continues a listing), 'read_asset' saves one of them to a local file named by its id (pass `url` and `asset_id`, optionally `out_dir`), and 'delete_asset' permanently removes one (pass `url` and `asset_id`). See **Artifact assets** above.
3092
3095
  */
3093
3096
  action?:
3094
3097
  | "publish"
package/sdk.d.ts CHANGED
@@ -227,6 +227,21 @@ export declare type CanUseTool = (toolName: string, input: Record<string, unknow
227
227
  * For example, when a Bash command tries to access a path outside allowed directories.
228
228
  */
229
229
  blockedPath?: string;
230
+ /**
231
+ * For `mcp__*` tools: the MCP server serving the tool and where its
232
+ * definition came from. `source: 'sdk'` means one of the in-process
233
+ * servers this SDK host registered (its `name` is the key you registered;
234
+ * only the host can register one); any other value (`plugin`, `user`,
235
+ * `project`, `local`, `dynamic`, `managed`, …) is a server from
236
+ * configuration, whose `name` is the key as authored there — untrusted
237
+ * text, escape it before display. Key trust decisions on `source`, not on
238
+ * the name or the tool-name prefix. Absent for non-MCP tools and on CLIs
239
+ * that predate the field.
240
+ */
241
+ mcpServer?: {
242
+ name: string;
243
+ source: string;
244
+ };
230
245
  /** Explains why this permission request was triggered. */
231
246
  decisionReason?: string;
232
247
  /**
@@ -384,6 +399,7 @@ declare namespace coreTypes {
384
399
  McpSSEServerConfig,
385
400
  McpSdkServerConfig,
386
401
  McpServerConfigForProcessTransport,
402
+ McpServerProvenance,
387
403
  McpServerStatusConfig,
388
404
  McpServerStatus,
389
405
  McpServerToolPolicy,
@@ -465,6 +481,7 @@ declare namespace coreTypes {
465
481
  SDKSessionInfo,
466
482
  SDKSessionStateChangedMessage,
467
483
  SDKSettingsParseError,
484
+ SDKStartupFailureReason,
468
485
  SDKStatusMessage,
469
486
  SDKStatus,
470
487
  SDKSystemMessage,
@@ -475,6 +492,7 @@ declare namespace coreTypes {
475
492
  SDKThinkingTokensMessage,
476
493
  SDKToolProgressMessage,
477
494
  SDKToolUseSummaryMessage,
495
+ SDKUsageReport,
478
496
  SDKUserMessageReplay,
479
497
  SDKUserMessage,
480
498
  SDKWorkerShuttingDownMessage,
@@ -1125,6 +1143,17 @@ export declare type McpServerConfig = McpStdioServerConfig | McpSSEServerConfig
1125
1143
 
1126
1144
  export declare type McpServerConfigForProcessTransport = McpStdioServerConfig | McpSSEServerConfig | McpHttpServerConfig | McpSdkServerConfig;
1127
1145
 
1146
+ /**
1147
+ * The MCP server serving this tool, for `mcp__*` tools: `name` is the server's config key (for `source: "sdk"`, exactly the name the SDK host registered in `sdkMcpServers` / `mcp_set_servers`; for any other source, the key as authored in that configuration — untrusted text, the same value `mcp_status` and system/init report, to be escaped before display), `source` is where its definition came from — `sdk` (an in-process server the SDK host runs; only the host can register one, so a configured server of the same name never reads `sdk`), `plugin` (a server a plugin ships or registers at runtime), or a config scope (`user`, `project`, `local`, `dynamic` for --mcp-config / `mcp_set_servers` process servers, `managed`, `enterprise`, `claudeai`, `agent`). Key trust on `source`, not on the name or the tool-name prefix. Absent for non-MCP tools.
1148
+ */
1149
+ export declare type McpServerProvenance = {
1150
+ name: string;
1151
+ /**
1152
+ * sdk | plugin | user | project | local | dynamic | managed | enterprise | claudeai | agent — an open set; treat unknown values as an unrecognized configured source, never as sdk.
1153
+ */
1154
+ source: string;
1155
+ };
1156
+
1128
1157
  /**
1129
1158
  * Status information for an MCP server connection.
1130
1159
  */
@@ -1156,6 +1185,10 @@ export declare type McpServerStatus = {
1156
1185
  * Configuration scope (e.g., project, user, local, claudeai, managed)
1157
1186
  */
1158
1187
  scope?: string;
1188
+ /**
1189
+ * Where the server definition came from: sdk (an in-process server the SDK host registered — only the host can register one), plugin (a server a plugin ships or registers at runtime), or the config scope (user, project, local, dynamic, managed, enterprise, claudeai, agent). Key trust on this, not on the name. Absent on CLIs that predate the field.
1190
+ */
1191
+ source?: string;
1159
1192
  /**
1160
1193
  * Tools provided by this server (available when connected)
1161
1194
  */
@@ -2319,6 +2352,7 @@ export declare type PermissionDeniedHookInput = BaseHookInput & {
2319
2352
  tool_input: unknown;
2320
2353
  tool_use_id: string;
2321
2354
  reason: string;
2355
+ mcp_server?: McpServerProvenance;
2322
2356
  };
2323
2357
 
2324
2358
  export declare type PermissionDeniedHookSpecificOutput = {
@@ -2336,6 +2370,7 @@ export declare type PermissionRequestHookInput = BaseHookInput & {
2336
2370
  tool_name: string;
2337
2371
  tool_input: unknown;
2338
2372
  permission_suggestions?: PermissionUpdate[];
2373
+ mcp_server?: McpServerProvenance;
2339
2374
  };
2340
2375
 
2341
2376
  export declare type PermissionRequestHookSpecificOutput = {
@@ -2493,6 +2528,7 @@ export declare type PostToolUseFailureHookInput = BaseHookInput & {
2493
2528
  * Tool execution time in milliseconds. Excludes permission-prompt and hook time.
2494
2529
  */
2495
2530
  duration_ms?: number;
2531
+ mcp_server?: McpServerProvenance;
2496
2532
  };
2497
2533
 
2498
2534
  export declare type PostToolUseFailureHookSpecificOutput = {
@@ -2510,6 +2546,7 @@ export declare type PostToolUseHookInput = BaseHookInput & {
2510
2546
  * Tool execution time in milliseconds. Excludes permission-prompt and hook time.
2511
2547
  */
2512
2548
  duration_ms?: number;
2549
+ mcp_server?: McpServerProvenance;
2513
2550
  };
2514
2551
 
2515
2552
  export declare type PostToolUseHookSpecificOutput = {
@@ -2587,6 +2624,7 @@ export declare type PreToolUseHookInput = BaseHookInput & {
2587
2624
  tool_name: string;
2588
2625
  tool_input: unknown;
2589
2626
  tool_use_id: string;
2627
+ mcp_server?: McpServerProvenance;
2590
2628
  };
2591
2629
 
2592
2630
  export declare type PreToolUseHookSpecificOutput = {
@@ -2655,6 +2693,7 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
2655
2693
  warning?: string;
2656
2694
  }>;
2657
2695
 
2696
+
2658
2697
  /**
2659
2698
  * Change the model used for subsequent responses.
2660
2699
  * Only available in streaming input mode.
@@ -3396,6 +3435,12 @@ export declare type SDKAssistantMessage = {
3396
3435
  * Structured twin of the /context report, carried on the synthetic assistant message that delivers the markdown table. Present only on /context results from CLIs new enough to attach it; the markdown in message.content remains the canonical fallback. Wrapper-level sibling — never inside `message.content` — so it is not replayed to the model.
3397
3436
  */
3398
3437
  context_usage?: SDKContextUsage;
3438
+ /**
3439
+ * Structured twin of the /usage report, carried on the synthetic assistant message that delivers its text: the session totals, the plan's usage rows and extra-usage spend, for remote clients that render a card from data. Present only on /usage results from CLIs new enough to attach it and from claude.ai-subscriber sessions; the text in message.content remains the canonical fallback. Wrapper-level sibling — never inside `message.content` — so it is not replayed to the model.
3440
+ */
3441
+ usage_report?: SDKUsageReport;
3442
+
3443
+
3399
3444
 
3400
3445
 
3401
3446
 
@@ -4427,6 +4472,7 @@ declare type SDKControlMcpToggleRequest = {
4427
4472
  declare type SDKControlPermissionRequest = {
4428
4473
  subtype: 'can_use_tool';
4429
4474
  tool_name: string;
4475
+ mcp_server?: coreTypes.McpServerProvenance;
4430
4476
  input: Record<string, unknown>;
4431
4477
  permission_suggestions?: coreTypes.PermissionUpdate[];
4432
4478
  blocked_path?: string;
@@ -5312,6 +5358,10 @@ export declare type SDKResultError = {
5312
5358
  queued_turn_count?: number;
5313
5359
  errors: string[];
5314
5360
 
5361
+ /**
5362
+ * Set on the zeroed error_during_execution result a stream-json run writes before exiting on a known startup failure; errors carries the same text as stderr. Failures that used to end with stderr alone write that result only when the host sets CLAUDE_CODE_STARTUP_FAILURE_RESULTS. Absent on every other result, on startup failures without a known cause, and from older producers.
5363
+ */
5364
+ startup_failure_reason?: SDKStartupFailureReason;
5315
5365
  /**
5316
5366
  * Client uuid of the user message that triggered this turn (submitMessage options.uuid), echoed back so a consumer can link this error result to the send it answers — the same join key the success variant echoes, carried alone (error turns have no request_sent_wall_ms to report). A delivery-failure result from the remote-session client echoes the failed send's queue key, which is client-minted when the host sent no uuid of its own. A synthetic/scheduled (meta) turn's own uuid is echoed only when the host vouches it is the client event's own (delivered content such as a Slack owner ping or a Slack-bot observation); a meta turn that folded queued user messages in mid-turn, vouched or not, echoes the LAST of them. Absent on turns that neither had a client uuid nor folded a user message in, on session-scoped failures with no single triggering send (a crashed worker's zeroed result), and from older producers.
5317
5367
  */
@@ -5363,6 +5413,7 @@ export declare type SDKResultSuccess = {
5363
5413
  time_origin_ms?: number;
5364
5414
  is_error: boolean;
5365
5415
  api_error_status?: number | null;
5416
+
5366
5417
  num_turns: number;
5367
5418
  result: string;
5368
5419
  stop_reason: string | null;
@@ -5473,6 +5524,11 @@ export declare type SDKSettingsParseError = {
5473
5524
  message: string;
5474
5525
  };
5475
5526
 
5527
+ /**
5528
+ * Why Claude Code refused to start, so a host can offer the fix instead of a retry. org_pin_api_key_conflict: managed settings pin a first-party or Cloud gateway sign-in, and an Anthropic API key or auth token is configured instead. org_verify_failed: the sign-in's organization could not be verified against the pin (network, or a revoked token). org_pin_mismatch: the sign-in belongs to an organization the pin does not allow. managed_settings_invalid: managed policy settings could not be read, or the pin names no organization. remote_settings_required_unavailable: managed settings the organization requires could not be loaded. gateway_signin_required: the Cloud gateway ended this sign-in. gateway_access_denied: the Cloud gateway refused managed settings for this account. proxy_invalid: a proxy setting is not a complete URL. temp_dir_unusable: the per-user temp directory is unsafe or could not be created. cwd_unavailable: the working directory was deleted, moved or cannot be read. shell_tool_missing: Windows has no shell tool: Git Bash is missing, and PowerShell is missing or turned off by CLAUDE_CODE_USE_POWERSHELL_TOOL. session_held_by_background: the conversation to resume or continue is running as a background session. worktree_resume_refused: the resume was refused because the session's worktree failed its safety checks or the resume was launched from inside it; errors says whether a re-run continues without the worktree. worktree_unverified: the session's worktree could not be verified right now; retrying may succeed. cli_version_too_old: this Claude Code version is below the minimum Anthropic requires. bypass_root: bypass permissions mode was requested while running as root.
5529
+ */
5530
+ export declare type SDKStartupFailureReason = 'org_pin_api_key_conflict' | 'org_verify_failed' | 'org_pin_mismatch' | 'managed_settings_invalid' | 'remote_settings_required_unavailable' | 'gateway_signin_required' | 'gateway_access_denied' | 'proxy_invalid' | 'temp_dir_unusable' | 'cwd_unavailable' | 'shell_tool_missing' | 'session_held_by_background' | 'worktree_resume_refused' | 'worktree_unverified' | 'cli_version_too_old' | 'bypass_root';
5531
+
5476
5532
  export declare type SDKStatus = 'compacting' | 'requesting' | null;
5477
5533
 
5478
5534
  export declare type SDKStatusMessage = {
@@ -5506,6 +5562,10 @@ export declare type SDKSystemMessage = {
5506
5562
  mcp_servers: {
5507
5563
  name: string;
5508
5564
  status: string;
5565
+ /**
5566
+ * Where the server definition came from — same values as McpServerStatus.source (sdk | plugin | a config scope). Absent on CLIs that predate the field.
5567
+ */
5568
+ source?: string;
5509
5569
  }[];
5510
5570
  model: string;
5511
5571
  /**
@@ -5559,6 +5619,10 @@ export declare type SDKTaskNotificationMessage = {
5559
5619
  task_id: string;
5560
5620
  tool_use_id?: string;
5561
5621
  status: 'completed' | 'failed' | 'stopped';
5622
+ /**
5623
+ * Machine-readable cause, set only when the task did not end through an ordinary completion, failure, or stop. 'worker_restart': the worker process restarted and the resumed process found the task orphaned (always with status 'stopped').
5624
+ */
5625
+ reason?: 'worker_restart';
5562
5626
  output_file: string;
5563
5627
  summary: string;
5564
5628
  usage?: {
@@ -5705,6 +5769,78 @@ export declare type SDKToolUseSummaryMessage = {
5705
5769
 
5706
5770
  };
5707
5771
 
5772
+ /**
5773
+ * Structured twin of a /usage result, carried beside its text: the session's totals, the plan's usage rows as the server sent them and the extra-usage spend, and nothing else from the usage body (the get_usage control reply carries the rest). Experimental — the shape may change.
5774
+ */
5775
+ export declare type SDKUsageReport = {
5776
+ /**
5777
+ * Cost and usage accumulated by the current session.
5778
+ */
5779
+ session: {
5780
+ total_cost_usd: number;
5781
+ total_api_duration_ms: number;
5782
+ total_duration_ms: number;
5783
+ total_lines_added: number;
5784
+ total_lines_removed: number;
5785
+ model_usage: Record<string, ModelUsage>;
5786
+ };
5787
+ /**
5788
+ * The plan's usage rows and extra-usage spend from the claude.ai usage endpoint; null when the CLI could not fetch them (no plan on this lane, or a token without the profile scope).
5789
+ */
5790
+ rate_limits: {
5791
+ /**
5792
+ * The server's usage rows (the usage endpoint's limits[]), as sent: which meters apply, their scope, labels, severity and order are the server's, so a client renders them verbatim and a new meter needs no client release. Empty when the server reported no meters; null when the body carried no rows at all (a server that predates them). When the usage fetch failed and the CLI fell back to rate-limit response headers, this holds at most the one row it synthesizes from them (the overage-included weekly window, shaped like the server's), or null when the headers carried none.
5793
+ */
5794
+ limits: {
5795
+ /**
5796
+ * The server's meter kind, e.g. 'session', 'weekly_all' or 'weekly_scoped'. Classify a row on this, never on a label.
5797
+ */
5798
+ kind: string;
5799
+ /**
5800
+ * The server's row group, e.g. 'session' or 'weekly'; rows render grouped under it, in the server's order.
5801
+ */
5802
+ group: string;
5803
+ /**
5804
+ * Share of the window used, 0-100.
5805
+ */
5806
+ percent: number;
5807
+ /**
5808
+ * ISO 8601 timestamp when the window resets.
5809
+ */
5810
+ resets_at: string | null;
5811
+ /**
5812
+ * What a scoped row is for, a model or a surface, with the server's display label.
5813
+ */
5814
+ scope?: {
5815
+ model?: {
5816
+ display_name: string;
5817
+ } | null;
5818
+ surface?: {
5819
+ display_name: string;
5820
+ } | null;
5821
+ } | null;
5822
+ /**
5823
+ * The server's reading of the row for a meter's colour, e.g. 'normal', 'warning' or 'critical'; a client falls back to its own thresholds without it.
5824
+ */
5825
+ severity?: string | null;
5826
+ /**
5827
+ * The server's headline pick: the row a single-value indicator shows.
5828
+ */
5829
+ is_active?: boolean | null;
5830
+ }[] | null;
5831
+ /**
5832
+ * Extra-usage (overage) spend for the billing period, when the plan has it. Amounts are in minor units of `currency` (cents for USD); is_enabled is false while extra usage cannot cover sends.
5833
+ */
5834
+ extra_usage?: {
5835
+ is_enabled: boolean;
5836
+ monthly_limit: number | null;
5837
+ used_credits: number | null;
5838
+ utilization: number | null;
5839
+ currency?: string | null;
5840
+ } | null;
5841
+ } | null;
5842
+ };
5843
+
5708
5844
  /**
5709
5845
  * A user-role message. A client writes one to the CLI to submit a prompt (this starts a turn); the CLI emits them for user-role content it adds to the conversation itself, chiefly the tool_result blocks answering the assistant's tool_use blocks.
5710
5846
  */
@@ -6845,7 +6981,7 @@ export declare interface Settings {
6845
6981
  */
6846
6982
  sparsePaths?: string[];
6847
6983
  /**
6848
- * Skip Git LFS smudge during clone and update (sets GIT_LFS_SKIP_SMUDGE=1) so LFS pointer files stay as pointers instead of downloading their content. Use for marketplaces hosted in repos with large LFS objects.
6984
+ * Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
6849
6985
  */
6850
6986
  skipLfs?: boolean;
6851
6987
  } | {
@@ -6867,7 +7003,7 @@ export declare interface Settings {
6867
7003
  */
6868
7004
  sparsePaths?: string[];
6869
7005
  /**
6870
- * Skip Git LFS smudge during clone and update (sets GIT_LFS_SKIP_SMUDGE=1) so LFS pointer files stay as pointers instead of downloading their content. Use for marketplaces hosted in repos with large LFS objects.
7006
+ * Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
6871
7007
  */
6872
7008
  skipLfs?: boolean;
6873
7009
  } | {
@@ -7089,7 +7225,7 @@ export declare interface Settings {
7089
7225
  */
7090
7226
  sparsePaths?: string[];
7091
7227
  /**
7092
- * Skip Git LFS smudge during clone and update (sets GIT_LFS_SKIP_SMUDGE=1) so LFS pointer files stay as pointers instead of downloading their content. Use for marketplaces hosted in repos with large LFS objects.
7228
+ * Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
7093
7229
  */
7094
7230
  skipLfs?: boolean;
7095
7231
  } | {
@@ -7111,7 +7247,7 @@ export declare interface Settings {
7111
7247
  */
7112
7248
  sparsePaths?: string[];
7113
7249
  /**
7114
- * Skip Git LFS smudge during clone and update (sets GIT_LFS_SKIP_SMUDGE=1) so LFS pointer files stay as pointers instead of downloading their content. Use for marketplaces hosted in repos with large LFS objects.
7250
+ * Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
7115
7251
  */
7116
7252
  skipLfs?: boolean;
7117
7253
  } | {
@@ -7328,7 +7464,7 @@ export declare interface Settings {
7328
7464
  */
7329
7465
  sparsePaths?: string[];
7330
7466
  /**
7331
- * Skip Git LFS smudge during clone and update (sets GIT_LFS_SKIP_SMUDGE=1) so LFS pointer files stay as pointers instead of downloading their content. Use for marketplaces hosted in repos with large LFS objects.
7467
+ * Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
7332
7468
  */
7333
7469
  skipLfs?: boolean;
7334
7470
  } | {
@@ -7350,7 +7486,7 @@ export declare interface Settings {
7350
7486
  */
7351
7487
  sparsePaths?: string[];
7352
7488
  /**
7353
- * Skip Git LFS smudge during clone and update (sets GIT_LFS_SKIP_SMUDGE=1) so LFS pointer files stay as pointers instead of downloading their content. Use for marketplaces hosted in repos with large LFS objects.
7489
+ * Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
7354
7490
  */
7355
7491
  skipLfs?: boolean;
7356
7492
  } | {
@@ -7557,7 +7693,7 @@ export declare interface Settings {
7557
7693
  */
7558
7694
  sparsePaths?: string[];
7559
7695
  /**
7560
- * Skip Git LFS smudge during clone and update (sets GIT_LFS_SKIP_SMUDGE=1) so LFS pointer files stay as pointers instead of downloading their content. Use for marketplaces hosted in repos with large LFS objects.
7696
+ * Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
7561
7697
  */
7562
7698
  skipLfs?: boolean;
7563
7699
  } | {
@@ -7579,7 +7715,7 @@ export declare interface Settings {
7579
7715
  */
7580
7716
  sparsePaths?: string[];
7581
7717
  /**
7582
- * Skip Git LFS smudge during clone and update (sets GIT_LFS_SKIP_SMUDGE=1) so LFS pointer files stay as pointers instead of downloading their content. Use for marketplaces hosted in repos with large LFS objects.
7718
+ * Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
7583
7719
  */
7584
7720
  skipLfs?: boolean;
7585
7721
  } | {
@@ -7786,7 +7922,7 @@ export declare interface Settings {
7786
7922
  */
7787
7923
  sparsePaths?: string[];
7788
7924
  /**
7789
- * Skip Git LFS smudge during clone and update (sets GIT_LFS_SKIP_SMUDGE=1) so LFS pointer files stay as pointers instead of downloading their content. Use for marketplaces hosted in repos with large LFS objects.
7925
+ * Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
7790
7926
  */
7791
7927
  skipLfs?: boolean;
7792
7928
  } | {
@@ -7808,7 +7944,7 @@ export declare interface Settings {
7808
7944
  */
7809
7945
  sparsePaths?: string[];
7810
7946
  /**
7811
- * Skip Git LFS smudge during clone and update (sets GIT_LFS_SKIP_SMUDGE=1) so LFS pointer files stay as pointers instead of downloading their content. Use for marketplaces hosted in repos with large LFS objects.
7947
+ * Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.
7812
7948
  */
7813
7949
  skipLfs?: boolean;
7814
7950
  } | {