@anthropic-ai/claude-agent-sdk 0.3.311 → 0.3.314

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.311",
2
+ "version": "2.1.314",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "e7d3b8365a0ffbe2f5dd032feb28e9fd9c7de025",
5
- "buildDate": "2026-10-26T19:03:46Z",
4
+ "commit": "5c99a5b6399766569a32979c715862fdb61c7efa",
5
+ "buildDate": "2026-10-29T23:00:10Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude",
9
- "checksum": "85d8c08707fcfd1e78ffa0204eefbc6ec9e4fe22f375fb2767ef85d957ed3161",
10
- "size": 276185504
9
+ "checksum": "21d6e7b9a6f07b4cfcb7df13760b3b72aa25e084e13a5354413382987ba832ed",
10
+ "size": 278848096
11
11
  },
12
12
  "darwin-x64": {
13
13
  "binary": "claude",
14
- "checksum": "d34e1cb82015b050471a97574aa6ea6f698ecf3a97a61c980961f43ad9f838f5",
15
- "size": 287420928
14
+ "checksum": "404779a308a358ecec8b25c8bccf0ce79a94cf261d12cb74065518d189c174f8",
15
+ "size": 290710016
16
16
  },
17
17
  "linux-arm64": {
18
18
  "binary": "claude",
19
- "checksum": "2e2496c9a8065df93acb0fca2d341f59a6b8777649b2e025ab8c9bcd5eef61f3",
20
- "size": 293658808
19
+ "checksum": "a66c0a8f5d0c87a439953d797985192bbcbaefbce2e0d7b2eaa8df30ef0f3ef2",
20
+ "size": 297067016
21
21
  },
22
22
  "linux-x64": {
23
23
  "binary": "claude",
24
- "checksum": "86dc1fcc69498159eaf15f446613e847010f9036bfbbdffd4c49350be8489ada",
25
- "size": 293776752
24
+ "checksum": "4487042b4c4f5d88d4568f68ae98aae0b1ffae58864cf57fb868641bc5f84594",
25
+ "size": 298229464
26
26
  },
27
27
  "linux-arm64-musl": {
28
28
  "binary": "claude",
29
- "checksum": "172150e3f9ea07e8e2e2e29862d7d9a25f5c234d8e909e4063df237665bf09b9",
30
- "size": 285822152
29
+ "checksum": "95b14da22c20a6b4c5b24c8ff08993ac44663a0f52dd262086482ec1a3352d38",
30
+ "size": 287595856
31
31
  },
32
32
  "linux-x64-musl": {
33
33
  "binary": "claude",
34
- "checksum": "cd40dd327145ee47aa0deacd571801c1d782388f709d71242eee6b91de8ed11f",
35
- "size": 287442392
34
+ "checksum": "b7a970a6e1fde58d8032723f0f4ebdc9dd9aa66150534344e5d01d32c1f5813f",
35
+ "size": 289338976
36
36
  },
37
37
  "win32-x64": {
38
38
  "binary": "claude.exe",
39
- "checksum": "966f4b2ce962298f5dee6a942e8c47c8f97392e69e728e622319a98b259c0680",
40
- "size": 298870432
39
+ "checksum": "66e00df32e6981f686a91f67287fcc86e6e1b80ba4973a7b7c4aa43c59986cfa",
40
+ "size": 301388448
41
41
  },
42
42
  "win32-arm64": {
43
43
  "binary": "claude.exe",
44
- "checksum": "951b5d94bf2a5296db2c442784e68d18fa04dec2d7d2e805aa50e75d618aad5e",
45
- "size": 282933920
44
+ "checksum": "7bb0bc6be25e71e7aa3be2dfa537fd4c9c06d4565eb4446b6b748a74ea0d3a28",
45
+ "size": 285591200
46
46
  }
47
47
  },
48
48
  "sdkCompat": {
49
49
  "testedWrapperVersions": [
50
- "0.3.278",
51
- "0.3.280",
52
50
  "0.3.281",
53
51
  "0.3.282",
54
52
  "0.3.283",
package/manifest.zst.json CHANGED
@@ -1,62 +1,60 @@
1
1
  {
2
- "version": "2.1.311",
2
+ "version": "2.1.314",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "e7d3b8365a0ffbe2f5dd032feb28e9fd9c7de025",
5
- "buildDate": "2026-10-26T19:05:12Z",
4
+ "commit": "5c99a5b6399766569a32979c715862fdb61c7efa",
5
+ "buildDate": "2026-10-29T23:01:46Z",
6
6
  "platforms": {
7
7
  "darwin-arm64": {
8
8
  "binary": "claude.zst",
9
- "checksum": "68a55ab38088b10f213be752ac47e2d88e81cf8ac2bae3a31396b2cd6c9a91ec",
10
- "size": 93380583,
9
+ "checksum": "a23ee5ca645a7e342f0960464c948baeb7c4218894ba25836da12c289ada56ca",
10
+ "size": 94571356,
11
11
  "bundle": {
12
- "checksum": "75ff20c96ec39582035067231b6aa4a1b5830e53bcb1167f81f9639be0b2a842",
13
- "size": 93383140
12
+ "checksum": "77aa04c73e1117a20a7d92ed72d911a189bd133b413f0bbc15d328d514310efe",
13
+ "size": 94578963
14
14
  }
15
15
  },
16
16
  "darwin-x64": {
17
17
  "binary": "claude.zst",
18
- "checksum": "066565c1d787345f945bace4f0cb2f2a41bf96800adabb0f0b0c3bb701af69d6",
19
- "size": 98817523,
18
+ "checksum": "1ceb09cb91340b3b4de212c97b093ce39c9b05b92592402b7a6f180e968170ab",
19
+ "size": 100220791,
20
20
  "bundle": {
21
- "checksum": "84cb2ff289ac3316744057fa0786c641b74ca8733f0cf75d7bb2b604444d33bb",
22
- "size": 98818787
21
+ "checksum": "9ae05b0e79420e92d9358cae8487706e0c72ef26ca98113724a80c5f5f12f771",
22
+ "size": 100216724
23
23
  }
24
24
  },
25
25
  "linux-arm64": {
26
26
  "binary": "claude.zst",
27
- "checksum": "0b6291903c4dde17f456c8a8799a3101877321bd667aa78e793dc1fe0709893c",
28
- "size": 102741700
27
+ "checksum": "5ad42d08f44e02d56922ca82d88db6388e93564a8fc03fef02e4279b23204214",
28
+ "size": 105147380
29
29
  },
30
30
  "linux-x64": {
31
31
  "binary": "claude.zst",
32
- "checksum": "d0c00b80761f3030f34cf0812266f6c6f8210ff9af7242f7c6c76c5600499caf",
33
- "size": 103729711
32
+ "checksum": "e8c6f963a5417a93eb19a8db70f4609c039d827426120971d2eff34e90c704b3",
33
+ "size": 107353846
34
34
  },
35
35
  "linux-arm64-musl": {
36
36
  "binary": "claude.zst",
37
- "checksum": "95f37a2808a40596f1fcc005f64eaaf7975d6a46c365876845d0909714c5a91b",
38
- "size": 101084046
37
+ "checksum": "12dd7ef6e7e07bfe38f70d298931f85dfa1d763cca7389eb13b13f190bfa0ec3",
38
+ "size": 102121171
39
39
  },
40
40
  "linux-x64-musl": {
41
41
  "binary": "claude.zst",
42
- "checksum": "edae71d077ea4f4c413981968cb864d3b7ab8a6010fec1dc309d7e7ba403bfec",
43
- "size": 102122872
42
+ "checksum": "14238b2f775d6ae2f85ed6e958c603984fbb23119d670bec2963c48c6c779404",
43
+ "size": 103217626
44
44
  },
45
45
  "win32-x64": {
46
46
  "binary": "claude.exe.zst",
47
- "checksum": "f2966586f6f936a48b7025a8eb0604e0a1a241e4b5ea877db34e6443b10d6989",
48
- "size": 106965057
47
+ "checksum": "dd9a764520cc9336dcd1580504b23de08f218a2a994dc04b39e9a38d922c81af",
48
+ "size": 108263820
49
49
  },
50
50
  "win32-arm64": {
51
51
  "binary": "claude.exe.zst",
52
- "checksum": "99648d7d1d66ff68f5238cbf59422e3db422e117863ecf02e13c4cea99179165",
53
- "size": 102170242
52
+ "checksum": "6ccba3912b025a5e7a848549785b1ef44885150faa599261bfb9217bb55bd203",
53
+ "size": 103400908
54
54
  }
55
55
  },
56
56
  "sdkCompat": {
57
57
  "testedWrapperVersions": [
58
- "0.3.278",
59
- "0.3.280",
60
58
  "0.3.281",
61
59
  "0.3.282",
62
60
  "0.3.283",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.311",
3
+ "version": "0.3.314",
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.311",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.311",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.311",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.311",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.311",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.311",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.311",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.311"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.314",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.314",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.314",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.314",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.314",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.314",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.314",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.314"
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-0bjz4v5z.mjs",
89
- "core-ptjgnrch.mjs",
90
- "core-rbkmqzx3.mjs",
91
- "core-zbftdwza.mjs"
88
+ "core-a9vq6p1m.mjs",
89
+ "core-bb8r6h44.mjs",
90
+ "core-kzw924e6.mjs",
91
+ "core-t4mxrz5y.mjs"
92
92
  ],
93
- "claudeCodeVersion": "2.1.311"
93
+ "claudeCodeVersion": "2.1.314"
94
94
  }
package/sdk-tools.d.ts CHANGED
@@ -467,6 +467,7 @@ export type ArtifactOutput =
467
467
  rel?: "mine" | "shared";
468
468
  external?: true;
469
469
  role?: "editor" | "commenter" | "reader" | "viewer";
470
+ outsidersMayHaveWritten?: true;
470
471
  pinned?: boolean;
471
472
  }[];
472
473
  truncated?: boolean;
@@ -3322,6 +3323,10 @@ export interface BashOutput {
3322
3323
  * True when this backgrounded command is terminated at its caller's final response, so no completion notification can follow (a synchronous subagent's command, or a headless session that takes no further input and is not waiting for background commands); absent when the command survives
3323
3324
  */
3324
3325
  backgroundEndsWithFinalResponse?: true;
3326
+ /**
3327
+ * True when the subagent that owns this backgrounded command parks for its end and is woken by it
3328
+ */
3329
+ backgroundWakesOwner?: true;
3325
3330
  /**
3326
3331
  * Flag to indicate if sandbox mode was overridden
3327
3332
  */
@@ -3978,6 +3983,10 @@ export interface AskUserQuestionOutput {
3978
3983
  * Free-text notes the user added to their selection.
3979
3984
  */
3980
3985
  notes?: string;
3986
+ /**
3987
+ * How the question went unanswered: 'skipped' (the user skipped it), 'replied_in_chat' (the user sent a chat message instead), or 'dismissed' (the user closed the card). The model does not see this field; put the text it should read in `answers`. Absent when the question was answered, and also when the answering client did not report it (in a session that does not advertise ask_user_question_unanswered_v1, from an older client, or in an older transcript): then only the text in `answers` says how it ended. Treat any other value as absent.
3988
+ */
3989
+ unanswered?: "skipped" | "replied_in_chat" | "dismissed";
3981
3990
  };
3982
3991
  };
3983
3992
  /**
package/sdk.d.ts CHANGED
@@ -361,17 +361,23 @@ export declare type ClaimOptions = {
361
361
  * permission rules, a claim that has one holds the prompt until the process
362
362
  * has accepted the overlay (one round trip) and does not send it if the
363
363
  * overlay is refused: `claimed` then rejects with `settings_not_applied`
364
- * and the process is closed — start the session with `query()`. One limit
365
- * in this version: keys that govern hooks (`hooks`, `disableAllHooks`,
364
+ * and the process is let go — start the session with `query()`. The overlay
365
+ * is written ahead of the claim, so `disabledMcpjsonServers`,
366
+ * `deniedMcpServers` and `enabledPlugins` decide which of the folder's
367
+ * `.mcp.json` servers and plugins the claim starts, and a refusal stops the
368
+ * claim, as does an invalid value that would leave one of those keys out of
369
+ * force. `model`, `agent`, `fastMode`, `permissions`, `availableModels` and
370
+ * `disableAutoMode` follow it: they are in force before the prompt you pass
371
+ * to `claim()` is read, but the folder's SessionStart hooks, and a first
372
+ * message such a hook hands the session, do not wait for them, and a refusal
373
+ * of them comes after the folder's servers have started. One limit in this version:
374
+ * keys that govern hooks (`hooks`, `disableAllHooks`,
366
375
  * `allowManagedHooksOnly`, `allowedHttpHookUrls`, `httpHookAllowedEnvVars`)
367
376
  * are refused — `claim()` throws before sending anything and the spare stays
368
- * parked — because the claimed folder's SessionStart hooks start with the
369
- * claim, before the overlay lands; give those to `prewarm()` in
370
- * `Options.settings`, where they are in force before any hook as on a cold
371
- * start. The rest of the overlay is in force before the prompt you pass to
372
- * `claim()` is read; the claimed folder's own SessionStart hooks, and a
373
- * first message such a hook hands the session, start with the claim and do
374
- * not wait for the overlay.
377
+ * parked; give those to `prewarm()` in `Options.settings`, where they are in
378
+ * force before any hook as on a cold start. Servers from the user's or
379
+ * managed configuration, and those running in the parked spare, are
380
+ * `prewarm()`'s to govern.
375
381
  */
376
382
  settings?: Parameters<Query['applyFlagSettings']>[0];
377
383
  appendSystemPrompt?: string;
@@ -2845,9 +2851,9 @@ export declare type PreToolUseHookSpecificOutput = {
2845
2851
  *
2846
2852
  * What a claim can set ({@link ClaimOptions}): `cwd`, `additionalDirectories`,
2847
2853
  * `model`, `permissionMode`, `maxThinkingTokens`, a flag-settings overlay
2848
- * (`settings`, e.g. effort or permission rules — but not hook settings, which
2849
- * would land after the claimed folder's SessionStart hooks have started; those
2850
- * go in `Options.settings` here), `appendSystemPrompt`, `title`, `agents`, and
2854
+ * (`settings`, e.g. effort, permission rules or which of the folder's MCP
2855
+ * servers may start — but not hook settings; those go in `Options.settings`
2856
+ * here), `appendSystemPrompt`, `title`, `agents`, and
2851
2857
  * three environment variables (`CLAUDE_CODE_OAUTH_TOKEN`,
2852
2858
  * `CLAUDE_CODE_SESSION_ACCESS_TOKEN`, `CLAUDE_CODE_HOST_SESSION_ID`). Everything
2853
2859
  * else — the executable, `settingSources`, `env` the process reads at
@@ -4818,6 +4824,7 @@ export declare type SDKControlInitializeResponse = {
4818
4824
 
4819
4825
 
4820
4826
 
4827
+
4821
4828
  };
4822
4829
 
4823
4830
  /**
@@ -5067,13 +5074,14 @@ declare type SDKControlPermissionRequest = {
5067
5074
 
5068
5075
  description?: string;
5069
5076
  /**
5070
- * 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 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, so a grant keyed on the tool name must not answer it, OR the SDK host worded the ask (title and description are its consent copy, which a push cannot carry whole). In each case the user has to open the session to answer.
5077
+ * 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 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, so a grant keyed on the tool name must not answer it, 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.
5071
5078
  */
5072
5079
  requires_user_interaction?: boolean;
5073
5080
 
5074
5081
 
5075
5082
 
5076
5083
 
5084
+
5077
5085
  };
5078
5086
 
5079
5087
  /**
@@ -5969,7 +5977,7 @@ export declare type SDKResultError = {
5969
5977
  errors: string[];
5970
5978
 
5971
5979
  /**
5972
- * Set on the zeroed error_during_execution result a stream-json run writes before exiting on a known startup failure; errors carries the same text as stderr. Failures that used to end with stderr alone write that result only when the host sets CLAUDE_CODE_STARTUP_FAILURE_RESULTS. Absent on every other result, on startup failures without a known cause, and from older producers.
5980
+ * Set on the zeroed error_during_execution result a stream-json run writes before exiting on a known startup failure; errors carries the failure message. Failures that otherwise end with stderr alone write that result only when the host sets CLAUDE_CODE_STARTUP_FAILURE_RESULTS. Absent on every other result, on startup failures without a known cause, and from older producers.
5973
5981
  */
5974
5982
  startup_failure_reason?: SDKStartupFailureReason;
5975
5983
  /**
@@ -6032,6 +6040,9 @@ export declare type SDKResultSuccess = {
6032
6040
 
6033
6041
 
6034
6042
 
6043
+
6044
+
6045
+
6035
6046
 
6036
6047
 
6037
6048
 
@@ -6185,9 +6196,9 @@ export declare type SDKSettingsParseError = {
6185
6196
  };
6186
6197
 
6187
6198
  /**
6188
- * Why Claude Code refused to start, so a host can offer the fix instead of a retry. org_pin_api_key_conflict: managed settings pin a first-party or Cloud gateway sign-in, and an Anthropic API key or auth token is configured instead. provider_not_allowed: managed settings list the API providers this machine may use (allowedProviders), and the session is set up for one that is not listed. org_verify_failed: the sign-in's organization could not be verified against the pin (network, or a revoked token). org_pin_mismatch: the sign-in belongs to an organization the pin does not allow. managed_settings_invalid: managed policy settings could not be read, the pin names no organization, or managed model settings (deniedModels, or an availableModels list matched exactly) block the default model and leave no allowed model to use instead. remote_settings_required_unavailable: managed settings the organization requires could not be loaded. gateway_signin_required: the Cloud gateway ended this sign-in. gateway_access_denied: the Cloud gateway refused managed settings for this account. proxy_invalid: a proxy setting is not a complete URL. temp_dir_unusable: the per-user temp directory is unsafe or could not be created. cwd_unavailable: the working directory was deleted, moved or cannot be read. shell_tool_missing: Windows has no shell tool: Git Bash is missing, and PowerShell is missing or turned off by CLAUDE_CODE_USE_POWERSHELL_TOOL. session_held_by_background: the conversation to resume or continue is running as a background session. worktree_resume_refused: the resume was refused because the session's worktree failed its safety checks or the resume was launched from inside it; errors says whether a re-run continues without the worktree. worktree_unverified: the session's worktree could not be verified right now; retrying may succeed. cli_version_too_old: this Claude Code version is below the minimum Anthropic requires. bypass_root: bypass permissions mode was requested while running as root. org_config_required_unavailable: the organization requires its policy limits and managed settings before a session starts, and they could not be loaded (network, proxy, or an Anthropic error); retrying may succeed. org_config_refused: the organization requires its policy limits and managed settings, and Anthropic refused them for this sign-in (expired or revoked session, or the organization does not allow Claude Code for this account); signing in again or an admin's change is the fix, not a retry.
6199
+ * Why Claude Code refused to start, so a host can offer the fix instead of a retry. org_pin_api_key_conflict: managed settings pin a first-party or Cloud gateway sign-in, and an Anthropic API key or auth token is configured instead. provider_not_allowed: managed settings list the API providers this machine may use (allowedProviders), and the session is set up for one that is not listed. org_verify_failed: the sign-in's organization could not be verified against the pin (network, or a revoked token). org_pin_mismatch: the sign-in belongs to an organization the pin does not allow. managed_settings_invalid: managed policy settings could not be read, the pin names no organization, or managed model settings (deniedModels, or an availableModels list matched exactly) block the default model and leave no allowed model to use instead. remote_settings_required_unavailable: managed settings the organization requires could not be loaded. gateway_signin_required: the Cloud gateway ended this sign-in. gateway_access_denied: the Cloud gateway refused managed settings for this account. proxy_invalid: a proxy setting is not a complete URL. temp_dir_unusable: the per-user temp directory is unsafe or could not be created. cwd_unavailable: the working directory was deleted, moved or cannot be read. shell_tool_missing: Windows has no shell tool: Git Bash is missing, and PowerShell is missing or turned off by CLAUDE_CODE_USE_POWERSHELL_TOOL. session_held_by_background: the conversation to resume or continue is running as a background session. worktree_resume_refused: the resume was refused because the session's worktree failed its safety checks or the resume was launched from inside it; errors says whether a re-run continues without the worktree. worktree_unverified: the session's worktree could not be verified right now; retrying may succeed. cli_version_too_old: this Claude Code version is below the minimum Anthropic requires. bypass_root: bypass permissions mode was requested while running as root. org_config_required_unavailable: the organization requires its policy limits and managed settings before a session starts, and they could not be loaded (network, proxy, or an Anthropic error); retrying may succeed. org_config_refused: the organization requires its policy limits and managed settings, and Anthropic refused them for this sign-in (expired or revoked session, or the organization does not allow Claude Code for this account); signing in again or an admin's change is the fix, not a retry. sandbox_required_unavailable: a working sandbox is required and it cannot run in this session, for example because bubblewrap is missing or the platform is not supported; make the sandbox available or have the requirement changed.
6189
6200
  */
6190
- export declare type SDKStartupFailureReason = 'org_pin_api_key_conflict' | 'provider_not_allowed' | 'org_verify_failed' | 'org_pin_mismatch' | 'managed_settings_invalid' | 'remote_settings_required_unavailable' | 'gateway_signin_required' | 'gateway_access_denied' | 'proxy_invalid' | 'temp_dir_unusable' | 'cwd_unavailable' | 'shell_tool_missing' | 'session_held_by_background' | 'worktree_resume_refused' | 'worktree_unverified' | 'cli_version_too_old' | 'bypass_root' | 'org_config_required_unavailable' | 'org_config_refused';
6201
+ export declare type SDKStartupFailureReason = 'org_pin_api_key_conflict' | 'provider_not_allowed' | 'org_verify_failed' | 'org_pin_mismatch' | 'managed_settings_invalid' | 'remote_settings_required_unavailable' | 'gateway_signin_required' | 'gateway_access_denied' | 'proxy_invalid' | 'temp_dir_unusable' | 'cwd_unavailable' | 'shell_tool_missing' | 'session_held_by_background' | 'worktree_resume_refused' | 'worktree_unverified' | 'cli_version_too_old' | 'bypass_root' | 'org_config_required_unavailable' | 'org_config_refused' | 'sandbox_required_unavailable';
6191
6202
 
6192
6203
  export declare type SDKStatus = 'compacting' | 'requesting' | null;
6193
6204
 
@@ -6268,7 +6279,7 @@ export declare type SDKSystemMessage = {
6268
6279
  fast_mode_disabled_reason?: FastModeDisabledReason;
6269
6280
 
6270
6281
  /**
6271
- * The effort level the session will send on its next request — after env overrides, session state, org caps and model-support downgrades; the same value get_settings reports as applied.effort. null when no effort parameter will be sent (a model without effort, CLAUDE_CODE_EFFORT_LEVEL=unset, or an internal numeric budget). Present on Remote Control bridge init frames (terminal- and Desktop/VS Code-hosted sessions); absent on hosts that do not publish it and on CLIs that predate the field. Re-emitted inits carry the current value — the newest frame wins.
6282
+ * The effort level set for the session's next message — after env overrides, session state, org caps and model-support downgrades; the same value get_settings reports as applied.effort. null when no effort parameter will be sent (a model without effort, CLAUDE_CODE_EFFORT_LEVEL=unset, or an internal numeric budget). Present on Remote Control bridge init frames (terminal- and Desktop/VS Code-hosted sessions); absent on hosts that do not publish it and on CLIs that predate the field. Re-emitted inits carry the current value — the newest frame wins.
6272
6283
  */
6273
6284
  effort?: ('low' | 'medium' | 'high' | 'xhigh' | 'max') | null;
6274
6285
 
@@ -6277,7 +6288,7 @@ export declare type SDKSystemMessage = {
6277
6288
  */
6278
6289
  view_mode?: 'focus' | 'default';
6279
6290
  /**
6280
- * Protocol capabilities this CLI supports, so SDK consumers can feature-detect instead of version-sniffing. Open set — ignore unknown values; check each capability for exactly the behavior you use. 'interrupt_receipt_v1' = the interrupt control_response success payload carries still_queued (uuids of async user messages that survive the interrupt). 'interrupt_cancel_queued_v1' = the interrupt control_request honors cancel_queued:true (queued and pending-dispatch commands are cancelled alongside the abort, listed on the response's cancelled field; still_queued is then empty — including any uuid that was mid-fold at the interrupt instant, since this request also aborts and the fold never delivers it — except that a client driving a hosted session lists there what it can no longer recall: a send already in flight to that session, or the first prompt the session was created with). 'queued_notifications' = the CLI accepts inbound queued_notification stream messages and drains them via ReadNotifications (the cloud session backend reads this from the persisted init event to decide whether it may send them). Absent on older CLIs.
6291
+ * Protocol capabilities this CLI supports, so SDK consumers can feature-detect instead of version-sniffing. Open set — ignore unknown values; check each capability for exactly the behavior you use. 'interrupt_receipt_v1' = the interrupt control_response success payload carries still_queued (uuids of async user messages that survive the interrupt). 'interrupt_cancel_queued_v1' = the interrupt control_request honors cancel_queued:true (queued and pending-dispatch commands are cancelled alongside the abort, listed on the response's cancelled field; still_queued is then empty — including any uuid that was mid-fold at the interrupt instant, since this request also aborts and the fold never delivers it — except that a client driving a hosted session lists there what it can no longer recall: a send already in flight to that session, or the first prompt the session was created with). 'queued_notifications' = the CLI accepts inbound queued_notification stream messages and drains them via ReadNotifications (the cloud session backend reads this from the persisted init event to decide whether it may send them). 'ask_user_question_unanswered_v1' = an AskUserQuestion answer may set annotations[question].unanswered ('skipped' | 'replied_in_chat' | 'dismissed'), which the tool result echoes; send it only to a session that advertises this, since an older CLI on a strict host refuses the whole answer. A strict host also refuses an answer with a value outside these three; a new value will come with a new capability. Absent on older CLIs.
6281
6292
  */
6282
6293
  capabilities?: string[];
6283
6294
 
@@ -7163,9 +7174,17 @@ export declare interface Settings {
7163
7174
  */
7164
7175
  disableBypassPermissionsMode?: 'disable';
7165
7176
  /**
7166
- * Refuse file-tool reads (Read, Grep, Glob, LSP) outside the working directories in every permission mode; true in any settings source wins. Also set when the user picks "block" on the one-time auto-mode prompt for a read outside the working directories.
7177
+ * Refuse file-tool reads (Read, Grep, Glob, LSP) outside the working directories in every permission mode; true in any settings source wins. No allow rule lifts it. Also set when the user picks "block" on the one-time auto-mode prompt for a read outside the working directories.
7167
7178
  */
7168
7179
  blockReadsOutsideWorkingDirectories?: boolean;
7180
+ /**
7181
+ * Refuse file-tool writes (Write, Edit, NotebookEdit) outside the working directories in every permission mode; true in any settings source wins. No allow rule lifts it. Files that Claude Code keeps for the session are not refused: its plan files, scratchpad and background job folder, and the auto-memory of this project, unless the CLAUDE_COWORK_MEMORY_PATH_OVERRIDE environment variable or a repository settings file points it elsewhere. Nothing runs them unless the model asks. Also refuses file-tool writes to Claude Code settings files, inside the working directories too, and takes EnterWorktree and ExitWorktree, which move the working directory, out of the tools on offer. Does not limit shell commands, MCP tools, the programs that hooks run, or the memory tools. Cloud sessions (Claude Code on the web), whose file tools run in a container that is itself the boundary, may not apply it.
7182
+ */
7183
+ blockWritesOutsideWorkingDirectories?: boolean;
7184
+ /**
7185
+ * Disable auto mode
7186
+ */
7187
+ disableAutoMode?: 'disable';
7169
7188
  /**
7170
7189
  * Additional directories to include in the permission scope
7171
7190
  */
@@ -9041,7 +9060,7 @@ export declare interface Settings {
9041
9060
  */
9042
9061
  allowLocalBinding?: boolean;
9043
9062
  /**
9044
- * macOS only: Additional XPC/Mach service names to allow looking up. Supports trailing-wildcard prefix matching (e.g., "com.apple.coresimulator.*"). Needed for tools that communicate via XPC such as the iOS Simulator or Playwright. Merged across settings sources. When managed settings or a --settings file set allowUnsandboxedCommands: false, or managed settings set network.allowManagedDomainsOnly: true, values from project settings (.claude/settings.json and .claude/settings.local.json) are ignored.
9063
+ * macOS only: Additional XPC/Mach service names to allow looking up. Supports trailing-wildcard prefix matching (e.g., "com.apple.CoreSimulator.*"). Needed for tools that communicate via XPC such as the iOS Simulator or Playwright. Each entry lets sandboxed commands reach services outside the sandbox, and the sandbox does not confine what those services do for them. Merged across settings sources. When managed settings or a --settings file set allowUnsandboxedCommands: false, or managed settings set network.allowManagedDomainsOnly: true, values from project settings (.claude/settings.json and .claude/settings.local.json) are ignored.
9045
9064
  */
9046
9065
  allowMachLookup?: string[];
9047
9066
  /**
@@ -9219,7 +9238,7 @@ export declare interface Settings {
9219
9238
  */
9220
9239
  allowAppleEvents?: boolean;
9221
9240
  /**
9222
- * Command patterns (Bash permission-rule syntax) that always run outside the sandbox. A convenience, not a security boundary: excluded commands still go through the permission flow. Merged across settings sources. When managed settings or a --settings file set allowUnsandboxedCommands: false, or managed settings set network.allowManagedDomainsOnly: true, values from project settings (.claude/settings.json and .claude/settings.local.json) are ignored.
9241
+ * Command patterns (Bash permission-rule syntax) for commands to run outside the sandbox. An entry takes a call out of the sandbox only when every command in the call matches an entry: in a Bash pipe or a chain such as `a && b`, each part needs its own match. Some calls stay sandboxed whatever the entries, such as one with a `cd`, a command substitution, or a redirect other than a file-descriptor duplication like `2>&1`, a heredoc included. A convenience, not a security boundary: excluded commands still go through the permission flow. Merged across settings sources. When managed settings or a --settings file set allowUnsandboxedCommands: false, or managed settings set network.allowManagedDomainsOnly: true, values from project settings (.claude/settings.json and .claude/settings.local.json) are ignored.
9223
9242
  */
9224
9243
  excludedCommands?: string[];
9225
9244
  /**
@@ -9379,6 +9398,7 @@ export declare interface Settings {
9379
9398
  */
9380
9399
  emojiCompletionEnabled?: boolean;
9381
9400
 
9401
+
9382
9402
  /**
9383
9403
  * When true, the plan-approval dialog offers a "clear context" option. Defaults to false.
9384
9404
  */
@@ -9603,7 +9623,7 @@ export declare interface Settings {
9603
9623
  */
9604
9624
  precomputeCompactionEnabled?: boolean;
9605
9625
  /**
9606
- * Set to false to stop Claude Code from compacting a long conversation while the session is idle. Setting it to true does not turn idle compaction on.
9626
+ * Set to false to stop Claude Code from compacting a long conversation while the session is idle. Defaults to true.
9607
9627
  */
9608
9628
  idleCompaction?: boolean;
9609
9629
  /**
@@ -9675,6 +9695,39 @@ export declare interface Settings {
9675
9695
  * Allow Claude to push proactive mobile notifications
9676
9696
  */
9677
9697
  agentPushNotifEnabled?: boolean;
9698
+ /**
9699
+ * Whether the user has accepted the auto mode opt-in dialog
9700
+ */
9701
+ skipAutoPermissionPrompt?: boolean;
9702
+ /**
9703
+ * Whether plan mode uses auto mode semantics when auto mode is available (default: true)
9704
+ */
9705
+ useAutoModeDuringPlan?: boolean;
9706
+ /**
9707
+ * Auto mode classifier prompt customization
9708
+ */
9709
+ autoMode?: {
9710
+ /**
9711
+ * Rules for the auto mode classifier allow section. Include the literal string "$defaults" to inherit the built-in rules at that position.
9712
+ */
9713
+ allow?: string[];
9714
+ /**
9715
+ * Rules for the auto mode classifier SOFT BLOCK section — destructive/irreversible actions that user intent can clear. Include the literal string "$defaults" to inherit the built-in rules at that position.
9716
+ */
9717
+ soft_deny?: string[];
9718
+ /**
9719
+ * Rules for the auto mode classifier HARD BLOCK section — security boundaries that user intent does NOT clear. Include the literal string "$defaults" to inherit the built-in rules at that position.
9720
+ */
9721
+ hard_deny?: string[];
9722
+ /**
9723
+ * Entries for the auto mode classifier environment section. Include the literal string "$defaults" to inherit the built-in entries at that position.
9724
+ */
9725
+ environment?: string[];
9726
+ /**
9727
+ * When true, every Bash/PowerShell allow rule is suspended while auto mode is active so all shell commands are routed through the classifier (higher safety, more classifier calls). Default: false.
9728
+ */
9729
+ classifyAllShell?: boolean;
9730
+ };
9678
9731
  /**
9679
9732
  * Prevent claude-cli:// protocol handler registration with the OS
9680
9733
  */
@@ -9764,12 +9817,12 @@ export declare interface SpareProcess extends AsyncDisposable {
9764
9817
  * agents, commands and output styles, the claimed permission mode — as they
9765
9818
  * would after a cold `query()` in that folder (the folder's `availableModels`
9766
9819
  * narrows the model list as it does there). One limit: that snapshot is
9767
- * taken as part of the claim, before `model` and `settings` are applied, so
9768
- * fields the model or the settings overlay decide (for example
9820
+ * taken as part of the claim, before `model` and the `settings` keys that
9821
+ * follow it are applied, so fields they decide (for example
9769
9822
  * `fast_mode_state`, `output_style`, the remote-control defaults, an
9770
9823
  * `availableModels` in the overlay) may not reflect them yet. After a refused claim the reads
9771
- * keep describing the parked process; after `option_not_applied` or
9772
- * `settings_not_applied` (the claim itself took) they describe the claimed
9824
+ * keep describing the parked process; after `option_not_applied`, or a
9825
+ * `settings_not_applied` that carries `.claim`, they describe the claimed
9773
9826
  * session.
9774
9827
  *
9775
9828
  * @throws when called a second time, when the spare was closed or has
@@ -9793,10 +9846,12 @@ export declare interface SpareProcess extends AsyncDisposable {
9793
9846
  * when the spare exited or was closed before a claim (`spare_exited` /
9794
9847
  * `spare_closed`), or when the `settings` overlay was refused
9795
9848
  * (`settings_not_applied: …`; the prompt was never sent and the process
9796
- * was closed). In all of those your prompt has not run. The one rejection
9849
+ * goes away). In all of those your prompt has not run. The one rejection
9797
9850
  * after which it does run is `option_not_applied: …`: `model` or
9798
9851
  * `maxThinkingTokens` was not accepted and the session runs without it.
9799
- * Both `…_not_applied` errors carry `.claim` with the claim info.
9852
+ * `option_not_applied` carries `.claim` with the claim info, and so does a
9853
+ * `settings_not_applied` for a key sent behind the claim; one that stopped
9854
+ * the claim does not.
9800
9855
  * `permissionMode` is part of the claim itself and fails closed: see
9801
9856
  * {@link ClaimOptions}.
9802
9857
  */
@@ -10210,12 +10265,12 @@ export declare const USAGE_LIMIT_ERROR_PREFIXES: readonly ["You've hit your", "Y
10210
10265
  *
10211
10266
  * @alpha
10212
10267
  */
10213
- export declare const USAGE_TRANSITION_PREFIXES: readonly ["You're now using usage credits", "You're now using your usage allocation", 'Now using your usage allocation', 'Now using usage credits', "You're now using extra usage", 'Now using extra usage'];
10268
+ export declare const USAGE_TRANSITION_PREFIXES: readonly ["You're now using usage credits", "You're now using your usage allocation", 'Now using your usage allocation', 'Now using usage credits', 'Now using credits', "You're now using extra usage", 'Now using extra usage'];
10214
10269
 
10215
10270
  /**
10216
10271
  * Approaching-limit warnings (severity:'warning'). Footer/toast only; these
10217
- * never arrive as API errors. ("Approaching …" early warnings are
10218
- * deliberately unregistered — they render in the footer without
10272
+ * never arrive as API errors. ("Approaching …" and "Over N% of your … used"
10273
+ * warnings are deliberately unregistered — they render in the footer without
10219
10274
  * <RateLimitMessage> styling; see the generator-coverage tests.)
10220
10275
  *
10221
10276
  * @alpha