@anthropic-ai/claude-agent-sdk 0.3.316 → 0.3.317

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.316",
2
+ "version": "2.1.317",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "cd7ceb459c6864567b16a11f60101b24421475c1",
5
- "buildDate": "2026-10-30T23:47:48Z",
4
+ "commit": "3d3e7cb16b5577dccaee9520c8dc1189d02d61b7",
5
+ "buildDate": "2026-11-02T22:39:48Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude",
9
- "checksum": "64c327e92b2c5e0f78c0a980c5a518121e1f0d140ca771ca5dd4488d1a2dcb3f",
10
- "size": 310114176
9
+ "checksum": "09f153b46b5df9e8b3454716d682a91901de020cbca630f61dec1a015b32b5e9",
10
+ "size": 312806400
11
11
  },
12
12
  "darwin-x64": {
13
13
  "binary": "claude",
14
- "checksum": "203d22fbafdab9f6b0cda962ec573e32ab970894c63b1dfb0409378f28b9c344",
15
- "size": 324381312
14
+ "checksum": "01c714bc7febdb008f28e3f6facb1dc37e46a4d8fa8db58df2e281ee51cb333c",
15
+ "size": 327105808
16
16
  },
17
17
  "linux-arm64": {
18
18
  "binary": "claude",
19
- "checksum": "55cdb8e162d190432696ea54010e0fca2e18d06fa7a7127fd563b9ffd4f22624",
20
- "size": 328459544
19
+ "checksum": "563a0d60ad0c223d9415768210997acb0f7134ea51dc3c238e88bc2e18ddeefa",
20
+ "size": 331212056
21
21
  },
22
22
  "linux-x64": {
23
23
  "binary": "claude",
24
- "checksum": "fd13c70000fec3f2116dfbcbb6121210b4a29328bf0e46210a59dd594a67d824",
25
- "size": 328262000
24
+ "checksum": "eb224419e344575faa4a1f39b290b649425a10cd5ee2ef1d003480cd9ae57eb0",
25
+ "size": 331362672
26
26
  },
27
27
  "linux-arm64-musl": {
28
28
  "binary": "claude",
29
- "checksum": "d774cb39055cff62af476af32702f1fc4f888a7e395a37434a95d6f5a98818a0",
30
- "size": 311914480
29
+ "checksum": "dc8c59cf937e60e9cc93afe226ef437474ded56ba813743d09106d24a08c83bd",
30
+ "size": 314667040
31
31
  },
32
32
  "linux-x64-musl": {
33
33
  "binary": "claude",
34
- "checksum": "8bc3d015479b8b87dfde3f69f9bdb96c658758a8eb31892fd8fbece8d8a08bcf",
35
- "size": 314779944
34
+ "checksum": "bcc2be9105875dc31a44825ede92e46c4f98225eeb3ad617340daa217100339b",
35
+ "size": 317499744
36
36
  },
37
37
  "win32-x64": {
38
38
  "binary": "claude.exe",
39
- "checksum": "e896a9d8da519353a49bf69ca4a695ba7e09067752687c675b3969041e632d52",
40
- "size": 335469216
39
+ "checksum": "26b01ec22df2c17ac7f5703aa547d36706e8d58412136ced0344a8ced4d86038",
40
+ "size": 338187936
41
41
  },
42
42
  "win32-arm64": {
43
43
  "binary": "claude.exe",
44
- "checksum": "a44168f2360bf21709855321b25f1eeb021de8a8d4be5d25a8b397dcbf9043f8",
45
- "size": 315967648
44
+ "checksum": "085bb0c34803276156b44dc529a0ad55bf74e2d2c5baaade620194b72cb27f16",
45
+ "size": 318687392
46
46
  }
47
47
  },
48
48
  "sdkCompat": {
49
49
  "testedWrapperVersions": [
50
- "0.3.283",
51
50
  "0.3.284",
52
51
  "0.3.285",
53
52
  "0.3.286",
package/manifest.zst.json CHANGED
@@ -1,61 +1,60 @@
1
1
  {
2
- "version": "2.1.316",
2
+ "version": "2.1.317",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "cd7ceb459c6864567b16a11f60101b24421475c1",
5
- "buildDate": "2026-10-30T23:49:32Z",
4
+ "commit": "3d3e7cb16b5577dccaee9520c8dc1189d02d61b7",
5
+ "buildDate": "2026-11-02T22:41:52Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude.zst",
9
- "checksum": "e43d57df0ce383e084b22f1d4fb7be6e0bdb1d40b4ceb042f3cfba96d5ec468f",
10
- "size": 106990783,
9
+ "checksum": "f2e220b0994b475e86d96b44a649252d75e083e505a228f2ff0c0fc266481595",
10
+ "size": 107811821,
11
11
  "bundle": {
12
- "checksum": "a7a1259e670213d54908d0a86e933e22d6f183b4a97b8535247e9eaac0e588ea",
13
- "size": 106996138
12
+ "checksum": "91184d3d9ba3abb060a7c46a1f6fbaa80af1c3e6f2e94539a90fa68790772661",
13
+ "size": 107815075
14
14
  }
15
15
  },
16
16
  "darwin-x64": {
17
17
  "binary": "claude.zst",
18
- "checksum": "df7365b5c8019682aa8cf5e66b5547e9fa4980bc74ed64dbac4c1eb45ef228e5",
19
- "size": 113964923,
18
+ "checksum": "800df9423d5d943779796e184ee30e7d3ca292bb6c2e9952c689e539cab85938",
19
+ "size": 114808717,
20
20
  "bundle": {
21
- "checksum": "e0adb0f83a30c29ec48bd3840c6de9810714892f40bd3fd5d499e014fa4bb309",
22
- "size": 113970215
21
+ "checksum": "534c07a0b5d959d30febba6e65888751bae349daea247355d3b76196bc3f85a3",
22
+ "size": 114804034
23
23
  }
24
24
  },
25
25
  "linux-arm64": {
26
26
  "binary": "claude.zst",
27
- "checksum": "d4ed34a7ecd889497fccc0951c869867b2369196804e3d83b8e486d424b973e1",
28
- "size": 117001734
27
+ "checksum": "f6279f0c17270c20f47bdd71ef2d5408a53c4dba978c9e805aadac4232f3ea51",
28
+ "size": 118199636
29
29
  },
30
30
  "linux-x64": {
31
31
  "binary": "claude.zst",
32
- "checksum": "4108764100675c0773d98011d5091f427f30eebfc567aa9f1b5f4d9a54630a10",
33
- "size": 118793137
32
+ "checksum": "cd557f900744b6aa1a554f7fd3f64788680d93f396eb760590414db4c6d53ccb",
33
+ "size": 120473834
34
34
  },
35
35
  "linux-arm64-musl": {
36
36
  "binary": "claude.zst",
37
- "checksum": "de9af064a067f4c2944c65751f76b671c1228465c271a8e1773ac65598ca04cc",
38
- "size": 112468657
37
+ "checksum": "24cf2f4e90958aca3f3e044652a9199f019ad802fd326f191425bfe0079f9754",
38
+ "size": 113295642
39
39
  },
40
40
  "linux-x64-musl": {
41
41
  "binary": "claude.zst",
42
- "checksum": "113294cd5db89a1a8b94406622cbe2b663a7c922a43b2e0d44bfd7d93d931438",
43
- "size": 113886207
42
+ "checksum": "fb79d8526c880824f39e44172de22f53a780521453a136ba2560e586813e922b",
43
+ "size": 114717791
44
44
  },
45
45
  "win32-x64": {
46
46
  "binary": "claude.exe.zst",
47
- "checksum": "26af66d4fa70e980047d54c85140579de0271d79a9257ac467f90a0ecdca528d",
48
- "size": 122064664
47
+ "checksum": "a33aa5518497dda9dca73d465d77da3fb56de5373350ff734ec20e88464efa17",
48
+ "size": 122895826
49
49
  },
50
50
  "win32-arm64": {
51
51
  "binary": "claude.exe.zst",
52
- "checksum": "fc420bf59ecf1f27bdf8aff5d06dc6ed01187f6ada3f71411ce45ce392f210fb",
53
- "size": 115553923
52
+ "checksum": "de47e3460753c87942eab9a14ba3cd38b871403c6e79e420b8b7fa3ed5619a7f",
53
+ "size": 116385677
54
54
  }
55
55
  },
56
56
  "sdkCompat": {
57
57
  "testedWrapperVersions": [
58
- "0.3.283",
59
58
  "0.3.284",
60
59
  "0.3.285",
61
60
  "0.3.286",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.316",
3
+ "version": "0.3.317",
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.316",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.316",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.316",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.316",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.316",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.316",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.316",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.316"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.317",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.317",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.317",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.317",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.317",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.317",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.317",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.317"
72
72
  },
73
73
  "files": [
74
74
  "sdk.mjs",
@@ -85,10 +85,10 @@
85
85
  "extractFromBunfs.d.ts",
86
86
  "manifest.json",
87
87
  "manifest.zst.json",
88
- "core-07pvccxf.mjs",
89
- "core-0rjxgk9e.mjs",
90
- "core-fpeb751h.mjs",
91
- "core-jf0rbr11.mjs"
88
+ "core-b5t19jrj.mjs",
89
+ "core-j104cwjy.mjs",
90
+ "core-kpjpwfwz.mjs",
91
+ "core-q7fanba0.mjs"
92
92
  ],
93
- "claudeCodeVersion": "2.1.316"
93
+ "claudeCodeVersion": "2.1.317"
94
94
  }
package/sdk-tools.d.ts CHANGED
@@ -352,19 +352,6 @@ export type FileReadOutput =
352
352
  */
353
353
  error?: string;
354
354
  }[];
355
- }
356
- | {
357
- type: "file_unchanged";
358
- file: {
359
- /**
360
- * The path to the file
361
- */
362
- filePath: string;
363
- };
364
- /**
365
- * Set when the dedup matched a startup-seeded entry (CLAUDE.md / nested memory) rather than a prior Read tool_result
366
- */
367
- source?: "seeded";
368
355
  };
369
356
  export type ListMcpResourcesOutput = {
370
357
  /**
@@ -473,6 +460,7 @@ export type ArtifactOutput =
473
460
  truncated?: boolean;
474
461
  total?: number;
475
462
  total_at_least?: true;
463
+ next_page_token?: string;
476
464
  pins_enabled?: boolean;
477
465
  scope?: "shared" | "all";
478
466
  external_listed?: true;
@@ -3161,7 +3149,7 @@ export interface ProposeGoalInput {
3161
3149
  }
3162
3150
  export interface ArtifactInput {
3163
3151
  /**
3164
- * 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 someone else owns, 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` (or `file_paths` for several in one call). '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. 'pin' adds the artifact at `url` to the user's pinned list in their claude.ai sidebar and 'unpin' removes it (nothing else may accompany either) — private to the user, reversible, and no change to who can see the artifact.
3152
+ * Omit (or 'publish') to publish file_path. 'list' enumerates artifacts — the user's own by default, see `scope`; only `limit`, `scope` and `page_token` 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 someone else owns, 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` (or `file_paths` for several in one call). '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. 'pin' adds the artifact at `url` to the user's pinned list in their claude.ai sidebar and 'unpin' removes it (nothing else may accompany either) — private to the user, reversible, and no change to who can see the artifact.
3165
3153
  */
3166
3154
  action?:
3167
3155
  | "publish"
@@ -3193,6 +3181,10 @@ export interface ArtifactInput {
3193
3181
  * list only: maximum artifacts to return (default 25).
3194
3182
  */
3195
3183
  limit?: number;
3184
+ /**
3185
+ * list only: the `next_page_token` a listing of the same scope gave, to list the artifacts after it.
3186
+ */
3187
+ page_token?: string;
3196
3188
  /**
3197
3189
  * list only: 'mine' (default) lists artifacts the user owns; 'shared' lists artifacts other people shared with the user; 'all' lists both. Rows are labeled (mine)/(shared) whenever scope is not 'mine'.
3198
3190
  */
@@ -3544,6 +3536,10 @@ export interface GlobOutput {
3544
3536
  * Whether totalMatches is the exact total (true) or a floor because the underlying search truncated its own output (false). Absent on results persisted by CLI versions predating this field.
3545
3537
  */
3546
3538
  countIsComplete?: boolean;
3539
+ /**
3540
+ * True when the time limit stopped the search after these paths were read, so more matches may exist. Absent otherwise.
3541
+ */
3542
+ timedOut?: boolean;
3547
3543
  }
3548
3544
  export interface GrepOutput {
3549
3545
  mode?: "content" | "files_with_matches" | "count";
@@ -3556,6 +3552,7 @@ export interface GrepOutput {
3556
3552
  totalLines?: number;
3557
3553
  appliedLimit?: number;
3558
3554
  appliedOffset?: number;
3555
+ timedOut?: boolean;
3559
3556
  }
3560
3557
  export interface TaskStopOutput {
3561
3558
  /**
@@ -4017,6 +4014,10 @@ export interface TaskCreateOutput {
4017
4014
  task: {
4018
4015
  id: string;
4019
4016
  subject: string;
4017
+ /**
4018
+ * The task's description as saved. It can differ from the tool_use input if Claude Code corrects a malformed call or a PreToolUse hook changes the input. Absent in results from older Claude Code versions.
4019
+ */
4020
+ description?: string;
4020
4021
  };
4021
4022
  }
4022
4023
  export interface TaskGetOutput {
package/sdk.d.ts CHANGED
@@ -284,8 +284,8 @@ export declare type CanUseTool = (toolName: string, input: Record<string, unknow
284
284
  */
285
285
  defaultToNo?: boolean;
286
286
  /**
287
- * The ask must not offer a persistent "don't ask again" choice: the
288
- * rule it would write grants more than this ask's own action.
287
+ * The ask must not offer a persistent "don't ask again" choice: its rule
288
+ * grants more than this ask's action, or a plugin started this call.
289
289
  */
290
290
  suppressAlwaysAllowRule?: boolean;
291
291
  /**
@@ -579,6 +579,7 @@ declare namespace coreTypes {
579
579
  SDKResultSuccess,
580
580
  SDKSessionInfo,
581
581
  SDKSessionStateChangedMessage,
582
+ SDKSessionWritesLostMessage,
582
583
  SDKSettingsParseError,
583
584
  SDKStartupFailureReason,
584
585
  SDKStatusMessage,
@@ -1005,6 +1006,17 @@ export declare interface HookCallbackMatcher {
1005
1006
  hooks: HookCallback[];
1006
1007
  /** Timeout in seconds for all hooks in this matcher */
1007
1008
  timeout?: number;
1009
+ /**
1010
+ * What a failure of these hooks does: one throws, or returns output that
1011
+ * fails validation. `'continue'` (default): the failure is reported in a
1012
+ * warning message and the action goes ahead. `'block'`: the action the event
1013
+ * guards (a tool call, a permission request, a prompt) is blocked. Ignored on
1014
+ * Stop, SubagentStop, TaskCompleted and TeammateIdle. With `'block'`, the
1015
+ * query fails at startup on a Claude Code that does not support the option
1016
+ * and on a session already running that did not register these hooks, and
1017
+ * the first prompt is sent only once those checks have passed.
1018
+ */
1019
+ onFailure?: 'continue' | 'block';
1008
1020
  }
1009
1021
 
1010
1022
  export declare type HookEvent = 'PreToolUse' | 'PostToolUse' | 'PostToolUseFailure' | 'PostToolBatch' | 'Notification' | 'UserPromptSubmit' | 'UserPromptExpansion' | 'SessionStart' | 'SessionEnd' | 'Stop' | 'StopFailure' | 'SubagentStart' | 'SubagentStop' | 'PreCompact' | 'PostCompact' | 'PreModelSwitch' | 'PostModelSwitch' | 'PermissionRequest' | 'PermissionDenied' | 'Setup' | 'TeammateIdle' | 'TaskCreated' | 'TaskCompleted' | 'Elicitation' | 'ElicitationResult' | 'ConfigChange' | 'WorktreeCreate' | 'WorktreeRemove' | 'InstructionsLoaded' | 'CwdChanged' | 'FileChanged' | 'DirectoryAdded' | 'MessageDisplay';
@@ -1226,6 +1238,7 @@ export declare type McpHttpServerConfig = {
1226
1238
  */
1227
1239
  timeout?: number;
1228
1240
 
1241
+
1229
1242
  /**
1230
1243
  * When true, all tools from this server are always included in the prompt and never deferred behind tool search, except a tool the server itself lists with _meta anthropic/alwaysLoad set to false. Equivalent to setting defer_loading: false on the API. When false, all tools from this server are deferred behind tool search. Default: tools are deferred when tool search is enabled. As a side effect, true also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1231
1244
  */
@@ -1331,6 +1344,7 @@ export declare type McpServerStatus = {
1331
1344
  _meta?: Record<string, unknown>;
1332
1345
  }[];
1333
1346
 
1347
+
1334
1348
  };
1335
1349
 
1336
1350
  export declare type McpServerStatusConfig = McpServerConfigForProcessTransport | McpClaudeAIProxyServerConfig;
@@ -1375,6 +1389,7 @@ export declare type McpSSEServerConfig = {
1375
1389
  */
1376
1390
  timeout?: number;
1377
1391
 
1392
+
1378
1393
  /**
1379
1394
  * When true, all tools from this server are always included in the prompt and never deferred behind tool search, except a tool the server itself lists with _meta anthropic/alwaysLoad set to false. Equivalent to setting defer_loading: false on the API. When false, all tools from this server are deferred behind tool search. Default: tools are deferred when tool search is enabled. As a side effect, true also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1380
1395
  */
@@ -3291,16 +3306,20 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
3291
3306
  * are managed by the CLI subprocess.
3292
3307
  *
3293
3308
  * Note: This only affects servers added dynamically via this method or the SDK.
3294
- * Servers configured via settings files are not affected. Servers introduced
3295
- * by plugins are also exempt: they are managed by the plugin system, so
3296
- * omitting them from the payload does NOT remove them — they keep running
3297
- * (unless enterprise policy denies the server) and are simply absent from
3298
- * the result's `removed` list. In particular, `setMcpServers({})` no longer
3299
- * guarantees a session has zero dynamic MCP surface when plugins are
3300
- * loaded. Naming a plugin server explicitly in the payload still replaces
3301
- * it (ownership is preserved CLI-side).
3302
- *
3303
- * @param servers - Record of server name to configuration. Pass an empty object to remove all dynamic servers (except plugin-owned ones, which are retained).
3309
+ * Servers configured via settings files are not affected. A `.mcp.json` or
3310
+ * local-scope server of the session's current folder stays up when omitted,
3311
+ * unless enterprise policy denies it; once a payload has named such a server
3312
+ * it is the host's, and a later payload that omits it removes it. Servers
3313
+ * introduced by plugins are also exempt: they are managed by the plugin
3314
+ * system, so omitting them from the payload does NOT remove them — they keep
3315
+ * running (unless enterprise policy denies the server) and are simply absent
3316
+ * from the result's `removed` list. In particular, `setMcpServers({})` no
3317
+ * longer guarantees a session has zero dynamic MCP surface when plugins are
3318
+ * loaded or its current folder has such servers. Naming a plugin server
3319
+ * explicitly in the payload still replaces it (ownership is preserved
3320
+ * CLI-side).
3321
+ *
3322
+ * @param servers - Record of server name to configuration. Pass an empty object to remove all dynamic servers (except plugin-owned ones and those of the session's current folder, which are retained as above).
3304
3323
  * @returns Information about which servers were added, removed, and any connection errors
3305
3324
  */
3306
3325
  setMcpServers(servers: Record<string, McpServerConfig>): Promise<McpSetServersResult>;
@@ -4800,6 +4819,10 @@ export declare type SDKControlInitializeResponse = {
4800
4819
  * Whether the `hooks` this initialize carried were registered: true on a session's first initialize, and on a repeated initialize from the process that owns the CLI's stdin (its set replaces the one registered earlier); false when a repeated initialize's hooks were ignored (a client joining a remote session another client configured). Absent when the request carried no hooks, and on CLIs that predate the field — those ignored `hooks` on every repeated initialize.
4801
4820
  */
4802
4821
  hooks_applied?: boolean;
4822
+ /**
4823
+ * True on every initialize reply from a CLI that honors `onFailure` on hook matchers. Absent on CLIs that predate the option, which ignore it (a failed callback set to "block" lets the action run), and from responders that do not run the host's hooks. A host that sets "block" must not go on without it; the TypeScript SDK refuses the session. It says nothing of this request's hooks: `hooks_applied` does, and the TypeScript SDK also refuses a first initialize that reads `hooks_applied: false` when a matcher sets "block".
4824
+ */
4825
+ hook_on_failure_supported?: boolean;
4803
4826
 
4804
4827
  /**
4805
4828
  * Whether every plugin this initialize listed is loaded: true when each one is among the plugins the process loaded at launch (from `plugins` under --await-initialize, or from --plugin-dir), so a re-sent initialize naming the launch set also reads true; false otherwise. The `plugins` field never loads anything after launch. Absent when the request listed no plugins, and on CLIs that predate the field (those never read `plugins`).
@@ -4960,7 +4983,7 @@ declare type SDKControlMcpMessageRequest = {
4960
4983
  };
4961
4984
 
4962
4985
  /**
4963
- * Reads one MCP Apps (SEP-1865) UI resource — a `ui://` URI, typically the `_meta.ui.resourceUri` a tool declares — from a connected MCP server the CLI itself dialed, with `resources/read`, for a host that renders it. Read-only and no model turn. The reply is untrusted third-party content (HTML): render it sandboxed. SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can read them directly. Errors name the cause: a non-ui:// URI, an unknown server, a server that managed policy blocks, that is disabled or that the project has not approved (the refusals mcp_reconnect gives), a server that is not connected (failed, pending or needs-auth: send mcp_reconnect; a connected server, or one still listed from the discovery cache, is read through the same connect path a tool call takes), a response over the size limit, or the server's own resources/read error. Refused on a lane that redacts what it persists (a Remote Control bridge worker, a tenant worker) and by the client of a cloud-hosted session. Advertised as `mcp_read_resource_v1` in system/init.capabilities.
4986
+ * Reads one MCP Apps (SEP-1865) UI resource — a `ui://` URI, typically the `_meta.ui.resourceUri` a tool declares — from a connected MCP server the CLI itself dialed, with `resources/read`, for a host that renders it. Read-only and no model turn. The reply is untrusted third-party content (HTML): render it sandboxed. SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can read them directly. Errors name the cause: a non-ui:// URI, an unknown server, a server that managed policy blocks, that is disabled or that the project has not approved (the refusals mcp_reconnect gives), a server that is not connected (failed, pending or needs-auth: send mcp_reconnect; a connected server, or one still listed from the discovery cache, is read through the same connect path a tool call takes), a response over the size limit, or the server's own resources/read error (over a transport that stores frames, one fixed sentence in its place). Refused on a lane that redacts what it persists (a Remote Control bridge worker, a tenant worker) and by the client of a cloud-hosted session. Advertised as `mcp_read_resource_v1` in system/init.capabilities.
4964
4987
  */
4965
4988
  declare type SDKControlMcpReadResourceRequest = {
4966
4989
  subtype: 'mcp_read_resource';
@@ -5018,7 +5041,7 @@ declare type SDKControlMcpSetServersRequest = {
5018
5041
  declare type SDKControlMcpStatusRequest = {
5019
5042
  subtype: 'mcp_status';
5020
5043
  /**
5021
- * When true and the CLI writes to the session through CCR (a cloud session's worker, or a Remote Control worker), the success reply is published only to the clients attached at that moment, as a control_response marked live_only: true on the session's unsequenced event stream, and is not stored with the session's events; on a cloud session's worker its rows embed each server's configuration (URLs, headers, OAuth settings). Set it only if your client reads control_response frames from that stream; a reply sent while its stream is down is lost and the request must be sent again, and a reply over the live size limit comes back as a live error instead. Error replies other than that size-limit error, and every reply from hosts that do not send live replies (stdio hosts, and CLIs older than this field), are ordinary stored replies, so a client that sets it must accept either.
5044
+ * When true and the CLI writes to the session through CCR (a cloud session's worker, or a Remote Control worker), the success reply is published only to the clients attached at that moment, as a control_response marked live_only: true on the session's unsequenced event stream, and is not stored with the session's events; a cloud session's worker that does not advertise `mcp_status_no_config_v1` embeds each server's configuration (URLs, headers, OAuth settings) in its rows. Set it only if your client reads control_response frames from that stream; a reply sent while its stream is down is lost and the request must be sent again; a reply too large to send in full leaves out each server's `tools`, `serverInfo` and `capabilities` and sends only how many tools it has, and one still over the live size limit comes back as a live error instead. Error replies other than that size-limit error, and every reply from hosts that do not send live replies (stdio hosts, and CLIs older than this field), are ordinary stored replies, so a client that sets it must accept either.
5022
5045
  */
5023
5046
  liveReply?: boolean;
5024
5047
  };
@@ -5061,7 +5084,7 @@ declare type SDKControlPermissionRequest = {
5061
5084
  */
5062
5085
  classifier_approvable?: boolean;
5063
5086
  /**
5064
- * True when the dialog must not offer the persistent "don't ask again" row for this ask: accepting it would write a whole-tool allow rule broader than the ask's own verb (PermissionAskDecision.suppressAlwaysAllowRule). Hosts rendering approve options should omit any persistent-rule affordance when set.
5087
+ * True when the dialog must not offer the persistent "don't ask again" row for this ask: accepting it would write a whole-tool allow rule broader than the ask's own verb (PermissionAskDecision.suppressAlwaysAllowRule), or the ask comes from a run a plugin started, where Claude Code saves no rule from the answer, not even for the session. Hosts rendering approve options should omit any persistent-rule affordance when set.
5065
5088
  */
5066
5089
  suppress_always_allow_rule?: boolean;
5067
5090
  /**
@@ -5107,6 +5130,7 @@ export declare type SDKControlPermissionRulesState = {
5107
5130
  * True when enterprise managed settings pin allowManagedPermissionRulesOnly: the session applies policy rules only, and rules from other settings files appear with notInEffect set.
5108
5131
  */
5109
5132
  managedOnly: boolean;
5133
+
5110
5134
  /**
5111
5135
  * Settings parse and validation errors, as get_settings reports them. When non-empty, the listed files were skipped — their rules are not in the session and not listed above.
5112
5136
  */
@@ -5138,6 +5162,10 @@ export declare type SDKControlReadFileResponse = {
5138
5162
  * Set when the request asked for base64. Absent means utf-8 — including when an older CLI ignored the request's encoding field.
5139
5163
  */
5140
5164
  encoding?: 'base64';
5165
+ /**
5166
+ * Present on every utf-8 answer. True when the bytes read were not all valid UTF-8, so `contents` has U+FFFD where bytes were replaced and is not the file's own text: a binary file, text in another encoding, or a read cut inside a character when `truncated` is set. False when `contents` is exactly the bytes read, decoded, even if the file itself contains U+FFFD. Absent on a base64 answer, which is exact, and from an older CLI or tool container: a client that sees neither this nor `encoding: 'base64'` cannot tell whether `contents` is exact.
5167
+ */
5168
+ lossy?: boolean;
5141
5169
 
5142
5170
  };
5143
5171
 
@@ -5451,6 +5479,10 @@ declare type SDKHookCallbackMatcher = {
5451
5479
  */
5452
5480
  hookCallbackIds: string[];
5453
5481
  timeout?: number;
5482
+ /**
5483
+ * What a failure of these callbacks does: the client answered the hook_callback request with an error, or with an answer that fails validation. 'continue' (default): the failure is reported and the action goes ahead. 'block': the failure counts as a block, as it does for a command hook, so the action the event guards (a tool call, a permission request, a prompt) is blocked. Ignored on Stop, SubagentStop, TaskCompleted and TeammateIdle.
5484
+ */
5485
+ onFailure?: 'continue' | 'block';
5454
5486
  };
5455
5487
 
5456
5488
  /**
@@ -5527,6 +5559,7 @@ export declare type SDKInformationalMessage = {
5527
5559
  */
5528
5560
  tag?: string;
5529
5561
 
5562
+
5530
5563
  uuid: UUID;
5531
5564
  session_id: string;
5532
5565
  };
@@ -5601,7 +5634,7 @@ export declare type SDKMemoryRecallMessage = {
5601
5634
  /**
5602
5635
  * Every conversational and informational message the CLI emits on its output stream, discriminated by type (and subtype for system/result messages). Consumers should ignore types and subtypes they do not recognize: the set grows over time.
5603
5636
  */
5604
- export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKControlRequestProgressMessage | SDKModelRefusalFallbackMessage | SDKModelRefusalNoFallbackMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKBackgroundTasksChangedMessage | SDKThinkingTokensMessage | SDKSessionStateChangedMessage | SDKWorkerShuttingDownMessage | SDKCommandsChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage | SDKInformationalMessage | SDKConversationResetMessage;
5637
+ export declare type SDKMessage = SDKAssistantMessage | SDKUserMessage | SDKUserMessageReplay | SDKResultMessage | SDKSystemMessage | SDKPartialAssistantMessage | SDKCompactBoundaryMessage | SDKStatusMessage | SDKAPIRetryMessage | SDKControlRequestProgressMessage | SDKModelRefusalFallbackMessage | SDKModelRefusalNoFallbackMessage | SDKLocalCommandOutputMessage | SDKHookStartedMessage | SDKHookProgressMessage | SDKHookResponseMessage | SDKPluginInstallMessage | SDKToolProgressMessage | SDKAuthStatusMessage | SDKTaskNotificationMessage | SDKTaskStartedMessage | SDKTaskUpdatedMessage | SDKTaskProgressMessage | SDKBackgroundTasksChangedMessage | SDKThinkingTokensMessage | SDKSessionStateChangedMessage | SDKWorkerShuttingDownMessage | SDKCommandsChangedMessage | SDKNotificationMessage | SDKFilesPersistedEvent | SDKToolUseSummaryMessage | SDKMemoryRecallMessage | SDKRateLimitEvent | SDKElicitationCompleteMessage | SDKPermissionDeniedMessage | SDKPromptSuggestionMessage | SDKMirrorErrorMessage | SDKInformationalMessage | SDKConversationResetMessage | SDKSessionWritesLostMessage;
5605
5638
 
5606
5639
  /**
5607
5640
  * Provenance of a user-role message (peer session, team lead, channel). A host wrapping keyboard input must stamp {kind:'human'} explicitly — absent origin is treated as unattributed and fails closed at strict isHuman() trust gates.
@@ -5714,6 +5747,7 @@ export declare type SDKModelRefusalFallbackMessage = {
5714
5747
  * stop_details.explanation from the refused API response (client lane only — the server-lane trigger carries no explanation). Unstable human prose — display only, never parse. null/absent when the response carried none, and always null on server-lane banners.
5715
5748
  */
5716
5749
  api_refusal_explanation?: string | null;
5750
+
5717
5751
  /**
5718
5752
  * Wire uuids of the messages this fallback retracted — the refused partial as the consumer received it (one uuid per normalized SDK message; multi-block messages carry per-block derived uuids) plus any tombstoned tool_results. Emitted AFTER the retraction, so this is a resolution-time eviction signal: remove these messages from transcript state on receipt. Eviction is idempotent — unknown or already-removed uuids are a no-op. Absent when emitted by an older CLI.
5719
5753
  */
@@ -6051,6 +6085,10 @@ export declare type SDKResultSuccess = {
6051
6085
 
6052
6086
 
6053
6087
 
6088
+
6089
+
6090
+
6091
+
6054
6092
 
6055
6093
 
6056
6094
 
@@ -6189,6 +6227,28 @@ export declare type SDKSessionStateChangedMessage = {
6189
6227
  session_id: string;
6190
6228
  };
6191
6229
 
6230
+ /**
6231
+ * The CLI could not save lines of a session transcript, changes to ~/.claude.json, or both, because the disk was full or its quota was used up. Sent at most once, as the CLI exits, after the last result if there was one. The results already received stand, and this message does not change the exit status. As on every message, session_id is the session the CLI is in; transcript_session_ids says whose transcript lost lines. Sent only with stream-json output on stdout, never under --sdk-url or a Claude Desktop entrypoint. Safe to ignore.
6232
+ */
6233
+ export declare type SDKSessionWritesLostMessage = {
6234
+ type: 'system';
6235
+ subtype: 'session_writes_lost';
6236
+ /**
6237
+ * Why the writes failed. 'ENOSPC': the disk was full. 'EDQUOT': the disk quota was used up. When both kinds of write were lost for different reasons, the transcript's. More codes may be added.
6238
+ */
6239
+ error_code: 'ENOSPC' | 'EDQUOT';
6240
+ /**
6241
+ * What was not saved. 'transcript': lines of a session transcript, so resuming a session in transcript_session_ids may miss part of its conversation. 'global_config': changes this run made to ~/.claude.json. Never empty. More values may be added.
6242
+ */
6243
+ lost: ('transcript' | 'global_config')[];
6244
+ /**
6245
+ * The sessions whose transcripts lost lines, in the order each first lost one. Present only when 'transcript' is listed; never empty. Usually session_id alone. A CLI that started a new session after the loss, as /clear does, lists the earlier session, and lists session_id only if that session lost lines too.
6246
+ */
6247
+ transcript_session_ids?: string[];
6248
+ uuid: UUID;
6249
+ session_id: string;
6250
+ };
6251
+
6192
6252
  /**
6193
6253
  * A settings file parse or validation error. When a settings.json file fails to parse (invalid JSON, JSON comments, schema mismatch), the file is skipped and any rules it contained — including permission allow/deny lists — are not applied.
6194
6254
  */
@@ -6208,9 +6268,9 @@ export declare type SDKSettingsParseError = {
6208
6268
  };
6209
6269
 
6210
6270
  /**
6211
- * 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. provider_not_allowed: managed settings list the API providers this machine may use (allowedProviders), and the session is set up for one that is not listed. 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, the pin names no organization, or managed model settings (deniedModels, or an availableModels list matched exactly) block the default model and leave no allowed model to use instead. 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. org_config_required_unavailable: the organization requires its policy limits and managed settings before a session starts, and they could not be loaded (network, proxy, or an Anthropic error); retrying may succeed. org_config_refused: the organization requires its policy limits and managed settings, and Anthropic refused them for this sign-in (expired or revoked session, or the organization does not allow Claude Code for this account); signing in again or an admin's change is the fix, not a retry. sandbox_required_unavailable: a working sandbox is required and it cannot run in this session, for example because bubblewrap is missing or the platform is not supported; make the sandbox available or have the requirement changed.
6271
+ * 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. provider_not_allowed: managed settings list the API providers this machine may use (allowedProviders), and the session is set up for one that is not listed. 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, the pin names no organization, or managed model settings (deniedModels, or an availableModels list matched exactly) block the default model and leave no allowed model to use instead. 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. org_config_required_unavailable: the organization requires its policy limits and managed settings before a session starts, and they could not be loaded (network, proxy, or an Anthropic error); retrying may succeed. org_config_refused: the organization requires its policy limits and managed settings, and Anthropic refused them for this sign-in (expired or revoked session, or the organization does not allow Claude Code for this account); signing in again or an admin's change is the fix, not a retry. sandbox_required_unavailable: a working sandbox is required and it cannot run in this session, for example because bubblewrap is missing or the platform is not supported; make the sandbox available or have the requirement changed. initialize_not_first: Claude Code was started with --await-initialize, and its first stdin line was not the initialize control request (another message, or not valid JSON). Either the host wrote something else first, or a wrapper script between the host and Claude Code read or changed that line; the fix is in the host or the wrapper script, not a retry.
6212
6272
  */
6213
- export declare type SDKStartupFailureReason = 'org_pin_api_key_conflict' | 'provider_not_allowed' | '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' | 'org_config_required_unavailable' | 'org_config_refused' | 'sandbox_required_unavailable';
6273
+ export declare type SDKStartupFailureReason = 'org_pin_api_key_conflict' | 'provider_not_allowed' | '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' | 'org_config_required_unavailable' | 'org_config_refused' | 'sandbox_required_unavailable' | 'initialize_not_first';
6214
6274
 
6215
6275
  export declare type SDKStatus = 'compacting' | 'requesting' | null;
6216
6276
 
@@ -6296,6 +6356,7 @@ export declare type SDKSystemMessage = {
6296
6356
  effort?: ('low' | 'medium' | 'high' | 'xhigh' | 'max') | null;
6297
6357
 
6298
6358
 
6359
+
6299
6360
  /**
6300
6361
  * Whether the session's transcript is in focus view ('focus': the model is told the user sees only its final message per turn, so clients may collapse each turn to the prompt and the final response; 'default' otherwise). Toggled by /focus, including over Remote Control. Present on Remote Control bridge init frames and on the per-turn init of headless stream-json runs (`claude rc` workers, -p, the SDK's subprocess transport); absent on hosts that do not publish it (the in-process engine) and on CLIs that predate the field. Re-emitted inits carry the current value — the newest frame wins.
6301
6362
  */
@@ -6315,6 +6376,9 @@ export declare type SDKSystemMessage = {
6315
6376
 
6316
6377
 
6317
6378
 
6379
+
6380
+
6381
+
6318
6382
  uuid: UUID;
6319
6383
  session_id: string;
6320
6384
  };
@@ -6613,6 +6677,7 @@ export declare type SDKUserMessage = {
6613
6677
 
6614
6678
 
6615
6679
 
6680
+
6616
6681
 
6617
6682
 
6618
6683
  /**
@@ -6645,6 +6710,7 @@ export declare type SDKUserMessage = {
6645
6710
 
6646
6711
 
6647
6712
 
6713
+
6648
6714
  uuid?: UUID;
6649
6715
  /**
6650
6716
  * 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.
@@ -6654,6 +6720,7 @@ export declare type SDKUserMessage = {
6654
6720
  * Text the user pasted that is still in `message.content` where they put it: each entry one paste. The prompt is not changed by the host; the CLI may wrap each entry in `<pasted_content>` tags where it still stands in the last text block. It looks for the first 100 entries that are not blank. For a paste the host took out of `message`, use `pasted_content` instead.
6655
6721
  */
6656
6722
  inline_pastes?: string[];
6723
+
6657
6724
  session_id?: string;
6658
6725
  /**
6659
6726
  * ID of the subagent that produced this message: the `task_id` of its task events, unchanged when the subagent is resumed. Absent on main-thread messages.
@@ -6668,6 +6735,7 @@ export declare type SDKUserMessage = {
6668
6735
  */
6669
6736
  task_description?: string;
6670
6737
 
6738
+
6671
6739
  };
6672
6740
 
6673
6741
  export declare type SDKUserMessageReplay = {
@@ -6710,6 +6778,7 @@ export declare type SDKUserMessageReplay = {
6710
6778
 
6711
6779
 
6712
6780
 
6781
+
6713
6782
 
6714
6783
 
6715
6784
  /**
@@ -6742,6 +6811,7 @@ export declare type SDKUserMessageReplay = {
6742
6811
 
6743
6812
 
6744
6813
 
6814
+
6745
6815
  uuid: UUID;
6746
6816
  session_id: string;
6747
6817
  isReplay: true;
@@ -7198,6 +7268,10 @@ export declare interface Settings {
7198
7268
  * For the program that starts Claude Code: read only from --settings and from settings that program sends while the session runs; ignored in user, project, local and managed settings. Absolute paths, each a folder with all below it or one file, that blockReadsOutsideWorkingDirectories lets through beside the working directories. It allows nothing: an allow rule, the permission mode or the user still decides each read, as with that setting off, and a shell command that hands such a path to a program is still asked about unless a Read allow rule covers it. The paths do not become working directories, so blockWritesOutsideWorkingDirectories refuses writes to them, and they are not told to MCP servers or to the model. Each path counts as written: a link in it is not followed and a pattern is not expanded, so list every spelling that a read may arrive by. Ignored: an entry that starts with ~, has a ".." segment or has white space at either end (as written or once normalized), a relative or network path, and the root of a filesystem. Does not change what sandboxed commands may read (sandbox.filesystem.allowRead does).
7199
7269
  */
7200
7270
  blockReadsExemptPaths?: string[];
7271
+ /**
7272
+ * For the program that starts Claude Code: read only from --settings and from settings that program sends while the session runs; ignored in user, project, local and managed settings. Absolute paths of working directories, each spelled exactly as it is passed, letter case included (the session folder, --add-dir, permissions.additionalDirectories). To decide what lies inside a listed working directory, Claude Code takes it as written and follows no link at it, so a link that later stands in its place gives the file tools no access to where the link leads. List real paths: the files of a listed path that runs through a link count as outside the working directories, because where they really are lies outside it. List a mapped network drive by its drive-letter path: Claude Code still derives the UNC form of that path by itself and adds it, as for any mapped drive. A file path that is itself spelled as a UNC path is judged as written, so a link on the share is not seen by that spelling. It adds no working directory and allows nothing. Once listed, a path stays so until the process ends, also if later settings leave it out. Ignored: an entry that is not already normalized (a relative path, one that starts with ~, a ".." segment, a separator at its end unless it is a filesystem root, forward slashes on Windows, white space at either end). Does not change what sandboxed commands may write.
7273
+ */
7274
+ workingDirectoriesAsGiven?: string[];
7201
7275
  /**
7202
7276
  * Disable auto mode
7203
7277
  */
@@ -10253,7 +10327,7 @@ export declare interface Transport {
10253
10327
  /**
10254
10328
  * Await the underlying subprocess's exit. Only meaningful for
10255
10329
  * subprocess-backed transports (ProcessTransport); WebSocket / SSE /
10256
- * in-process transports leave this undefined. Query.performCleanup()
10330
+ * Bun Worker transports leave this undefined. Query.performCleanup()
10257
10331
  * awaits it (bounded) so .return() / asyncDispose don't resolve while
10258
10332
  * the child is still draining the stdin EOF that close() just sent.
10259
10333
  */