@anthropic-ai/claude-agent-sdk 0.3.318 → 0.3.321

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,54 +1,52 @@
1
1
  {
2
- "version": "2.1.318",
2
+ "version": "2.1.321",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "ca1fa9dea62c1027756786c841c548788644560d",
5
- "buildDate": "2026-11-03T19:21:35Z",
4
+ "commit": "76bc735070b3499364675700dea5f5a133152e2e",
5
+ "buildDate": "2026-11-09T17:01:59Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude",
9
- "checksum": "677a2ea7bf576cedd20e191d973914ed8a41796f53a63b1923381ddc4d5b5e7d",
10
- "size": 319598464
9
+ "checksum": "abc9feeeca8091d51b623291e044cf0528c2f6b74e0c1d6ef671d52c73f7cd3c",
10
+ "size": 323686048
11
11
  },
12
12
  "darwin-x64": {
13
13
  "binary": "claude",
14
- "checksum": "ee9c8577a528aa8efa478bf552b17efa40bb58aa4981d2913c13d383a4d409a4",
15
- "size": 334272544
14
+ "checksum": "f4e04d8726ee1343999679ad745eca2f6d263c2941f132b1fdca4283ee6d5f02",
15
+ "size": 338384032
16
16
  },
17
17
  "linux-arm64": {
18
18
  "binary": "claude",
19
- "checksum": "53a0d7e219d7b0804ecba5dbc002745e89f786cc946d2de85a6470d5b2d1fb06",
20
- "size": 337438136
19
+ "checksum": "6bea0633074627ba79328e00115ed0588c3acf906a8463612b25db696dbfd3f0",
20
+ "size": 341501368
21
21
  },
22
22
  "linux-x64": {
23
23
  "binary": "claude",
24
- "checksum": "708c77b204db30086ff6f1ed34577bda03e1be74ced80557cbf7b54249ebf0bd",
25
- "size": 337814032
24
+ "checksum": "426c33815ca6645a772f722fbff10dbf2cbdb124a8aeab733c1365dbf8bbf61f",
25
+ "size": 341910032
26
26
  },
27
27
  "linux-arm64-musl": {
28
28
  "binary": "claude",
29
- "checksum": "a5ec862f882101dbe3e959ec166ab144e902a8e8e76215a2345b3860fe92ad28",
30
- "size": 321679624
29
+ "checksum": "d223ea603b4fe8521d35a47f1972fbb36f1028a40927f16160e6258e0b92d597",
30
+ "size": 325808392
31
31
  },
32
32
  "linux-x64-musl": {
33
33
  "binary": "claude",
34
- "checksum": "e6ff03823153a699d708c88c2fa87d18a1f6b45f13b14a985a221f8af442dd54",
35
- "size": 324274760
34
+ "checksum": "efc4a3d94daf10c550cde589a4add37f67519be54252ba88f27e9627f7ad62b4",
35
+ "size": 328366664
36
36
  },
37
37
  "win32-x64": {
38
38
  "binary": "claude.exe",
39
- "checksum": "b9aa5b08dc2cc46ea77d334dce792d1b8fdbb3a43bb290efdebdc905b1181082",
40
- "size": 342408352
39
+ "checksum": "e6dae5fc45902b15751f2591a02f51760351c4788c5fd8291b3f1443d40c13a4",
40
+ "size": 346487456
41
41
  },
42
42
  "win32-arm64": {
43
43
  "binary": "claude.exe",
44
- "checksum": "4626adbfe89eac61c79771ba866c63e7561d501cfba66a45be11213f1a33b1a0",
45
- "size": 325568672
44
+ "checksum": "670a397b3a4ce02ad400f37abd7dd7b57a21791abf29b8551fe43204fd0bebae",
45
+ "size": 329652384
46
46
  }
47
47
  },
48
48
  "sdkCompat": {
49
49
  "testedWrapperVersions": [
50
- "0.3.285",
51
- "0.3.286",
52
50
  "0.3.287",
53
51
  "0.3.288",
54
52
  "0.3.289",
@@ -76,7 +74,9 @@
76
74
  "0.3.314",
77
75
  "0.3.315",
78
76
  "0.3.316",
79
- "0.3.317"
77
+ "0.3.317",
78
+ "0.3.318",
79
+ "0.3.319"
80
80
  ],
81
81
  "harnessSchema": 1
82
82
  }
package/manifest.zst.json CHANGED
@@ -1,62 +1,60 @@
1
1
  {
2
- "version": "2.1.318",
2
+ "version": "2.1.321",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "ca1fa9dea62c1027756786c841c548788644560d",
5
- "buildDate": "2026-11-03T19:23:40Z",
4
+ "commit": "76bc735070b3499364675700dea5f5a133152e2e",
5
+ "buildDate": "2026-11-09T17:03:57Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude.zst",
9
- "checksum": "f49b990254804131f0be0f60260da9b4a55ec9fa73af0252816e423cb0e178dc",
10
- "size": 110417800,
9
+ "checksum": "2bc9e7541b21ab5a96a77b007f55211c59b5013276f14632f89ce67bf0507e01",
10
+ "size": 111928716,
11
11
  "bundle": {
12
- "checksum": "2d8d81d68faeee59165d30c2e266885f6a05ed17d9314e2ede6901d46fab64da",
13
- "size": 110416855
12
+ "checksum": "ddbdf2b334e13d8bcd8f7957cbeaa6ebaa5be64e4859e63f9e362bbfee23d4e8",
13
+ "size": 111941707
14
14
  }
15
15
  },
16
16
  "darwin-x64": {
17
17
  "binary": "claude.zst",
18
- "checksum": "17e41df7c85b0915a0d062608866de966654a1ddb7c6881465ab99fea5a19599",
19
- "size": 117597063,
18
+ "checksum": "af28fbe38aae061afd6a3f9af10475b42d22fb2e09de479e7f981d36eb51a922",
19
+ "size": 119128550,
20
20
  "bundle": {
21
- "checksum": "37553552f8e1495a18faec8e4b2984ea1111aec0519462ab3f8a29605c3b7963",
22
- "size": 117575621
21
+ "checksum": "f6694539ba77354bb19bc9bf26dbebbb50ae1388dfc27b90e6ec795cad1b76cc",
22
+ "size": 119122698
23
23
  }
24
24
  },
25
25
  "linux-arm64": {
26
26
  "binary": "claude.zst",
27
- "checksum": "579259965c17034f3172b0c31db3f6922cde92e5f183f14541d1615607461d21",
28
- "size": 121788996
27
+ "checksum": "2921f56ccb6f4a930cf1ccc9d53269ee1595b8b5da167780385aaddee06af0c4",
28
+ "size": 123265873
29
29
  },
30
30
  "linux-x64": {
31
31
  "binary": "claude.zst",
32
- "checksum": "760aaca865c68a315e49d129614a5f5dc9cab99f7de75899257faed68f553f3b",
33
- "size": 123000572
32
+ "checksum": "ded331c1fbf8bdd00518599ac80a888a1d1aff3c799f3a15934adb96662094ff",
33
+ "size": 124473095
34
34
  },
35
35
  "linux-arm64-musl": {
36
36
  "binary": "claude.zst",
37
- "checksum": "52d0217d29a80b47063bbd52459f9820585aa28f350355c905c04e3fa7186b38",
38
- "size": 115798310
37
+ "checksum": "6d80aee15ac60895bee01972daff89179aee3a41098e20700b65ff10720996a7",
38
+ "size": 117273356
39
39
  },
40
40
  "linux-x64-musl": {
41
41
  "binary": "claude.zst",
42
- "checksum": "b1d8be36a41d50a5369835b893f8fcab7aeee8067da152ef6eaa0b9b2383f74d",
43
- "size": 117196041
42
+ "checksum": "df08608308f8fee8ce525acdca6090cbcebb6b609ddb6ea49db3fe9ff89216fb",
43
+ "size": 118666429
44
44
  },
45
45
  "win32-x64": {
46
46
  "binary": "claude.exe.zst",
47
- "checksum": "c1b324353077ece04cc245b2eb037716dab4fc6174c6bd0721b7f4dcc5888c14",
48
- "size": 124820462
47
+ "checksum": "d0e23af87588ccfbc011e18adc0736999957df8d37618802e2e65a6364fb736d",
48
+ "size": 126378145
49
49
  },
50
50
  "win32-arm64": {
51
51
  "binary": "claude.exe.zst",
52
- "checksum": "5e11b27469741a280a5c90a994aa7c67a8401b6200373adb440a04f5ec790492",
53
- "size": 118881914
52
+ "checksum": "7689cf83002b2c434b68d94850e121281d1899dafb56b9f51b3d37652d59119c",
53
+ "size": 120408235
54
54
  }
55
55
  },
56
56
  "sdkCompat": {
57
57
  "testedWrapperVersions": [
58
- "0.3.285",
59
- "0.3.286",
60
58
  "0.3.287",
61
59
  "0.3.288",
62
60
  "0.3.289",
@@ -84,7 +82,9 @@
84
82
  "0.3.314",
85
83
  "0.3.315",
86
84
  "0.3.316",
87
- "0.3.317"
85
+ "0.3.317",
86
+ "0.3.318",
87
+ "0.3.319"
88
88
  ],
89
89
  "harnessSchema": 1
90
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.318",
3
+ "version": "0.3.321",
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.318",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.318",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.318",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.318",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.318",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.318",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.318",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.318"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.321",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.321",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.321",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.321",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.321",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.321",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.321",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.321"
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-aydj4gn2.mjs",
89
- "core-dx5t072s.mjs",
90
- "core-gh89n9s3.mjs",
91
- "core-z711jz48.mjs"
88
+ "core-4jkx88px.mjs",
89
+ "core-9cm2w1sd.mjs",
90
+ "core-hz6x1gbv.mjs",
91
+ "core-ke81nxtn.mjs"
92
92
  ],
93
- "claudeCodeVersion": "2.1.318"
93
+ "claudeCodeVersion": "2.1.321"
94
94
  }
package/sdk-tools.d.ts CHANGED
@@ -2947,7 +2947,7 @@ export interface RemoteTriggerInput {
2947
2947
  */
2948
2948
  session_id?: string;
2949
2949
  /**
2950
- * next_cursor from a previous list_runs or get_run_log page
2950
+ * The next_cursor from the previous page of the same listing (list_runs with the same trigger_id, or get_run_log with the same session_id), passed back unchanged. Not an offset, a count or an event number.
2951
2951
  */
2952
2952
  cursor?: string;
2953
2953
  /**
@@ -4200,6 +4200,7 @@ export interface CronCreateOutput {
4200
4200
  }
4201
4201
  export interface CronDeleteOutput {
4202
4202
  id: string;
4203
+ endedLoopWakeup?: true;
4203
4204
  }
4204
4205
  export interface CronListOutput {
4205
4206
  jobs: {
package/sdk.d.ts CHANGED
@@ -304,7 +304,10 @@ export declare type CanUseTool = (toolName: string, input: Record<string, unknow
304
304
  requestId: string;
305
305
  /**
306
306
  * Set when a user-configured ask RULE (permissions.ask) forced this
307
- * prompt while the ask carries the tool's own decisionReason. Hosts
307
+ * prompt while the ask carries the tool's own decisionReason, or when
308
+ * an ask rule reaches an MCP tool only under another name of its server
309
+ * (such as a connector's id or its claude.ai name), not the one given
310
+ * here. Hosts
308
311
  * making policy on the reason (e.g. auto-deny a safetyCheck) or
309
312
  * running host-side auto-approval should treat asks carrying this
310
313
  * field as rule-forced: the user's stated intent is a human prompt.
@@ -698,7 +701,9 @@ export declare type CwdChangedHookSpecificOutput = {
698
701
  *
699
702
  * Without `sessionStore`: removes `{sessionId}.jsonl` and the `{sessionId}/`
700
703
  * subagent-transcript subdirectory from the local projects dir. Throws if the
701
- * session is not found.
704
+ * session is not found. If the subdirectory cannot be removed, throws after
705
+ * the transcript is already deleted. A repeat call then throws "not found",
706
+ * so delete the subdirectory yourself.
702
707
  *
703
708
  * @param sessionId - UUID of the session
704
709
  * @param options - `{ dir?, sessionStore? }`
@@ -1256,6 +1261,7 @@ export declare type McpSdkServerConfig = {
1256
1261
  timeout?: number;
1257
1262
 
1258
1263
 
1264
+
1259
1265
  /**
1260
1266
  * Per-tool permission policy the host declares for this server's tools (not the tool definitions passed to createSdkMcpServer). always_ask: the CLI asks the host (canUseTool or the permission prompt tool) before each call, even where an allow rule or allowedTools covers the tool, and under bypassPermissions outside a hosted remote session (CLAUDE_CODE_REMOTE); under dontAsk the call is denied; in auto mode the classifier decides, except that by default a tool annotated destructiveHint still asks. always_deny: calls are denied. always_allow and org_max_permission are ignored on sdk servers; grant allows with allowedTools or canUseTool. Read from initialize (sdkMcpServerConfigs) and from each mcp_set_servers entry that names the server. On the wire an entry without tools states no policy: on initialize the stored list and the rules stand; on mcp_set_servers the rules are replaced without them. The Agent SDK always re-sends the registered list. An entry whose policy is not one of the three asks; an entry without a string name is dropped and the rest apply; a value that is not a list reads as absent.
1261
1267
  */
@@ -4224,6 +4230,7 @@ export declare type SDKControlGetContextUsageResponse = {
4224
4230
  cache_creation_input_tokens: number;
4225
4231
  cache_read_input_tokens: number;
4226
4232
  } | null;
4233
+
4227
4234
  };
4228
4235
 
4229
4236
  /**
@@ -4718,7 +4725,7 @@ declare type SDKControlInitializeRequest = {
4718
4725
  hooks?: Partial<Record<coreTypes.HookEvent, SDKHookCallbackMatcher[]>>;
4719
4726
  sdkMcpServers?: string[];
4720
4727
  /**
4721
- * Settings for the SDK-hosted MCP servers named in sdkMcpServers, keyed by server name. Sent as a separate field so a CLI that predates it ignores it; entries whose name is not in sdkMcpServers, and values that do not match this shape, are ignored rather than rejected. timeout, disableAutoBackground and connectorId apply when the server is first registered; tools (the per-tool permission policy) adds its ask and deny rules on every initialize that names the server. An initialize never removes a rule; mcp_set_servers replaces them.
4728
+ * Settings for the SDK-hosted MCP servers named in sdkMcpServers, keyed by server name. Sent as a separate field so a CLI that predates it ignores it; entries whose name is not in sdkMcpServers, and values that do not match this shape, are ignored rather than rejected. timeout, disableAutoBackground, connectorId and autoModeVerdictTools apply when the server is first registered; tools (the per-tool permission policy) adds its ask and deny rules on every initialize that names the server. An initialize never removes a rule; mcp_set_servers replaces them.
4722
4729
  */
4723
4730
  sdkMcpServerConfigs?: Record<string, {
4724
4731
  /**
@@ -4727,6 +4734,7 @@ declare type SDKControlInitializeRequest = {
4727
4734
  timeout?: number;
4728
4735
 
4729
4736
 
4737
+
4730
4738
  /**
4731
4739
  * Per-tool permission policy the host declares for this server's tools (not the tool definitions passed to createSdkMcpServer). always_ask: the CLI asks the host (canUseTool or the permission prompt tool) before each call, even where an allow rule or allowedTools covers the tool, and under bypassPermissions outside a hosted remote session (CLAUDE_CODE_REMOTE); under dontAsk the call is denied; in auto mode the classifier decides, except that by default a tool annotated destructiveHint still asks. always_deny: calls are denied. always_allow and org_max_permission are ignored on sdk servers; grant allows with allowedTools or canUseTool. Read from initialize (sdkMcpServerConfigs) and from each mcp_set_servers entry that names the server. On the wire an entry without tools states no policy: on initialize the stored list and the rules stand; on mcp_set_servers the rules are replaced without them. The Agent SDK always re-sends the registered list. An entry whose policy is not one of the three asks; an entry without a string name is dropped and the rest apply; a value that is not a list reads as absent.
4732
4740
  */
@@ -4822,6 +4830,7 @@ export declare type SDKControlInitializeResponse = {
4822
4830
 
4823
4831
 
4824
4832
 
4833
+
4825
4834
  /**
4826
4835
  * 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.
4827
4836
  */
@@ -4831,6 +4840,7 @@ export declare type SDKControlInitializeResponse = {
4831
4840
  */
4832
4841
  hook_on_failure_supported?: boolean;
4833
4842
 
4843
+
4834
4844
  /**
4835
4845
  * 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`).
4836
4846
  */
@@ -4880,6 +4890,7 @@ declare type SDKControlInterruptRequest = {
4880
4890
 
4881
4891
 
4882
4892
 
4893
+
4883
4894
  };
4884
4895
 
4885
4896
  /**
@@ -4894,7 +4905,7 @@ export declare type SDKControlInterruptResponse = {
4894
4905
 
4895
4906
 
4896
4907
  /**
4897
- * Present only when the request set cancel_queued:true — uuids of main-thread commands cancelled by this interrupt: every survivor that would otherwise have appeared under `still_queued`, including any uuid that was mid-fold at the interrupt instant (this request also aborts, so the fold never delivers it). Each listed uuid has been removed (queue-resident), dropped before it was queued (a message this process had read and was still holding), or marked cancel-pending (the first-command prewait window, closed by the drain loop's backstop) and emits a terminal 'cancelled' lifecycle synchronously at the first such interrupt (a repeat interrupt over the same parked batch re-lists the uuid idempotently without re-emitting); none will run. Where one of them is the re-run of an interrupted turn that also answered for other client messages whose re-sent copies had been set aside for it, those messages' uuids are listed behind the commands' too: they were in no queue and never under `still_queued`, each has its terminal 'cancelled' lifecycle, and a repeat interrupt does not list them again. Same coverage caveats as `still_queued` (uuid-stamped main-thread only; internally-enqueued uuids may appear). Advertised by the `interrupt_cancel_queued_v1` capability.
4908
+ * Present only when the request set cancel_queued:true, with one exception that the last sentence names — uuids of main-thread commands cancelled by this interrupt: every survivor that would otherwise have appeared under `still_queued`, including any uuid that was mid-fold at the interrupt instant (this request also aborts, so the fold never delivers it). Each listed uuid has been removed (queue-resident), dropped before it was queued (a message this process had read and was still holding), or marked cancel-pending (the first-command prewait window, closed by the drain loop's backstop) and emits a terminal 'cancelled' lifecycle synchronously at the first such interrupt (a repeat interrupt over the same parked batch re-lists the uuid idempotently without re-emitting); none will run. Where one of them is the re-run of an interrupted turn that also answered for other client messages whose re-sent copies had been set aside for it, those messages' uuids are listed behind the commands' too: they were in no queue and never under `still_queued`, each has its terminal 'cancelled' lifecycle, and a repeat interrupt does not list them again. Same coverage caveats as `still_queued` (uuid-stamped main-thread only; internally-enqueued uuids may appear). Advertised by the `interrupt_cancel_queued_v1` capability. The exception, in a remote session and behind a flag: an interrupt with neither cancel_queued nor for_user_message_uuids, which no service wrote, also carries this field where it cancelled messages that the server had sent again and that this process held aside to run later; it then lists those alone, and no capability advertises it.
4898
4909
  */
4899
4910
  cancelled?: string[];
4900
4911
  };
@@ -4924,7 +4935,7 @@ export declare type SDKControlListPermissionRulesResponse = {
4924
4935
  };
4925
4936
 
4926
4937
  /**
4927
- * Invokes an MCP tool via the subprocess MCP client without a model turn. No permission check (control channel is trusted, same as other subtypes). SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls, unless result_not_for_model is set. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call. STAGED calls (input_files/output_files declared) additionally stage lane rows in/out around the call — see the input_files describe. Staged failures come back as a success-subtype response whose staging field carries a typed error_code; subtype:error is emitted only when the call could not be attempted at all (server not connected, kill switch, dispatch failure) and means nothing ran. A target server that is not yet connected is brought up on demand: dispatch runs the deferred plugin/MCP startup resolution (the work a first model turn would have done) and waits up to 30s — shortened by expires_at when that is sooner — for the server to connect before answering "MCP server not connected", so a dispatch that races plugin startup (e.g. after an idle-wake reattach) succeeds instead of failing until a turn runs. Standard RPC semantics: a redelivered request_id supersedes the in-flight run (it is aborted and its response suppressed — exactly one response per request_id); conversion is idempotent, so re-running is safe. Cancellable via control_cancel_request.
4938
+ * Invokes an MCP tool via the subprocess MCP client without a model turn. No permission check (control channel is trusted, same as other subtypes) unless check_permissions is set. SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls, unless result_not_for_model is set. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call. STAGED calls (input_files/output_files declared) additionally stage lane rows in/out around the call — see the input_files describe. Staged failures come back as a success-subtype response whose staging field carries a typed error_code; subtype:error is emitted only when the call could not be attempted at all (server not connected, kill switch, dispatch failure) and means nothing ran. A target server that is not yet connected is brought up on demand: dispatch runs the deferred plugin/MCP startup resolution (the work a first model turn would have done) and waits up to 30s — shortened by expires_at when that is sooner — for the server to connect before answering "MCP server not connected", so a dispatch that races plugin startup (e.g. after an idle-wake reattach) succeeds instead of failing until a turn runs. Standard RPC semantics: a redelivered request_id supersedes the in-flight run (it is aborted and its response suppressed — exactly one response per request_id); conversion is idempotent, so re-running is safe. Cancellable via control_cancel_request.
4928
4939
  */
4929
4940
  declare type SDKControlMcpCallRequest = {
4930
4941
  subtype: 'mcp_call';
@@ -4941,13 +4952,17 @@ declare type SDKControlMcpCallRequest = {
4941
4952
  */
4942
4953
  expires_at?: string;
4943
4954
  /**
4944
- * Tool-execution timeout (staging and collection have their own transport timeouts). Clamped to [1000, 600000]; default 120000. Sending timeout_ms routes the call through the staging engine — so it is always enforced when present and the response carries a staging result; omit it for a plain call. Staged calls are POSIX-worker-only: on a Windows worker any staged-field call fails with a typed staging refusal.
4955
+ * Tool-execution timeout (staging and collection have their own transport timeouts); with check_permissions it also bounds hooks and the wait for an answer. Clamped to [1000, 600000]; default 120000. Sending timeout_ms routes the call through the staging engine — so it is always enforced when present and the response carries a staging result; omit it for a plain call. Staged calls are POSIX-worker-only: on a Windows worker any staged-field call fails with a typed staging refusal.
4945
4956
  */
4946
4957
  timeout_ms?: number;
4947
4958
  /**
4948
4959
  * The caller hands the result to a program (a host that renders it, a script), not to a model, and bounds it itself. content is then the server's own content blocks as MCP defines them (the MCP SDK drops members it does not define), not what a model turn would be handed: no image is resized or put in the Messages API's shape, nothing is saved under tool-results, no embedded resource is flattened, and text blocks beside structuredContent stay. They are untrusted third-party data: any mimeType, images neither re-encoded nor bounded in pixels, each block's annotations and _meta unfiltered. The size check that protects a model's context is skipped too: no count_tokens request (which uploads the result), no truncation, no note in place of the content. Instead a result over 10485760 characters (content with its base64, structuredContent and _meta together) fails though the tool ran: a plain call answers the error subtype, a staged call staging.error_code tool_error with the text in detail, before its outputs are collected. A legacy toolResult still comes back as a string. Does not route the call through the staging engine. Absent or false: as before. Honoured only for a host on this process's own pipes, not over a remote transport nor on a lane that redacts what it persists. Feature-detected as `mcp_call_result_not_for_model_v1` in system/init.capabilities and in the initialize response's capabilities; where it is not said, and by a CLI without it, the member is ignored.
4949
4960
  */
4950
4961
  result_not_for_model?: boolean;
4962
+ /**
4963
+ * The call is someone else's (a page a host renders), so it is decided as the model's own call to this tool is: permission rules under every spelling, the permission mode, requiresUserInteraction, managed settings, and PreToolUse and PostToolUse hooks, which see the arguments and the result. An ask reaches the host as a can_use_tool control request; where no host can answer, and in dontAsk or plan mode, it is refused. A refused call never reaches the server: on a plain call the error subtype, on a staged call staging error_code=tool_error, each with text starting 'The tool did not run: '. The other refusals of mcp_call come first and keep their own words. A PostToolUse hook's rewrite replaces content and drops structuredContent and _meta. The result stays out of the model's context. Only a CLI that says mcp_call_check_permissions_v1 honours this member: an older one ignores it and runs the tool with no check. Honoured only on the pipes of the host that spawned the process; elsewhere the call is refused. A value that is not a boolean is refused.
4964
+ */
4965
+ check_permissions?: boolean;
4951
4966
  /**
4952
4967
  * Declaring input_files or output_files makes this a STAGED call: rows are fetched from the synced-file lane into a private per-request temp dir the WORKER chooses (random, per-UID — the caller never sees or computes paths; it references files via tokens in arguments), the tool runs, and declared outputs are written back as lane rows (durable-at-ack PUT). The response then carries a `staging` result the caller switches on.
4953
4968
  */
@@ -5017,7 +5032,7 @@ export declare type SDKControlMcpReadResourceResponse = {
5017
5032
  */
5018
5033
  blob?: string;
5019
5034
  /**
5020
- * The content item's own `_meta` as the server sent it (MCP Apps puts the resource's `ui.csp` and `ui.permissions` here), minus keys under the CLI-reserved `com.anthropic/` prefix.
5035
+ * The content item's own `_meta` as the server sent it (MCP Apps puts the resource's `ui.csp` and `ui.permissions` here), minus keys under the CLI-reserved `com.anthropic/` prefix and `io.modelcontextprotocol/files` download targets: from a claude.ai connector, one that holds the download service's one-time token (every such target while connector downloads or their removal are on); from a server on a cloud session's MCP route, every such target.
5021
5036
  */
5022
5037
  _meta?: Record<string, unknown>;
5023
5038
  }[];
@@ -5040,6 +5055,7 @@ declare type SDKControlMcpSetServersRequest = {
5040
5055
 
5041
5056
 
5042
5057
 
5058
+
5043
5059
  };
5044
5060
 
5045
5061
  /**
@@ -5099,7 +5115,7 @@ declare type SDKControlPermissionRequest = {
5099
5115
  */
5100
5116
  default_to_no?: boolean;
5101
5117
  /**
5102
- * Set when a user-configured ask RULE (permissions.ask) forced this prompt but the ask carries the tool's own decision_reason — the ask-rule substitution keeps the richer tool-minted ask, so the rule rides here instead of decision_reason_type 'rule'. Hosts making policy on decision_reason_type (e.g. auto-deny safetyCheck) or running host-side auto-approval should treat asks carrying this field as rule-forced: the user's stated intent is a human prompt. Values are producer-authored but render-unsafe like decision_reason; sanitize before display.
5118
+ * Set when a user-configured ask RULE (permissions.ask) forced this prompt but the ask carries the tool's own decision_reason — the ask-rule substitution keeps the richer tool-minted ask, so the rule rides here instead of decision_reason_type 'rule'. May also be set, whatever the decision_reason, when an ask rule reaches an MCP tool only under another name of its server (such as a connector's id or its claude.ai name), not under the name in tool_name: a host that looks for the rule by that name does not find it. Hosts making policy on decision_reason_type (e.g. auto-deny safetyCheck) or running host-side auto-approval should treat asks carrying this field as rule-forced: the user's stated intent is a human prompt. Values are producer-authored but render-unsafe like decision_reason; sanitize before display.
5103
5119
  */
5104
5120
  matched_ask_rule?: {
5105
5121
  source: string;
@@ -5113,7 +5129,7 @@ declare type SDKControlPermissionRequest = {
5113
5129
 
5114
5130
  description?: string;
5115
5131
  /**
5116
- * 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), OR the auto-mode classifier blocked the call and it was handed to a person (decision_reason_type 'classifier' on a person-only ask), which no stored grant or automatic approval may answer, OR a grant keyed on the tool name must not answer it: the MCP server's name spells a claude.ai connector's key and the server came from neither claude.ai nor whoever launched the session, or, while Claude Code enforces grants, two tools of the server get that name, OR the SDK host worded the ask (title and description are its consent copy, which a push cannot carry whole), OR the ask is the one made before the first upload by file reference to a connector, which no stored grant or automatic approval may answer. In each case the user has to open the session to answer.
5132
+ * 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), OR the auto-mode classifier blocked the call and it was handed to a person (decision_reason_type 'classifier' on a person-only ask), which no stored grant or automatic approval may answer, OR a grant keyed on the tool name must not answer it: the MCP server's name spells a claude.ai connector's key and the server came from neither claude.ai nor whoever launched the session, or, while Claude Code enforces grants, two tools of the server get that name, OR the SDK host worded the ask (title and description are its consent copy, which a push cannot carry whole), OR the ask stands in for the classifier's verdict on a call to Claude Desktop's Cowork shell, which no stored grant or automatic approval may answer. In each case the user has to open the session to answer.
5117
5133
  */
5118
5134
  requires_user_interaction?: boolean;
5119
5135
 
@@ -5275,6 +5291,7 @@ declare type SDKControlRenameSessionRequest = {
5275
5291
  * The session the title is for. When given and this process has since moved to another session (/clear, an in-session resume), the request is refused instead of naming the new session.
5276
5292
  */
5277
5293
  session_id?: string;
5294
+
5278
5295
  };
5279
5296
 
5280
5297
  /**
@@ -5291,7 +5308,7 @@ export declare type SDKControlRequest = {
5291
5308
 
5292
5309
  };
5293
5310
 
5294
- declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlSetColorRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKControlGetSessionCostRequest | SDKControlListModelsRequest | SDKControlGetUsageRequest | SDKControlGetBinaryVersionRequest | SDKControlMcpCallRequest | SDKControlFileSuggestionsRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlReadFileRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlRegisterRepoRootRequest | SDKControlReloadPluginsRequest | SDKControlReloadSkillsRequest | SDKControlReloadOutputStylesRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlStopTaskRequest | SDKControlBackgroundTasksRequest | SDKControlGetTaskOutputRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlGetHooksListingRequest | SDKControlUpdateSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest | SDKControlListPermissionRulesRequest | SDKControlMcpReadResourceRequest;
5311
+ declare type SDKControlRequestInner = SDKControlInterruptRequest | SDKControlPermissionRequest | SDKControlInitializeRequest | SDKControlSetPermissionModeRequest | SDKControlSetModelRequest | SDKControlSetMaxThinkingTokensRequest | SDKControlRenameSessionRequest | SDKControlSetColorRequest | SDKControlMcpStatusRequest | SDKControlGetContextUsageRequest | SDKControlGetSessionCostRequest | SDKControlListModelsRequest | SDKControlGetUsageRequest | SDKControlGetBinaryVersionRequest | SDKControlMcpCallRequest | SDKControlFileSuggestionsRequest | SDKHookCallbackRequest | SDKControlMcpMessageRequest | SDKControlRewindFilesRequest | SDKControlCancelAsyncMessageRequest | SDKControlReadFileRequest | SDKControlSeedReadStateRequest | SDKControlMcpSetServersRequest | SDKControlRegisterRepoRootRequest | SDKControlReloadPluginsRequest | SDKControlReloadSkillsRequest | SDKControlReloadOutputStylesRequest | SDKControlMcpReconnectRequest | SDKControlMcpToggleRequest | SDKControlSetHasSubscribersRequest | SDKControlStopTaskRequest | SDKControlBackgroundTasksRequest | SDKControlGetTaskOutputRequest | SDKControlApplyFlagSettingsRequest | SDKControlGetSettingsRequest | SDKControlGetHooksListingRequest | SDKControlUpdateSettingsRequest | SDKControlElicitationRequest | SDKControlRequestUserDialogRequest | SDKControlListPermissionRulesRequest | SDKControlMcpReadResourceRequest;
5295
5312
 
5296
5313
  /**
5297
5314
  * Progress for a long-running client-originated control_request (currently only side_question), correlated by request_id. status 'started' means the worker accepted the request and launched the work; 'api_retry' carries the same retry counters as SDKAPIRetryMessage and is present only for that status.
@@ -5365,6 +5382,17 @@ declare type SDKControlSetColorRequest = {
5365
5382
  color: string;
5366
5383
  };
5367
5384
 
5385
+ /**
5386
+ * Tells the CLI whether anybody is watching the output that the host reads from stream-json stdout and passes on. It matters only in a CLI started with CLAUDE_CODE_STREAM_EVENT_HOLD_MS, which holds most content_block_delta and thinking_tokens lines on stdout to join them, and with CLAUDE_CODE_STREAM_EVENT_NO_SUBSCRIBER_HOLD_MS: after false, each new wait of that hold lasts the second variable's time, if longer; after true or null, the first variable's time again. No line is dropped. The reply is an empty success, also where nothing changes, and like any other line it comes after the lines held so far, so each request ends the wait that is running: send one only when the answer changes, not after each message from your server. A new CLI process starts as watched, so send the answer again to each new process. An older CLI answers with the unsupported-subtype error, and a CLI that drives a cloud-hosted session refuses the request.
5387
+ */
5388
+ declare type SDKControlSetHasSubscribersRequest = {
5389
+ subtype: 'set_has_subscribers';
5390
+ /**
5391
+ * false: nobody watches now. true: somebody does. null: the host does not know, which counts as true.
5392
+ */
5393
+ has_subscribers: boolean | null;
5394
+ };
5395
+
5368
5396
  /**
5369
5397
  * Sets the maximum number of thinking tokens for extended thinking. When max_thinking_tokens is null, thinking resets to the session default: any mid-session budget override is cleared (back to the spawn-time budget, if one was set), and thinking stays off for sessions that have it disabled. When max_thinking_tokens is omitted, the budget is left as it is, so a request that only changes thinking_display can leave the field out. thinking_display optionally sets the thinking display mode for the rest of the session: a value replaces the session display mode, null clears that override so Claude Code's default display handling applies again, and when omitted the display mode from session start (--thinking-display) is kept. 'highlights' returns one short title per stretch of thinking instead of a prose summary. The API accepts it only from Claude Code sessions that Anthropic hosts; if the API rejects it, the session sends 'omitted' (no thinking text) in its place from then on. A request for 'highlights' gets an error reply after such a rejection, when experimental betas are off (CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS or organization policy), on a Claude 3 model (except on Microsoft Foundry), or on Amazon Bedrock (Mantle included), Google Vertex AI or a Claude apps gateway (API provider "gateway") with a model released before Claude Opus 4.7. The error names which of these it was; the display stays as it was, and max_thinking_tokens still applies when the request has it.
5370
5398
  */
@@ -5985,6 +6013,7 @@ export declare type SDKRateLimitInfo = {
5985
6013
 
5986
6014
 
5987
6015
 
6016
+
5988
6017
  /**
5989
6018
  * 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.
5990
6019
  */
@@ -6047,6 +6076,7 @@ export declare type SDKResultError = {
6047
6076
 
6048
6077
  terminal_reason?: TerminalReason;
6049
6078
 
6079
+
6050
6080
  /**
6051
6081
  * 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.
6052
6082
  */
@@ -6102,6 +6132,8 @@ export declare type SDKResultSuccess = {
6102
6132
 
6103
6133
 
6104
6134
 
6135
+
6136
+
6105
6137
 
6106
6138
 
6107
6139
 
@@ -6112,6 +6144,7 @@ export declare type SDKResultSuccess = {
6112
6144
  request_sent_wall_ms?: number;
6113
6145
 
6114
6146
 
6147
+
6115
6148
  first_content_frame_ms?: number;
6116
6149
  first_stream_post_ms?: number;
6117
6150
  first_stream_post_ack_ms?: number;
@@ -6170,6 +6203,7 @@ export declare type SDKResultSuccess = {
6170
6203
  deferred_tool_use?: SDKDeferredToolUse;
6171
6204
  terminal_reason?: TerminalReason;
6172
6205
 
6206
+
6173
6207
  /**
6174
6208
  * 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.
6175
6209
  */
@@ -6243,7 +6277,7 @@ export declare type SDKSessionStateChangedMessage = {
6243
6277
  };
6244
6278
 
6245
6279
  /**
6246
- * 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.
6280
+ * 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 with status 0, after the last result if there was one. A run that exits 1, as after an error result, gets only the line on stderr; CLI 2.1.317 and some later releases sent this message there too. 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.
6247
6281
  */
6248
6282
  export declare type SDKSessionWritesLostMessage = {
6249
6283
  type: 'system';
@@ -6299,6 +6333,7 @@ export declare type SDKStatusMessage = {
6299
6333
 
6300
6334
 
6301
6335
 
6336
+
6302
6337
  uuid: UUID;
6303
6338
  session_id: string;
6304
6339
  };
@@ -6425,6 +6460,9 @@ export declare type SDKTaskNotificationMessage = {
6425
6460
  resource_links?: SDKMcpResourceLink[];
6426
6461
 
6427
6462
 
6463
+
6464
+
6465
+
6428
6466
  skip_transcript?: boolean;
6429
6467
  /**
6430
6468
  * True for tasks that are not activity (every skip_transcript task, plus every live-update watcher, requested or auto-started); hosts should exclude them from activity indicators.
@@ -6459,6 +6497,7 @@ export declare type SDKTaskProgressMessage = {
6459
6497
  */
6460
6498
  summary?: string;
6461
6499
 
6500
+
6462
6501
  uuid: UUID;
6463
6502
  session_id: string;
6464
6503
  };
@@ -7293,6 +7332,10 @@ export declare interface Settings {
7293
7332
  * Disable auto mode
7294
7333
  */
7295
7334
  disableAutoMode?: 'disable';
7335
+ /**
7336
+ * Never wait for a person to answer a tool permission prompt: a call that would prompt is denied at once, the model is told, and the turn carries on. This is what --permission-prompts none does for -p, in every kind of session, subagents and agent teams included. Allow rules, the permission mode, auto mode's classifier and PermissionRequest hooks decide first, as they do without it; it only ever denies, and allows nothing. Claude's questions and plan mode's tools are not offered to the model, and an MCP server's request for input is cancelled unless an Elicitation hook answers it. An app or script that answers prompts through canUseTool or --permission-prompt-tool is not asked either: answer from a PermissionRequest hook instead. Read from user settings, --settings and managed settings; project and local settings are ignored, and true in any of those sources wins.
7337
+ */
7338
+ denyInsteadOfPrompting?: boolean;
7296
7339
  /**
7297
7340
  * Additional directories to include in the permission scope
7298
7341
  */
@@ -7714,6 +7757,10 @@ export declare interface Settings {
7714
7757
  * Disable inline shell execution in skills and custom slash commands from user, project, or plugin sources. Commands are replaced with a placeholder instead of being run.
7715
7758
  */
7716
7759
  disableSkillShellExecution?: boolean;
7760
+ /**
7761
+ * Windows only. Set to true to keep every Bash command in a single argument to bash, so that endpoint security tools that match text in process command lines see it whole. Otherwise Claude Code may split a long command over several arguments. With true, a command of about 7,000 characters or more, or fewer if it is full of quotes, may reach bash cut short, and then usually fails with a syntax error. Only honored from managed settings; ignored in user, project, local and --settings sources.
7762
+ */
7763
+ disableWindowsBashCommandSplit?: boolean;
7717
7764
  /**
7718
7765
  * Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip).
7719
7766
  */
@@ -9077,7 +9124,7 @@ export declare interface Settings {
9077
9124
  */
9078
9125
  pluginSuggestionMarketplaces?: string[];
9079
9126
  /**
9080
- * Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing, "gateway" for the Cloud gateway OIDC device flow
9127
+ * Force a specific login method: "claudeai" for a Claude subscription (individual, Team, or Enterprise plans), "console" for Console billing, "gateway" for the Cloud gateway OIDC device flow
9081
9128
  */
9082
9129
  forceLoginMethod?: 'claudeai' | 'console' | 'gateway';
9083
9130
  /**
@@ -9101,7 +9148,7 @@ export declare interface Settings {
9101
9148
  */
9102
9149
  forceLoginOrgUUID?: string | string[];
9103
9150
  /**
9104
- * Managed settings only (managed-settings.json, MDM, or server-managed). The API providers Claude Code may use on this machine: "anthropic" (the Anthropic API on Anthropic's own host, via a claude.ai or Console sign-in or an API key; pair it with forceLoginMethod / forceLoginOrgUUID to require a sign-in), "bedrock", "vertex", "foundry", "anthropicAws", "mantle" (each meaning that provider's own service: its regional, FIPS, private-endpoint and sovereign-cloud hosts), "customEndpoint" (the Anthropic API or a cloud provider's API sent to some other host — ANTHROPIC_BASE_URL, that provider's ANTHROPIC_*_BASE_URL, a Foundry resource name that is not a bare name, or for Bedrock the AWS SDK's AWS_ENDPOINT_URL[_BEDROCK[_RUNTIME]] — such as an LLM gateway; admitted only for the value pinned in the "env" block of the same managed source), or "gateway" (the Cloud gateway sign-in). A session on a provider that is not listed is refused at startup, at login, and when it next contacts the API, with a message naming what selected the provider and the entry that would allow it. Under a list, where first-party traffic goes (ANTHROPIC_BASE_URL, a gateway sign-in) is honored only when the same managed source pins it in "env" (or forceLoginGatewayUrl), and a claude ssh tunnel into the machine is refused. A cloud provider's credential and tenancy variables, and the network path and TLS trust (HTTPS_PROXY, NODE_EXTRA_CA_CERTS, CLAUDE_CODE_CERT_STORE), are not judged by this list; set those for the fleet in the managed "env" block, whose values replace the user's. To route Bedrock through a gateway for a fleet, pin ANTHROPIC_BEDROCK_BASE_URL there (it is what the clients use, ahead of an endpoint_url in ~/.aws/config, which this list does not judge); the AWS SDK's AWS_ENDPOINT_URL* pins only sanction where the SDK's own clients go and never stand in for the "bedrock" entry. Unset allows every provider; an empty array allows none. Only a list in managed-settings.json or MDM is enforcement on the machine: it cannot be widened or hidden by server-managed settings and reaches every session. A list set only in the admin console reaches only sessions that fetch your server-managed settings — not a session on a cloud provider, another organization or a non-Anthropic ANTHROPIC_BASE_URL, one authenticating only with apiKeyHelper or ANTHROPIC_AUTH_TOKEN, a Pro/Max login, --bare without an API key, or a first launch before the fetch lands — all conditions the user controls. Versions that predate this setting ignore it; pair it with a minimum-version policy on a mixed fleet. 'claude auth status' reports the Anthropic API as apiProvider "firstParty".
9151
+ * Managed settings only (managed-settings.json, MDM, or server-managed). The API providers Claude Code may use on this machine: "anthropic" (the Anthropic API on Anthropic's own host, via a claude.ai or Console sign-in or an API key; pair it with forceLoginMethod / forceLoginOrgUUID to require a sign-in), "bedrock", "vertex", "foundry", "anthropicAws", "mantle" (each meaning that provider's own service: its regional, FIPS, private-endpoint and sovereign-cloud hosts), "customEndpoint" (the Anthropic API or a cloud provider's API sent to some other host — ANTHROPIC_BASE_URL, that provider's ANTHROPIC_*_BASE_URL, a Foundry resource name that is not a bare name, or for Bedrock the AWS SDK's AWS_ENDPOINT_URL[_BEDROCK[_RUNTIME]] — such as an LLM gateway; admitted only for the value pinned in the "env" block of the same managed source), or "gateway" (the Cloud gateway sign-in). A session on a provider that is not listed is refused at startup, at login, and when it next contacts the API, with a message naming what selected the provider and the entry that would allow it. Under a list, where first-party traffic goes (ANTHROPIC_BASE_URL, a gateway sign-in) is honored only when the same managed source pins it in "env" (or forceLoginGatewayUrl), and a claude ssh tunnel into the machine is refused. A cloud provider's credential and tenancy variables, and the network path and TLS trust (HTTPS_PROXY, NODE_EXTRA_CA_CERTS, CLAUDE_CODE_CERT_STORE), are not judged by this list; set those for the fleet in the managed "env" block, whose values replace the user's. To route Bedrock through a gateway for a fleet, pin ANTHROPIC_BEDROCK_BASE_URL there (it is what the clients use, ahead of an endpoint_url in ~/.aws/config, which this list does not judge); the AWS SDK's AWS_ENDPOINT_URL* pins only sanction where the SDK's own clients go and never stand in for the "bedrock" entry. Unset allows every provider; an empty array allows none. Only a list in managed-settings.json or MDM is enforcement on the machine: it cannot be widened or hidden by server-managed settings and reaches every session. A list set only in the admin console reaches only sessions that fetch your server-managed settings — not a session on a cloud provider, another organization or a non-Anthropic ANTHROPIC_BASE_URL, one authenticating only with apiKeyHelper or ANTHROPIC_AUTH_TOKEN, a Pro/Max/Ultra login, --bare without an API key, or a first launch before the fetch lands — all conditions the user controls. Versions that predate this setting ignore it; pair it with a minimum-version policy on a mixed fleet. 'claude auth status' reports the Anthropic API as apiProvider "firstParty".
9105
9152
  */
9106
9153
  allowedProviders?: ('anthropic' | 'customEndpoint' | 'bedrock' | 'vertex' | 'foundry' | 'anthropicAws' | 'mantle' | 'gateway')[];
9107
9154
  /**
@@ -9685,7 +9732,7 @@ export declare interface Settings {
9685
9732
  startDirectory?: string;
9686
9733
  }[];
9687
9734
  /**
9688
- * SSH connections in Claude Desktop on macOS and Linux whose host comes from a command. A list of entries, each with `id`, `name` and `command`, and optionally `sshIdentityFile` and `startDirectory`. When you ask Desktop to create or replace an entry's host, it runs `command` on this computer: a program name or absolute path, followed by plain arguments. There is no shell, so quotes, pipes, variables and a leading `~` do not work. The command must print only the host on standard output: `host` or `user\@host` on one line, or a JSON object with `sshHost` and, optionally, `sshPort` and `startDirectory`. Desktop reads this key only from user settings and from this computer's managed settings. Claude Code itself does not use it.
9735
+ * SSH connections in Claude Desktop whose host comes from a command. A list of entries, each with `id`, `name` and `command`, and optionally `sshIdentityFile` and `startDirectory`. Desktop runs `command` on this computer when you create the connection or another host for it, not each time you connect. `command` is a program name or absolute path (single-quote a path with spaces), then plain arguments. Nothing else can be quoted. For pipes, variables or a leading `~`, use a script. On Windows, the program must be a full path from a drive letter, such as `C:/tools/acme.exe`, ending in `.exe`, `.cmd` or `.bat`. Quoted paths and Windows need Claude Desktop v4.16336.0 or later. The command must print only the host on standard output: `host` or `user\@host` on one line, or a JSON object with `sshHost` and, optionally, `sshPort` and `startDirectory`. Desktop reads this key only from user settings and from this computer's managed settings. Claude Code itself does not use it.
9689
9736
  */
9690
9737
  sshHostCommands?: unknown[];
9691
9738
  /**