@anthropic-ai/claude-agent-sdk 0.3.285 → 0.3.286

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,53 @@
1
1
  {
2
- "version": "2.1.285",
2
+ "version": "2.1.286",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "afb212976052ab038df25d5e871f6c049e094d3b",
5
- "modsCommit": "dec92bc87ab6fe9c7be0fcba1f97966f902dd243",
6
- "buildDate": "2026-09-29T01:45:50Z",
4
+ "commit": "f344a08993bbba4fc1ea9b295245324610f02c58",
5
+ "modsCommit": "732e167ee9d71296b4b63d6f529ac1334513826a",
6
+ "buildDate": "2026-09-30T15:55:40Z",
7
7
  "platforms": {
8
8
  "darwin-arm64": {
9
9
  "binary": "claude",
10
- "checksum": "51f09bd1e021d9fa8a1864c179799bd37cb39962a937935c5cf6823398e86db4",
11
- "size": 223821616
10
+ "checksum": "75e3016e9d2570767b08e43a7467d4817a4f149232c169ca295f2c95fef21433",
11
+ "size": 225167728
12
12
  },
13
13
  "darwin-x64": {
14
14
  "binary": "claude",
15
- "checksum": "24835f7ca4b4338c33ad21c98a3402d9c22f89b8055075d18828e97973844ec3",
16
- "size": 232253440
15
+ "checksum": "53e6a936e89519d695230f9cc97943991286b72766674fba11bee845f0a7c047",
16
+ "size": 233607424
17
17
  },
18
18
  "linux-arm64": {
19
19
  "binary": "claude",
20
- "checksum": "24fac77749bed3d91365d6b6915aa4b824e14318ecb6bc17adbc192f01c9173d",
21
- "size": 239722488
20
+ "checksum": "0292fa22ac2fd43e16be9d0e511ddd8347280d6e0ebaca744ef5b27e05d8d0f8",
21
+ "size": 241033208
22
22
  },
23
23
  "linux-x64": {
24
24
  "binary": "claude",
25
- "checksum": "33dad1ec615a2e08cc78b494f05c110e49916de2c79d78ec8799ebf46b233d29",
26
- "size": 240327864
25
+ "checksum": "fe503f65c6289d59c23e5b21ae44f03583f997dd33a2cbfc75ab4f96fb8fc73f",
26
+ "size": 241667256
27
27
  },
28
28
  "linux-arm64-musl": {
29
29
  "binary": "claude",
30
- "checksum": "31efc4136bc678575f4c6730e248d34f89dbfea0468be1c5d012af199cd62ee8",
31
- "size": 232077120
30
+ "checksum": "5b9b9e41b8b347ba573924342b29b1133d88a7bec51362d5a90a9f22cd6f76cf",
31
+ "size": 233387840
32
32
  },
33
33
  "linux-x64-musl": {
34
34
  "binary": "claude",
35
- "checksum": "7b4414af1bc06eb6d91730759bd01c4c02a4976d0b8526237e9a6d8c33eaf102",
36
- "size": 234078296
35
+ "checksum": "410780234cc3e54afe41a958ef26a4b4f1d253849b769c760f6bcf0bb525fb09",
36
+ "size": 235417688
37
37
  },
38
38
  "win32-x64": {
39
39
  "binary": "claude.exe",
40
- "checksum": "121fc8151ed40bd9c144d68aa1cea23427803628ffab65e23da1cceda155697e",
41
- "size": 243751072
40
+ "checksum": "0b6ecec8edef1ce3069682f696c894d1553239faa6b84e56e167a3ced88fa333",
41
+ "size": 245092000
42
42
  },
43
43
  "win32-arm64": {
44
44
  "binary": "claude.exe",
45
- "checksum": "0865d6bdeec16e2d523dce329c3c73f2c3d7675b804e679c0fc3b477651b1059",
46
- "size": 231275168
45
+ "checksum": "9109c7b0a0de5b40fd013b9009411e517199c8275d2363b824e851cc1133d3c3",
46
+ "size": 232616096
47
47
  }
48
48
  },
49
49
  "sdkCompat": {
50
50
  "testedWrapperVersions": [
51
- "0.3.245",
52
51
  "0.3.246",
53
52
  "0.3.247",
54
53
  "0.3.248",
@@ -77,7 +76,8 @@
77
76
  "0.3.278",
78
77
  "0.3.280",
79
78
  "0.3.281",
80
- "0.3.282"
79
+ "0.3.282",
80
+ "0.3.285"
81
81
  ],
82
82
  "harnessSchema": 1
83
83
  }
package/manifest.zst.json CHANGED
@@ -1,62 +1,61 @@
1
1
  {
2
- "version": "2.1.285",
2
+ "version": "2.1.286",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "afb212976052ab038df25d5e871f6c049e094d3b",
5
- "modsCommit": "dec92bc87ab6fe9c7be0fcba1f97966f902dd243",
6
- "buildDate": "2026-09-29T01:46:59Z",
4
+ "commit": "f344a08993bbba4fc1ea9b295245324610f02c58",
5
+ "modsCommit": "732e167ee9d71296b4b63d6f529ac1334513826a",
6
+ "buildDate": "2026-09-30T15:57:03Z",
7
7
  "platforms": {
8
8
  "darwin-arm64": {
9
9
  "binary": "claude.zst",
10
- "checksum": "37ef7ca4ef6486c44b8f88b41af4f269ba8322c7dd8a62261e54e3271f56a6a0",
11
- "size": 74510936,
10
+ "checksum": "b1be27fbd8fe95bef2418c09f60a307f91c8631dc444fe9a828a7ed2520e45b5",
11
+ "size": 75060478,
12
12
  "bundle": {
13
- "checksum": "c793e6a936a0afe77ee4b0b36abb463e7a54c696cf6f27ef3aa10e2ead33f806",
14
- "size": 74521855
13
+ "checksum": "f2326db618029608409be774a5f4d5fde8a032d319d6aa58c3043afda393dd96",
14
+ "size": 75074255
15
15
  }
16
16
  },
17
17
  "darwin-x64": {
18
18
  "binary": "claude.zst",
19
- "checksum": "cd31b4ba8368bac728fdf75de6654df8f47d2023cd3cd16da49b429ae4d24648",
20
- "size": 78669066,
19
+ "checksum": "e2bbc2a329924533319d0eb4f5a33e2488ce921f60329ab333bca10b0e4c02f2",
20
+ "size": 79220957,
21
21
  "bundle": {
22
- "checksum": "59130413242ea7f3290ac59919cf9586473d8bc9837fc4928c204ae30b83cc12",
23
- "size": 78670967
22
+ "checksum": "fda00b160da41c43716c36fbd4f21729108f898911eea5ede701b10305bca5eb",
23
+ "size": 79224277
24
24
  }
25
25
  },
26
26
  "linux-arm64": {
27
27
  "binary": "claude.zst",
28
- "checksum": "df8bb286ad870d8db316fc6c8b34932598c1127d14f739d1fc995610204eb4d2",
29
- "size": 83619189
28
+ "checksum": "fb24324439bcca9575083f06af6a351a7f9f25066fcf370372b5e829287ef1ee",
29
+ "size": 84176167
30
30
  },
31
31
  "linux-x64": {
32
32
  "binary": "claude.zst",
33
- "checksum": "e88a8b40ed5a7e9213bf5047f5b12c360c33387b1bc36cf79ddbff0a3a40121c",
34
- "size": 84348572
33
+ "checksum": "a14d80443473126e40cbc50eb78899f43e8f4d4336095863f8089a6b9ca02a97",
34
+ "size": 84909116
35
35
  },
36
36
  "linux-arm64-musl": {
37
37
  "binary": "claude.zst",
38
- "checksum": "1e86f455cbd30439ec4a4a38768e2d84e5be327827e2ec7f5c9c87b04b8f53ab",
39
- "size": 82026156
38
+ "checksum": "e86dc4ad41e7e0af1b2cdadcd9b850acb4aed8f141bddce754f29091e59cf250",
39
+ "size": 82570865
40
40
  },
41
41
  "linux-x64-musl": {
42
42
  "binary": "claude.zst",
43
- "checksum": "c436b04d973f0db928dd2321f34206de90a48e6a23aa486a6b69e5cac574d5b1",
44
- "size": 82790392
43
+ "checksum": "b79ed7738c8eb72812d89d2d4032fe4196cf19dac067ee8e724d4f892350c710",
44
+ "size": 83360753
45
45
  },
46
46
  "win32-x64": {
47
47
  "binary": "claude.exe.zst",
48
- "checksum": "5004d3bee5263ee011dcffcc28c837e40989808301f0b8bf64c3aa3d9b0ab8f1",
49
- "size": 86659568
48
+ "checksum": "635c1867224abd72c010948307b6dd871c64837dada77e67d98ed850408198bf",
49
+ "size": 87205724
50
50
  },
51
51
  "win32-arm64": {
52
52
  "binary": "claude.exe.zst",
53
- "checksum": "7067da6d07b9d78d2a75ae40f53c5764066953a853b83b8c1053dc35a9a6b323",
54
- "size": 82994951
53
+ "checksum": "f485b6b45317d01eb9c6cb3f62c66520aaa87f3e0f7c729ece129b832c211cbc",
54
+ "size": 83529567
55
55
  }
56
56
  },
57
57
  "sdkCompat": {
58
58
  "testedWrapperVersions": [
59
- "0.3.245",
60
59
  "0.3.246",
61
60
  "0.3.247",
62
61
  "0.3.248",
@@ -85,7 +84,8 @@
85
84
  "0.3.278",
86
85
  "0.3.280",
87
86
  "0.3.281",
88
- "0.3.282"
87
+ "0.3.282",
88
+ "0.3.285"
89
89
  ],
90
90
  "harnessSchema": 1
91
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.285",
3
+ "version": "0.3.286",
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.285",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.285",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.285",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.285",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.285",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.285",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.285",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.285"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.286",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.286",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.286",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.286",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.286",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.286",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.286",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.286"
72
72
  },
73
73
  "files": [
74
74
  "sdk.mjs",
@@ -85,8 +85,8 @@
85
85
  "extractFromBunfs.d.ts",
86
86
  "manifest.json",
87
87
  "manifest.zst.json",
88
- "core-rf2bg9hj.mjs",
89
- "core-w2yya30y.mjs"
88
+ "core-5c9xf7pv.mjs",
89
+ "core-y9rc2t7d.mjs"
90
90
  ],
91
- "claudeCodeVersion": "2.1.285"
91
+ "claudeCodeVersion": "2.1.286"
92
92
  }
package/sdk.d.ts CHANGED
@@ -604,6 +604,11 @@ declare namespace coreTypes {
604
604
  * Tool calls are bounded by the MCP tool-call timeout — `options.timeout`
605
605
  * (ms) for this server, else the MCP_TOOL_TIMEOUT env var, effectively
606
606
  * unbounded by default.
607
+ *
608
+ * A tool in `options.tools` whose input schema cannot be converted to JSON
609
+ * Schema is left out of the server's tool list, with one warning naming it (a
610
+ * process warning with code CLAUDE_SDK_MCP_TOOL_SCHEMA_UNCONVERTIBLE, or
611
+ * console.warn where there is no process.emitWarning); its other tools load.
607
612
  */
608
613
  export declare function createSdkMcpServer(_options: CreateSdkMcpServerOptions): McpSdkServerConfigWithInstance;
609
614
 
@@ -1971,12 +1976,18 @@ export declare type Options = {
1971
1976
  */
1972
1977
  pathToClaudeCodeExecutable?: string;
1973
1978
  /**
1974
- * Permission mode for the session.
1979
+ * Permission mode for the session. When omitted, Claude Code picks the
1980
+ * starting mode as it does for `claude -p`: a `permissions.defaultMode`
1981
+ * from the settings the session loads, else `'auto'` where that is the
1982
+ * default (and `'default'` where auto mode is unavailable). Pass
1983
+ * `'default'` to keep manual approvals through `canUseTool` (on a cloud
1984
+ * create or attach, `'default'` leaves the session's own mode).
1975
1985
  * - `'default'` - Standard permission behavior, prompts for dangerous operations
1976
1986
  * - `'acceptEdits'` - Auto-accept file edit operations
1977
1987
  * - `'bypassPermissions'` - Bypass all permission checks (requires `allowDangerouslySkipPermissions`)
1978
1988
  * - `'plan'` - Planning mode, no execution of tools
1979
1989
  * - `'dontAsk'` - Don't prompt for permissions, deny if not pre-approved
1990
+ * - `'auto'` - A model classifier approves or denies each call, prompting through `canUseTool` when it cannot decide
1980
1991
  */
1981
1992
  permissionMode?: PermissionMode;
1982
1993
  /**
@@ -4432,7 +4443,7 @@ declare type SDKControlInitializeRequest = {
4432
4443
  timeout?: number;
4433
4444
  }>;
4434
4445
  /**
4435
- * Optional, keyed by sdk server name (each key should also appear in sdkMcpServers; other keys are ignored). Unlike sdkMcpServerConfigs — host-declared settings the CLI keeps for the server's lifetime, same shape inline on mcp_set_servers — this is a one-shot cache of the servers' own handshake output: sent on initialize only, consumed by the connect that follows it, never retained. MCP handshake results the host already obtained from its in-process servers by delivering initialize + notifications/initialized (+ tools/list) to them itself before writing this request. For each such server the CLI answers its own MCP client's initialize and first tools/list from these results and skips the notifications/initialized round trip, so registering N in-process servers costs no mcp_message control round trips before the first turn; tools/call and everything after the handshake still flow as mcp_message exactly as before. The host MUST keep answering mcp_message for every server as if this field were absent: a CLI that predates the field ignores it and performs the full per-server handshake over the control channel, and a newer CLI does the same for any server whose entry is missing or malformed, whose initializeResult.protocolVersion differs from the MCP protocol version the CLI's client requests, or that the CLI had already connected. Entries apply only to the connect that follows this initialize; they are never retained for later reconnects. Absent (older hosts, the Python SDK, browser clients): unchanged behaviour.
4446
+ * Optional, keyed by sdk server name (each key should also appear in sdkMcpServers; other keys are ignored). Unlike sdkMcpServerConfigs — host-declared settings the CLI keeps for the server's lifetime, same shape inline on mcp_set_servers — this is a one-shot cache of the servers' own handshake output: sent on initialize only, consumed by the connect that follows it, never retained. MCP handshake results the host already obtained from its in-process servers by delivering initialize + notifications/initialized (+ tools/list) to them itself before writing this request. For each such server the CLI answers its own MCP client's initialize and first tools/list from these results and skips the notifications/initialized round trip, so registering N in-process servers costs no mcp_message control round trips before the first turn; tools/call and everything after the handshake still flow as mcp_message exactly as before. The host MUST keep answering mcp_message for every server as if this field were absent: a CLI that predates the field ignores it and performs the full per-server handshake over the control channel, and a newer CLI does the same for any server whose entry is missing or malformed, whose initializeResult.protocolVersion differs from the MCP protocol version the CLI's client requests, or that the CLI had already connected. Entries apply only to the connect that follows this initialize; they are never retained for later reconnects. Over a remote session transport the CLI uses the field only when sdkMcpServerManifestsOrigin is set (see that field); a host on the CLI's own stream-json stdio transport needs no marker. sdk_mcp_manifests_parked in the response reports what became of each entry. Absent (older hosts, the Python SDK, browser clients): unchanged behaviour.
4436
4447
  */
4437
4448
  sdkMcpServerManifests?: Record<string, {
4438
4449
  /**
@@ -4444,6 +4455,10 @@ declare type SDKControlInitializeRequest = {
4444
4455
  */
4445
4456
  toolsListResult?: Record<string, unknown>;
4446
4457
  }>;
4458
+ /**
4459
+ * The host's statement that it composed this request's sdkMcpServerManifests for this very send, from its servers' current state. Needed only by a host that reaches the CLI over a remote session transport, where an unmarked sdkMcpServerManifests is not used (a recorded registration could be handed to a later worker). The CLI also refuses a marked manifest whose session-stream frame is more than five minutes old, so capture the manifests when writing the request, not earlier; and it may still decline them when remote manifests are switched off in that CLI, or on any session where the session service has not told the CLI in the last five minutes that only the account owning the session can send events to it. sdk_mcp_manifests_parked in the response says what became of each entry. A value this CLI does not know counts as no marker. A host on the CLI's own stream-json stdio transport may omit this field; a host writing to the stdin of a remote-session worker cannot use manifests at all.
4460
+ */
4461
+ sdkMcpServerManifestsOrigin?: 'host_per_send';
4447
4462
  jsonSchema?: Record<string, unknown>;
4448
4463
  systemPrompt?: string[];
4449
4464
  appendSystemPrompt?: string;
@@ -4523,6 +4538,10 @@ export declare type SDKControlInitializeResponse = {
4523
4538
  */
4524
4539
  plugins_applied?: boolean;
4525
4540
 
4541
+ /**
4542
+ * What became of each entry of this initialize's sdkMcpServerManifests, keyed by sdk server name, for the entries whose name is in sdkMcpServers. 'parked': kept for the connect that follows this reply, which answers the server's MCP initialize and first tools/list from it (a later failure to replay shows up as live mcp_message frames, as when no entry was sent). 'already_connected': this CLI already had a live client for the server. 'protocol_version_mismatch': initializeResult.protocolVersion is not the version this CLI's client requests. 'malformed': the entry is not of the documented shape, reported whether or not manifests were honoured (every name in sdkMcpServers gets this when the field itself is not an object). 'not_honoured': the CLI did not use the entry: manifests or remote manifests are switched off in this CLI, the session service has not told this remote-session worker in the last five minutes that only the account owning the session can send events to it, or the request reached such a worker other than over its session stream (nothing for the host to change in any of these cases); or it came over the session stream without sdkMcpServerManifestsOrigin or on a frame too old to trust (the host's to fix). Absent when the request carried no sdkMcpServerManifests or named no sdkMcpServers, and on CLIs that predate the field.
4543
+ */
4544
+ sdk_mcp_manifests_parked?: Record<string, 'parked' | 'already_connected' | 'protocol_version_mismatch' | 'malformed' | 'not_honoured'>;
4526
4545
 
4527
4546
 
4528
4547
 
@@ -5007,7 +5026,7 @@ declare type SDKControlSetColorRequest = {
5007
5026
  };
5008
5027
 
5009
5028
  /**
5010
- * 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, on Amazon Bedrock, Google Vertex AI or another provider without Anthropic's first-party beta features, when experimental betas are off (CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS or organization policy), or on a Claude 3 model (except on Microsoft Foundry). 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.
5029
+ * 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, on Amazon Bedrock, Google Vertex AI or another provider to which Claude Code sends no first-party-only beta features, when experimental betas are off (CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS or organization policy), or on a Claude 3 model (except on Microsoft Foundry). 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.
5011
5030
  */
5012
5031
  declare type SDKControlSetMaxThinkingTokensRequest = {
5013
5032
  subtype: 'set_max_thinking_tokens';
@@ -5687,6 +5706,8 @@ export declare type SDKResultSuccess = {
5687
5706
  resume_reason?: string;
5688
5707
  local_command?: string;
5689
5708
  request_sent_wall_ms?: number;
5709
+
5710
+
5690
5711
  first_content_frame_ms?: number;
5691
5712
  first_stream_post_ms?: number;
5692
5713
  first_stream_post_ack_ms?: number;
@@ -6193,6 +6214,7 @@ export declare type SDKUserMessage = {
6193
6214
 
6194
6215
 
6195
6216
 
6217
+
6196
6218
 
6197
6219
 
6198
6220
  /**
@@ -6281,6 +6303,7 @@ export declare type SDKUserMessageReplay = {
6281
6303
 
6282
6304
 
6283
6305
 
6306
+
6284
6307
 
6285
6308
 
6286
6309
  /**