@anthropic-ai/claude-agent-sdk 0.3.294 → 0.3.296

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,58 +1,52 @@
1
1
  {
2
- "version": "2.1.294",
2
+ "version": "2.1.296",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "8f033c6ebe3d82a87f502e199307f38f5d55ccca",
5
- "modsCommit": "765f236fe1bfcc678e0ec59af9170fb7d6771a3a",
6
- "buildDate": "2026-10-08T03:11:23Z",
4
+ "commit": "fdb6c17a97b6e0e3cf15e3566663fca58e7c43a9",
5
+ "buildDate": "2026-10-09T14:46:35Z",
7
6
  "platforms": {
8
7
  "darwin-arm64": {
9
8
  "binary": "claude",
10
- "checksum": "def0d15e64dd7d89621f88d28214f885b1c38b0ddd69762fb8593e34915d6d53",
11
- "size": 236330608
9
+ "checksum": "c9b5341637becbd423ddffc5b254afb645682a3868cb708bbc6cc0e7bb419937",
10
+ "size": 240664432
12
11
  },
13
12
  "darwin-x64": {
14
13
  "binary": "claude",
15
- "checksum": "b4f8a4a7a43b53ff1cd639d83bd070e8af8725d9cb51abd257a9c611ce6c7274",
16
- "size": 244819072
14
+ "checksum": "a6bf4f30be241053a923f3820ad23c5991d2f5ac2935b3a8dd64da218d9cc603",
15
+ "size": 249194752
17
16
  },
18
17
  "linux-arm64": {
19
18
  "binary": "claude",
20
- "checksum": "e5d2df19f30a6d63bf11188121f7edb2775249b57352a69269509a4b1496e763",
21
- "size": 252108792
19
+ "checksum": "f1f6e96e0d8342b9dbf41d7e88255397a6a52ce3d8736ad6a4c6b59c9b62fefa",
20
+ "size": 256434168
22
21
  },
23
22
  "linux-x64": {
24
23
  "binary": "claude",
25
- "checksum": "27122ca7b624f537546fbef35b80c66370d974ff258f3d9b10ac50bb8771f262",
26
- "size": 252755128
24
+ "checksum": "24972e3bc859fab2b46ed4c1e51f7d6130f06d3bd550811a114640de3370d0de",
25
+ "size": 257068216
27
26
  },
28
27
  "linux-arm64-musl": {
29
28
  "binary": "claude",
30
- "checksum": "19556aa91fcd650f9a9a920b1198521777732f25f6ef548d35756ce59f833a10",
31
- "size": 244463424
29
+ "checksum": "b0bbc936a82930933d7d5645081050d5f827a946cf6abc6575383b777a0feec0",
30
+ "size": 248788800
32
31
  },
33
32
  "linux-x64-musl": {
34
33
  "binary": "claude",
35
- "checksum": "f6151c93e06f742e09cfc381d9064cc2ceca6c977528000537a9eed53909a485",
36
- "size": 246501464
34
+ "checksum": "94a1ccc6ffc9b0889c6b2b80e202885c8a575766775377398daa4db5fd89417f",
35
+ "size": 250818648
37
36
  },
38
37
  "win32-x64": {
39
38
  "binary": "claude.exe",
40
- "checksum": "1f6471eb5a1c21a1f8b54a7827329d64433424dcce51717a54e837adb542163a",
41
- "size": 256155808
39
+ "checksum": "76de74f7694a5bdc03378a5f837c9e132827bf004c98c276bc4e9094ff06769a",
40
+ "size": 260489376
42
41
  },
43
42
  "win32-arm64": {
44
43
  "binary": "claude.exe",
45
- "checksum": "8e756fbf211f081f4593f06cff92ae313a5bb782e9e83ee718abb7147addb1fe",
46
- "size": 243680928
44
+ "checksum": "a652a17f5a324d2d9ad9995cc047145f8176b9a4b4f28bbd3aa0708a22679e3b",
45
+ "size": 248013984
47
46
  }
48
47
  },
49
48
  "sdkCompat": {
50
49
  "testedWrapperVersions": [
51
- "0.3.252",
52
- "0.3.257",
53
- "0.3.258",
54
- "0.3.259",
55
- "0.3.260",
56
50
  "0.3.261",
57
51
  "0.3.263",
58
52
  "0.3.265",
package/manifest.zst.json CHANGED
@@ -1,66 +1,60 @@
1
1
  {
2
- "version": "2.1.294",
2
+ "version": "2.1.296",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "8f033c6ebe3d82a87f502e199307f38f5d55ccca",
5
- "modsCommit": "765f236fe1bfcc678e0ec59af9170fb7d6771a3a",
6
- "buildDate": "2026-10-08T03:12:37Z",
4
+ "commit": "fdb6c17a97b6e0e3cf15e3566663fca58e7c43a9",
5
+ "buildDate": "2026-10-09T14:48:00Z",
7
6
  "platforms": {
8
7
  "darwin-arm64": {
9
8
  "binary": "claude.zst",
10
- "checksum": "c6265c91743c97af8ad419de8500d5bade86c55691f20aa1c1f243a94381a95c",
11
- "size": 78775624,
9
+ "checksum": "26426aa3dcf41b0f554951766c3c583cf243345ca3d32fa590caf84685be5f97",
10
+ "size": 80134216,
12
11
  "bundle": {
13
- "checksum": "b5df7f07341efbf7ef85536697eb46835ef4b03da085a75914151c2a4a9c18dc",
14
- "size": 78791815
12
+ "checksum": "0e4b5ce62190b45b9aa2ff5311404b227c47232f5ff09c6e1ec285d17e644402",
13
+ "size": 80149558
15
14
  }
16
15
  },
17
16
  "darwin-x64": {
18
17
  "binary": "claude.zst",
19
- "checksum": "9e1c21a62e8399297f5543403267b36eec6b56ee77ddd38c928efc27343498cf",
20
- "size": 83008146,
18
+ "checksum": "6f1d6f926a303c423eb4815a01764165ed4375054bfa8ef6203e55fc806f50ac",
19
+ "size": 84394829,
21
20
  "bundle": {
22
- "checksum": "edaa5d01caec3003c403d90de37f7367577b86a03fac0c1672c78cb10bb53916",
23
- "size": 83006981
21
+ "checksum": "31a721b22f5e6039baf241a151d2f778c4b8d864539335385f35ec241cc3df50",
22
+ "size": 84390337
24
23
  }
25
24
  },
26
25
  "linux-arm64": {
27
26
  "binary": "claude.zst",
28
- "checksum": "66c3ea3078271f9c9300f4f2dae3852d1df57aeb0be6cc15183b3eac6cc6a2d3",
29
- "size": 87846884
27
+ "checksum": "23aa91437a06eff80a65bfc32b0e4b5a6dda3e821019c543696c154274e56913",
28
+ "size": 89208531
30
29
  },
31
30
  "linux-x64": {
32
31
  "binary": "claude.zst",
33
- "checksum": "f65567ed6fbf9d4cb670819a9ed00cec415022f93043350b95513a39dbbb0b5f",
34
- "size": 88583351
32
+ "checksum": "fac1d78be9446052ac084878c04c2648abb6b22d53279a685fa19ee517d74410",
33
+ "size": 89939877
35
34
  },
36
35
  "linux-arm64-musl": {
37
36
  "binary": "claude.zst",
38
- "checksum": "7adc141d44e6cf9c1dd8a187a257fb5bd265437bc0385d75384948a72ccf5a02",
39
- "size": 86257202
37
+ "checksum": "a6f1ae5219e4ad60ebec2136c2ec27bb12cc674c2db66768ea46566ae28e52c8",
38
+ "size": 87620237
40
39
  },
41
40
  "linux-x64-musl": {
42
41
  "binary": "claude.zst",
43
- "checksum": "407c7075a7367d995f275677d40edea6580034179177ef0033dfac7621ae7f5b",
44
- "size": 87011688
42
+ "checksum": "ca4feec52ea8d8c1aae0959bbb25d656aa2c9f9781d9225fd19e824a15479a46",
43
+ "size": 88372013
45
44
  },
46
45
  "win32-x64": {
47
46
  "binary": "claude.exe.zst",
48
- "checksum": "9d25b0be223ace8ead78c292684e9c81b40c5c95751aa9a3ff501f71b2080ec8",
49
- "size": 90878325
47
+ "checksum": "3c03de917c2ac45f9e4bf8d6670f843d2eaa9bbd57170c0ede5b2a3585ec4297",
48
+ "size": 92248996
50
49
  },
51
50
  "win32-arm64": {
52
51
  "binary": "claude.exe.zst",
53
- "checksum": "31de433dd0da9b088f960b339370adff1e5c2636c84a77c2c3785bd60327583b",
54
- "size": 87213872
52
+ "checksum": "e638b6c6f831f5d51839caef7a7e8ccb68fc4b0c0ee51339a7fe2aadf5ca7528",
53
+ "size": 88583594
55
54
  }
56
55
  },
57
56
  "sdkCompat": {
58
57
  "testedWrapperVersions": [
59
- "0.3.252",
60
- "0.3.257",
61
- "0.3.258",
62
- "0.3.259",
63
- "0.3.260",
64
58
  "0.3.261",
65
59
  "0.3.263",
66
60
  "0.3.265",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.294",
3
+ "version": "0.3.296",
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.294",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.294",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.294",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.294",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.294",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.294",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.294",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.294"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.296",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.296",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.296",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.296",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.296",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.296",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.296",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.296"
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-9fynjcde.mjs",
89
- "core-z7m2ffy5.mjs"
88
+ "core-2haqfy07.mjs",
89
+ "core-a92dt75k.mjs"
90
90
  ],
91
- "claudeCodeVersion": "2.1.294"
91
+ "claudeCodeVersion": "2.1.296"
92
92
  }
package/sdk-tools.d.ts CHANGED
@@ -891,6 +891,10 @@ export interface FileReadInput {
891
891
  * Page range for PDF files (e.g., "1-5", "3", "10-20"). Only applicable to PDF files. Maximum 20 pages per request.
892
892
  */
893
893
  pages?: string;
894
+ /**
895
+ * Set to true to read a text file, or a line range of one, that is over the usual size limits, up to what still fits in your context. Only use this when you genuinely need all of it or the user asked for the whole file; otherwise read it in parts with offset and limit, or search it.
896
+ */
897
+ allow_large?: boolean;
894
898
  }
895
899
  export interface FileWriteInput {
896
900
  /**
@@ -3770,6 +3774,10 @@ export interface WebSearchOutput {
3770
3774
  * The URL of the search result
3771
3775
  */
3772
3776
  url: string;
3777
+ /**
3778
+ * Page text. PostToolUse hooks get it; tool_use_result does not.
3779
+ */
3780
+ snippet?: string;
3773
3781
  }[];
3774
3782
  }
3775
3783
  | string
package/sdk.d.ts CHANGED
@@ -73,6 +73,10 @@ export declare type AgentDefinition = {
73
73
  * Maximum number of agentic turns (API round-trips) before stopping
74
74
  */
75
75
  maxTurns?: number;
76
+ /**
77
+ * Token count at which this agent compacts its own conversation when it runs as a subagent. It only lowers the window the subagent would otherwise inherit. No effect on the main session agent.
78
+ */
79
+ autoCompactWindow?: number;
76
80
  /**
77
81
  * Run this agent as a background task (non-blocking, fire-and-forget) when invoked
78
82
  */
@@ -2157,19 +2161,33 @@ export declare type Options = {
2157
2161
  * When enabled, commands are executed in a sandboxed environment that restricts
2158
2162
  * filesystem and network access. This provides an additional security layer.
2159
2163
  *
2160
- * **Important:** Filesystem and network restrictions are configured via permission
2161
- * rules, not via these sandbox settings:
2162
- * - Filesystem access: Use `Read` and `Edit` permission rules
2163
- * - Network access: Use `WebFetch` permission rules
2164
- *
2165
- * These sandbox settings control sandbox behavior (enabled, auto-allow, etc.),
2166
- * while the actual access restrictions come from your permission configuration.
2167
- *
2168
- * **Dependency check:** When `enabled: true` is passed via this option,
2169
- * `failIfUnavailable` defaults to `true` — if sandbox dependencies are missing
2170
- * (e.g. `bubblewrap` on Linux) or the platform is unsupported, `query()` will
2171
- * emit an error result and exit rather than silently running commands
2172
- * unsandboxed. Set `failIfUnavailable: false` to allow graceful degradation.
2164
+ * Access restrictions can be set here (`filesystem`, `network`, `credentials`);
2165
+ * filesystem and network restrictions also come from `Read`, `Edit` and
2166
+ * `WebFetch` permission rules, and Claude Code applies both.
2167
+ *
2168
+ * **Dependency check:** When this option sets `enabled: true`,
2169
+ * `failIfUnavailable` defaults to `true` unless this option or an inline
2170
+ * `settings` sandbox block sets it: if sandbox dependencies are missing (e.g.
2171
+ * `bubblewrap` on Linux) or the platform is unsupported, `query()` emits an
2172
+ * error result and exits rather than silently running commands unsandboxed.
2173
+ * Set `failIfUnavailable: false` to allow graceful degradation.
2174
+ *
2175
+ * **With `settings`:** when `settings` is given inline (an object or JSON string,
2176
+ * not a file path) and has its own `sandbox` block, this option is merged into
2177
+ * it. A value this option sets replaces the value at the same path, and a
2178
+ * value it does not set is kept, with two exceptions: a
2179
+ * `filesystem.disabled: true` is dropped when this option sets `filesystem` or
2180
+ * a `credentials.files` deny entry, since it would switch those off; and a
2181
+ * `network.httpProxyPort` or `network.socksProxyPort` is dropped when this
2182
+ * option sets `network.allowedDomains`, a `network.deniedDomains` entry or
2183
+ * `network.strictAllowlist: true` and does not set that port itself, since
2184
+ * traffic through your own proxy is not checked against those lists. Nested
2185
+ * objects merge key by key, except `ripgrep` and
2186
+ * `network.tlsTerminate`, which this option replaces whole; and the restriction
2187
+ * lists (`filesystem.denyRead`, `filesystem.denyWrite`, `network.deniedDomains`,
2188
+ * `credentials.files`, `credentials.envVars`) from both are combined instead, a
2189
+ * `deny` from either side winning over a `mask` for the same credential path or
2190
+ * variable. A `settings` file path cannot be combined with this option.
2173
2191
  *
2174
2192
  * @example Enable sandboxing with auto-allow
2175
2193
  * ```typescript
@@ -2179,7 +2197,7 @@ export declare type Options = {
2179
2197
  * }
2180
2198
  * ```
2181
2199
  *
2182
- * @example Configure network options (not restrictions)
2200
+ * @example Configure network options
2183
2201
  * ```typescript
2184
2202
  * sandbox: {
2185
2203
  * enabled: true,
@@ -3661,6 +3679,7 @@ export declare type SDKAssistantMessage = {
3661
3679
 
3662
3680
 
3663
3681
 
3682
+
3664
3683
  /**
3665
3684
  * ISO timestamp of when this content block finished on the originating process. One API assistant turn may produce several assistant messages sharing a message.id, each with its own timestamp. Uses the originating host's clock, so it's for display only; do not order messages by this field. Older emitters omit it; consumers should fall back to receive time.
3666
3685
  */
@@ -4598,6 +4617,10 @@ export declare type SDKControlInitializeResponse = {
4598
4617
 
4599
4618
 
4600
4619
 
4620
+ /**
4621
+ * Claude Code version of the process that runs this session's turns (the same value its system/init carries). Absent on CLIs that predate the field, and when the responder is not that process and does not know its version.
4622
+ */
4623
+ claude_code_version?: string;
4601
4624
  fast_mode_state?: coreTypes.FastModeState;
4602
4625
  fast_mode_disabled_reason?: coreTypes.FastModeDisabledReason;
4603
4626
 
@@ -4852,6 +4875,7 @@ declare type SDKControlPermissionRequest = {
4852
4875
 
4853
4876
 
4854
4877
 
4878
+
4855
4879
  };
4856
4880
 
4857
4881
  /**
@@ -5106,6 +5130,7 @@ declare type SDKControlSetModelRequest = {
5106
5130
  */
5107
5131
  model?: string | null;
5108
5132
 
5133
+
5109
5134
  };
5110
5135
 
5111
5136
  /**
@@ -5521,6 +5546,8 @@ export declare type SDKPartialAssistantMessage = {
5521
5546
  ttft_ms?: number;
5522
5547
 
5523
5548
 
5549
+
5550
+
5524
5551
  /**
5525
5552
  * Client uuid of the user message this turn is answering (submitMessage options.uuid), stamped on a non-ping stream event each time that send changes: the turn's FIRST non-ping stream event (normally the frame that triggers the turn's initial ack), and, for a turn started by a synthetic (meta) prompt, the first non-ping stream event after each queued user message folded in mid-turn takes the echo over (see SDKAssistantMessage.user_message_uuid for the rule) — so a consumer can bind the reply stream to the send it answers without waiting for the result. A turn started by a typed prompt stamps only its first non-ping stream event; independently, its first complete assistant message is stamped as well (see SDKAssistantMessage.user_message_uuid), so the same uuid may appear on both. Absent on every other stream event of the turn, on turns that neither had a client uuid nor folded a user message in, and from older producers.
5526
5553
  */
@@ -5685,6 +5712,7 @@ export declare type SDKRateLimitInfo = {
5685
5712
  overageDisabledReason?: 'overage_not_provisioned' | 'org_level_disabled' | 'org_level_disabled_until' | 'out_of_credits' | 'seat_tier_level_disabled' | 'member_level_disabled' | 'seat_tier_zero_credit_limit' | 'group_zero_credit_limit' | 'member_zero_credit_limit' | 'org_service_level_disabled' | 'no_limits_configured' | 'fetch_error' | 'unknown';
5686
5713
  isUsingOverage?: boolean;
5687
5714
  overageInUse?: boolean;
5715
+ overageEnabled?: boolean;
5688
5716
  surpassedThreshold?: number;
5689
5717
 
5690
5718
 
@@ -5934,6 +5962,7 @@ export declare type SDKStatusMessage = {
5934
5962
  compact_error?: string;
5935
5963
 
5936
5964
 
5965
+
5937
5966
  uuid: UUID;
5938
5967
  session_id: string;
5939
5968
  };
@@ -6350,11 +6379,11 @@ export declare type SDKUserMessage = {
6350
6379
 
6351
6380
  uuid?: UUID;
6352
6381
  /**
6353
- * Content the user pasted into the prompt rather than typed: each entry a string or an array of content blocks. The CLI appends the text of each entry after the typed text, in order, and may wrap it in `<pasted_content>` tags. Blocks other than text are ignored; send images and documents in `message.content`.
6382
+ * Content the user pasted into the prompt rather than typed: each entry a string or an array of content blocks. The CLI appends the text of each entry after the typed text, in order, and may wrap it in `<pasted_content>` tags. Blocks other than text are ignored; send images and documents in `message.content`. A list of over 1,000 entries and blocks in all is ignored.
6354
6383
  */
6355
6384
  pasted_content?: MessageParam['content'][];
6356
6385
  /**
6357
- * Text the user pasted that is still in `message.content` where they put it: each entry one paste. The prompt is not changed by the host; the CLI may wrap each entry in `<pasted_content>` tags where it still stands in the last text block. For a paste the host took out of `message`, use `pasted_content` instead.
6386
+ * Text the user pasted that is still in `message.content` where they put it: each entry one paste. The prompt is not changed by the host; the CLI may wrap each entry in `<pasted_content>` tags where it still stands in the last text block. It looks for the first 100 entries that are not blank. For a paste the host took out of `message`, use `pasted_content` instead.
6358
6387
  */
6359
6388
  inline_pastes?: string[];
6360
6389
  session_id?: string;
@@ -7066,6 +7095,10 @@ export declare interface Settings {
7066
7095
  * Timeout in seconds for this specific command
7067
7096
  */
7068
7097
  timeout?: number;
7098
+ /**
7099
+ * What a failure of this hook does: it could not start (a missing script or plugin directory), timed out, exited with a code other than 0 or 2, or printed JSON that is invalid or fails validation. 'continue' (default): the failure is reported and the action goes ahead. 'block': the failure counts as exit code 2, so the action the event guards (a tool call, a permission request, a prompt) is blocked. Ignored for async hooks and on Stop, SubagentStop, TaskCompleted and TeammateIdle.
7100
+ */
7101
+ onFailure?: 'continue' | 'block';
7069
7102
  /**
7070
7103
  * Custom status message to display in spinner while hook runs
7071
7104
  */
@@ -7164,6 +7197,10 @@ export declare interface Settings {
7164
7197
  * Timeout in seconds for this specific request
7165
7198
  */
7166
7199
  timeout?: number;
7200
+ /**
7201
+ * What a failure of this hook does: it could not start (a missing script or plugin directory), timed out, exited with a code other than 0 or 2, or printed JSON that is invalid or fails validation. 'continue' (default): the failure is reported and the action goes ahead. 'block': the failure counts as exit code 2, so the action the event guards (a tool call, a permission request, a prompt) is blocked. Ignored for async hooks and on Stop, SubagentStop, TaskCompleted and TeammateIdle.
7202
+ */
7203
+ onFailure?: 'continue' | 'block';
7167
7204
  /**
7168
7205
  * Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., "Authorization": "Bearer $MY_TOKEN"). Only variables listed in allowedEnvVars will be interpolated.
7169
7206
  */
@@ -8641,7 +8678,7 @@ export declare interface Settings {
8641
8678
  */
8642
8679
  forceLoginMethod?: 'claudeai' | 'console' | 'gateway';
8643
8680
  /**
8644
- * Cloud gateway URL to pre-fill and auto-connect to during login, alongside forceLoginMethod: "gateway". Honored only from admin-controlled managed settings (MDM / managed-settings.json / policy helper); ignored in user, project, and remote-delivered settings.
8681
+ * Cloud gateway URL to pre-fill during login, alongside forceLoginMethod: "gateway". Honored from admin-controlled managed settings (MDM / managed-settings.json / policy helper) and, on a machine with none of those, from your own user settings; ignored in project, local, flag, and remote-delivered settings.
8645
8682
  */
8646
8683
  forceLoginGatewayUrl?: string;
8647
8684
  /**