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

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.318",
2
+ "version": "2.1.319",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "ca1fa9dea62c1027756786c841c548788644560d",
5
- "buildDate": "2026-11-03T19:21:35Z",
4
+ "commit": "fbdd7e02e8530e4c2ade8cc67d30104e53d2c8f2",
5
+ "buildDate": "2026-11-05T19:38:09Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude",
9
- "checksum": "677a2ea7bf576cedd20e191d973914ed8a41796f53a63b1923381ddc4d5b5e7d",
10
- "size": 319598464
9
+ "checksum": "1f53587e92dee8e089fa349188a4cda64fa34ace6e7b0ca2ee278ddaa3cc2ebd",
10
+ "size": 321995200
11
11
  },
12
12
  "darwin-x64": {
13
13
  "binary": "claude",
14
- "checksum": "ee9c8577a528aa8efa478bf552b17efa40bb58aa4981d2913c13d383a4d409a4",
15
- "size": 334272544
14
+ "checksum": "af6f1f5510ae98d56a155bf8f007aa9d5b44efccc9c10c8e10ef35039e95a940",
15
+ "size": 336699808
16
16
  },
17
17
  "linux-arm64": {
18
18
  "binary": "claude",
19
- "checksum": "53a0d7e219d7b0804ecba5dbc002745e89f786cc946d2de85a6470d5b2d1fb06",
20
- "size": 337438136
19
+ "checksum": "a7e687fd1cb054d651c7588223de3786c99d4c682365e3c3ae1e59ce7f3a591f",
20
+ "size": 339797432
21
21
  },
22
22
  "linux-x64": {
23
23
  "binary": "claude",
24
- "checksum": "708c77b204db30086ff6f1ed34577bda03e1be74ced80557cbf7b54249ebf0bd",
25
- "size": 337814032
24
+ "checksum": "dabafec82ca1319fa43d8be36a10fc61b1d11821cb98ad5df04ad95e199b8eed",
25
+ "size": 340226576
26
26
  },
27
27
  "linux-arm64-musl": {
28
28
  "binary": "claude",
29
- "checksum": "a5ec862f882101dbe3e959ec166ab144e902a8e8e76215a2345b3860fe92ad28",
30
- "size": 321679624
29
+ "checksum": "244e1aaedb73cb73571c2d5f2380f7ad251ba7e010d2747a203d631a1e7bd2e8",
30
+ "size": 324104456
31
31
  },
32
32
  "linux-x64-musl": {
33
33
  "binary": "claude",
34
- "checksum": "e6ff03823153a699d708c88c2fa87d18a1f6b45f13b14a985a221f8af442dd54",
35
- "size": 324274760
34
+ "checksum": "b0f74e3c97fc4df46101bc7bcd0054d0f63733261cd63e5a0413cd50d66197f2",
35
+ "size": 326687304
36
36
  },
37
37
  "win32-x64": {
38
38
  "binary": "claude.exe",
39
- "checksum": "b9aa5b08dc2cc46ea77d334dce792d1b8fdbb3a43bb290efdebdc905b1181082",
40
- "size": 342408352
39
+ "checksum": "2e055732c9d03d22700d9046251a8370b673607bfcc9e4d16a1b0e8fb1345cbd",
40
+ "size": 344807072
41
41
  },
42
42
  "win32-arm64": {
43
43
  "binary": "claude.exe",
44
- "checksum": "4626adbfe89eac61c79771ba866c63e7561d501cfba66a45be11213f1a33b1a0",
45
- "size": 325568672
44
+ "checksum": "59b1ace11fad7f95c17a4ba01cf50eb48af20cd133df93129b34aa8e633bd6b1",
45
+ "size": 327968928
46
46
  }
47
47
  },
48
48
  "sdkCompat": {
49
49
  "testedWrapperVersions": [
50
- "0.3.285",
51
50
  "0.3.286",
52
51
  "0.3.287",
53
52
  "0.3.288",
@@ -76,7 +75,8 @@
76
75
  "0.3.314",
77
76
  "0.3.315",
78
77
  "0.3.316",
79
- "0.3.317"
78
+ "0.3.317",
79
+ "0.3.318"
80
80
  ],
81
81
  "harnessSchema": 1
82
82
  }
package/manifest.zst.json CHANGED
@@ -1,61 +1,60 @@
1
1
  {
2
- "version": "2.1.318",
2
+ "version": "2.1.319",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "ca1fa9dea62c1027756786c841c548788644560d",
5
- "buildDate": "2026-11-03T19:23:40Z",
4
+ "commit": "fbdd7e02e8530e4c2ade8cc67d30104e53d2c8f2",
5
+ "buildDate": "2026-11-05T19:39:56Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude.zst",
9
- "checksum": "f49b990254804131f0be0f60260da9b4a55ec9fa73af0252816e423cb0e178dc",
10
- "size": 110417800,
9
+ "checksum": "82a59698bcec8a2074cb7bacbd130cf557c103523f1a450ad113ab8dd8778a8e",
10
+ "size": 111335285,
11
11
  "bundle": {
12
- "checksum": "2d8d81d68faeee59165d30c2e266885f6a05ed17d9314e2ede6901d46fab64da",
13
- "size": 110416855
12
+ "checksum": "604ca06d6a5bb0b844644ec45230cb0f111e0add43070cb3b960254524b9c31a",
13
+ "size": 111334988
14
14
  }
15
15
  },
16
16
  "darwin-x64": {
17
17
  "binary": "claude.zst",
18
- "checksum": "17e41df7c85b0915a0d062608866de966654a1ddb7c6881465ab99fea5a19599",
19
- "size": 117597063,
18
+ "checksum": "7e0ce461550d322fabb9f762f420b1599970cce2d54ca544862b98885a23a957",
19
+ "size": 118519141,
20
20
  "bundle": {
21
- "checksum": "37553552f8e1495a18faec8e4b2984ea1111aec0519462ab3f8a29605c3b7963",
22
- "size": 117575621
21
+ "checksum": "ef9da45c0f87263ebac1313e017afc02e6278167ca2d09fcea63884b733d9cde",
22
+ "size": 118520064
23
23
  }
24
24
  },
25
25
  "linux-arm64": {
26
26
  "binary": "claude.zst",
27
- "checksum": "579259965c17034f3172b0c31db3f6922cde92e5f183f14541d1615607461d21",
28
- "size": 121788996
27
+ "checksum": "fdd8a686cb0d4bba6f2a59d5f120de976b5d5ef976df029e48b802dd15381130",
28
+ "size": 122648933
29
29
  },
30
30
  "linux-x64": {
31
31
  "binary": "claude.zst",
32
- "checksum": "760aaca865c68a315e49d129614a5f5dc9cab99f7de75899257faed68f553f3b",
33
- "size": 123000572
32
+ "checksum": "9977d90303740415af76bc808536b34620d0b30b7f08b0813603689875372ea0",
33
+ "size": 123849614
34
34
  },
35
35
  "linux-arm64-musl": {
36
36
  "binary": "claude.zst",
37
- "checksum": "52d0217d29a80b47063bbd52459f9820585aa28f350355c905c04e3fa7186b38",
38
- "size": 115798310
37
+ "checksum": "208399806e35f559bb2418564a4486f66ec9eb6da012231b07cf567fb6d8bdc1",
38
+ "size": 116648141
39
39
  },
40
40
  "linux-x64-musl": {
41
41
  "binary": "claude.zst",
42
- "checksum": "b1d8be36a41d50a5369835b893f8fcab7aeee8067da152ef6eaa0b9b2383f74d",
43
- "size": 117196041
42
+ "checksum": "37e7dd52ce5978369ba465a41491a2d410050fb4928fbc439170f07fa3f2e24a",
43
+ "size": 118052300
44
44
  },
45
45
  "win32-x64": {
46
46
  "binary": "claude.exe.zst",
47
- "checksum": "c1b324353077ece04cc245b2eb037716dab4fc6174c6bd0721b7f4dcc5888c14",
48
- "size": 124820462
47
+ "checksum": "74100ed046e9c26d9f71bcf7459291232fafcb5f5d3833c4e6216adba98f835b",
48
+ "size": 125727473
49
49
  },
50
50
  "win32-arm64": {
51
51
  "binary": "claude.exe.zst",
52
- "checksum": "5e11b27469741a280a5c90a994aa7c67a8401b6200373adb440a04f5ec790492",
53
- "size": 118881914
52
+ "checksum": "b762fea3d1aa6388812b8451103eb3efd52053b6201043b6063ae28aa518d8d2",
53
+ "size": 119791890
54
54
  }
55
55
  },
56
56
  "sdkCompat": {
57
57
  "testedWrapperVersions": [
58
- "0.3.285",
59
58
  "0.3.286",
60
59
  "0.3.287",
61
60
  "0.3.288",
@@ -84,7 +83,8 @@
84
83
  "0.3.314",
85
84
  "0.3.315",
86
85
  "0.3.316",
87
- "0.3.317"
86
+ "0.3.317",
87
+ "0.3.318"
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.319",
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.319",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.319",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.319",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.319",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.319",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.319",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.319",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.319"
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-5fx2pfbt.mjs",
89
+ "core-actjkrgm.mjs",
90
+ "core-ed8v4zmx.mjs",
91
+ "core-ytn251z7.mjs"
92
92
  ],
93
- "claudeCodeVersion": "2.1.318"
93
+ "claudeCodeVersion": "2.1.319"
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
  /**
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? }`
@@ -4224,6 +4229,7 @@ export declare type SDKControlGetContextUsageResponse = {
4224
4229
  cache_creation_input_tokens: number;
4225
4230
  cache_read_input_tokens: number;
4226
4231
  } | null;
4232
+
4227
4233
  };
4228
4234
 
4229
4235
  /**
@@ -4924,7 +4930,7 @@ export declare type SDKControlListPermissionRulesResponse = {
4924
4930
  };
4925
4931
 
4926
4932
  /**
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.
4933
+ * 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
4934
  */
4929
4935
  declare type SDKControlMcpCallRequest = {
4930
4936
  subtype: 'mcp_call';
@@ -4941,13 +4947,17 @@ declare type SDKControlMcpCallRequest = {
4941
4947
  */
4942
4948
  expires_at?: string;
4943
4949
  /**
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.
4950
+ * 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
4951
  */
4946
4952
  timeout_ms?: number;
4947
4953
  /**
4948
4954
  * 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
4955
  */
4950
4956
  result_not_for_model?: boolean;
4957
+ /**
4958
+ * 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.
4959
+ */
4960
+ check_permissions?: boolean;
4951
4961
  /**
4952
4962
  * 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
4963
  */
@@ -5017,7 +5027,7 @@ export declare type SDKControlMcpReadResourceResponse = {
5017
5027
  */
5018
5028
  blob?: string;
5019
5029
  /**
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.
5030
+ * 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
5031
  */
5022
5032
  _meta?: Record<string, unknown>;
5023
5033
  }[];
@@ -5099,7 +5109,7 @@ declare type SDKControlPermissionRequest = {
5099
5109
  */
5100
5110
  default_to_no?: boolean;
5101
5111
  /**
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.
5112
+ * 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
5113
  */
5104
5114
  matched_ask_rule?: {
5105
5115
  source: string;
@@ -5113,7 +5123,7 @@ declare type SDKControlPermissionRequest = {
5113
5123
 
5114
5124
  description?: string;
5115
5125
  /**
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.
5126
+ * 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
5127
  */
5118
5128
  requires_user_interaction?: boolean;
5119
5129
 
@@ -5275,6 +5285,7 @@ declare type SDKControlRenameSessionRequest = {
5275
5285
  * 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
5286
  */
5277
5287
  session_id?: string;
5288
+
5278
5289
  };
5279
5290
 
5280
5291
  /**
@@ -5291,7 +5302,7 @@ export declare type SDKControlRequest = {
5291
5302
 
5292
5303
  };
5293
5304
 
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;
5305
+ 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
5306
 
5296
5307
  /**
5297
5308
  * 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 +5376,17 @@ declare type SDKControlSetColorRequest = {
5365
5376
  color: string;
5366
5377
  };
5367
5378
 
5379
+ /**
5380
+ * 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.
5381
+ */
5382
+ declare type SDKControlSetHasSubscribersRequest = {
5383
+ subtype: 'set_has_subscribers';
5384
+ /**
5385
+ * false: nobody watches now. true: somebody does. null: the host does not know, which counts as true.
5386
+ */
5387
+ has_subscribers: boolean | null;
5388
+ };
5389
+
5368
5390
  /**
5369
5391
  * 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
5392
  */
@@ -5985,6 +6007,7 @@ export declare type SDKRateLimitInfo = {
5985
6007
 
5986
6008
 
5987
6009
 
6010
+
5988
6011
  /**
5989
6012
  * 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
6013
  */
@@ -6047,6 +6070,7 @@ export declare type SDKResultError = {
6047
6070
 
6048
6071
  terminal_reason?: TerminalReason;
6049
6072
 
6073
+
6050
6074
  /**
6051
6075
  * 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
6076
  */
@@ -6103,6 +6127,7 @@ export declare type SDKResultSuccess = {
6103
6127
 
6104
6128
 
6105
6129
 
6130
+
6106
6131
 
6107
6132
 
6108
6133
  user_message_uuid?: string;
@@ -6170,6 +6195,7 @@ export declare type SDKResultSuccess = {
6170
6195
  deferred_tool_use?: SDKDeferredToolUse;
6171
6196
  terminal_reason?: TerminalReason;
6172
6197
 
6198
+
6173
6199
  /**
6174
6200
  * 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
6201
  */
@@ -6243,7 +6269,7 @@ export declare type SDKSessionStateChangedMessage = {
6243
6269
  };
6244
6270
 
6245
6271
  /**
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.
6272
+ * 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
6273
  */
6248
6274
  export declare type SDKSessionWritesLostMessage = {
6249
6275
  type: 'system';
@@ -6299,6 +6325,7 @@ export declare type SDKStatusMessage = {
6299
6325
 
6300
6326
 
6301
6327
 
6328
+
6302
6329
  uuid: UUID;
6303
6330
  session_id: string;
6304
6331
  };
@@ -6425,6 +6452,9 @@ export declare type SDKTaskNotificationMessage = {
6425
6452
  resource_links?: SDKMcpResourceLink[];
6426
6453
 
6427
6454
 
6455
+
6456
+
6457
+
6428
6458
  skip_transcript?: boolean;
6429
6459
  /**
6430
6460
  * 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 +6489,7 @@ export declare type SDKTaskProgressMessage = {
6459
6489
  */
6460
6490
  summary?: string;
6461
6491
 
6492
+
6462
6493
  uuid: UUID;
6463
6494
  session_id: string;
6464
6495
  };
@@ -7293,6 +7324,10 @@ export declare interface Settings {
7293
7324
  * Disable auto mode
7294
7325
  */
7295
7326
  disableAutoMode?: 'disable';
7327
+ /**
7328
+ * 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.
7329
+ */
7330
+ denyInsteadOfPrompting?: boolean;
7296
7331
  /**
7297
7332
  * Additional directories to include in the permission scope
7298
7333
  */
@@ -7714,6 +7749,10 @@ export declare interface Settings {
7714
7749
  * 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
7750
  */
7716
7751
  disableSkillShellExecution?: boolean;
7752
+ /**
7753
+ * 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.
7754
+ */
7755
+ disableWindowsBashCommandSplit?: boolean;
7717
7756
  /**
7718
7757
  * Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip).
7719
7758
  */
@@ -9685,7 +9724,7 @@ export declare interface Settings {
9685
9724
  startDirectory?: string;
9686
9725
  }[];
9687
9726
  /**
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.
9727
+ * 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
9728
  */
9690
9729
  sshHostCommands?: unknown[];
9691
9730
  /**