@anthropic-ai/claude-agent-sdk 0.2.120 → 0.2.121

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,47 +1,47 @@
1
1
  {
2
- "version": "2.1.120",
3
- "commit": "080f07fb4224786b965b9ea0a35f0cff594f2eb6",
4
- "buildDate": "2026-04-24T21:51:03Z",
2
+ "version": "2.1.121",
3
+ "commit": "16ffea721a0a39bc787a236dc19fb62307180b75",
4
+ "buildDate": "2026-04-27T01:51:03Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude",
8
- "checksum": "fad8faf49c7b1b454c38d785b75e17edbdadc7ffaf450b31349aafc6560b8ef6",
9
- "size": 213981440
8
+ "checksum": "3810e55d47ed4d413de6dc037e34d58948f779a4c6bdeeacf1748d850c5daad6",
9
+ "size": 215417984
10
10
  },
11
11
  "darwin-x64": {
12
12
  "binary": "claude",
13
- "checksum": "ad68f225e96db8b7d12d0c31f0343bc3227ea2886ecefae2f483cb32310b0004",
14
- "size": 215529168
13
+ "checksum": "59d817dde54eeef0d752e7bd3869586e6eb5fa2b1d785c06fb9cda8804166037",
14
+ "size": 216982224
15
15
  },
16
16
  "linux-arm64": {
17
17
  "binary": "claude",
18
- "checksum": "a6d0d25946c32a24b4e04471af70845a45428ca069fb3b489345f2a683262279",
19
- "size": 246024768
18
+ "checksum": "71b78e6364f97a227b17be40dfcc237461f8d2b1d109444d24b42af0fdefac31",
19
+ "size": 247466560
20
20
  },
21
21
  "linux-x64": {
22
22
  "binary": "claude",
23
- "checksum": "12c0d6eb6d39dc2597fd131d8ea4f12ed8bf25b47dadd9173878e6d025959c9f",
24
- "size": 245832320
23
+ "checksum": "b4b684bbcb3a88029ec419dbc08824b2f3c69656a0aa2374860f9525fc67c98f",
24
+ "size": 247265920
25
25
  },
26
26
  "linux-arm64-musl": {
27
27
  "binary": "claude",
28
- "checksum": "8b8d02e87c842f90d5ad47321ea6f42b581fafe7cd50cd9fba5b27fe89ff51df",
29
- "size": 238750080
28
+ "checksum": "2f8e2a81f7d41a9cf3e9269fb3237df968194cc7bf8ba478392cd5217d55e8d1",
29
+ "size": 240191872
30
30
  },
31
31
  "linux-x64-musl": {
32
32
  "binary": "claude",
33
- "checksum": "5406ef30a37413e9e6fdac1c641742e8c2b88f033256e8ba1ece0b4419d30157",
34
- "size": 240097664
33
+ "checksum": "d5ad436e256291df5e2248d1026a971229dde43544db3267892afd5c89934eb1",
34
+ "size": 241531264
35
35
  },
36
36
  "win32-x64": {
37
37
  "binary": "claude.exe",
38
- "checksum": "987d99dfae28c9a554bbb15a9d432cfa75df7c175db523c232ef68950068df4c",
39
- "size": 251858080
38
+ "checksum": "0a85980a38e9d8fbb2ba51f1d27c3425c7870f75e053ae4be266d23e10edde4a",
39
+ "size": 253241504
40
40
  },
41
41
  "win32-arm64": {
42
42
  "binary": "claude.exe",
43
- "checksum": "2bf424fe9772eadae4dc814126b5a1184d5d1d63be9f342fde251580d678fd04",
44
- "size": 247922336
43
+ "checksum": "9c9e1c68d50bb80f5e8d4a91645f042d4802a4fb0f87c34a504ecbb69a54860a",
44
+ "size": 249304224
45
45
  }
46
46
  }
47
47
  }
package/manifest.zst.json CHANGED
@@ -1,55 +1,55 @@
1
1
  {
2
- "version": "2.1.120",
3
- "commit": "080f07fb4224786b965b9ea0a35f0cff594f2eb6",
4
- "buildDate": "2026-04-24T21:58:09Z",
2
+ "version": "2.1.121",
3
+ "commit": "16ffea721a0a39bc787a236dc19fb62307180b75",
4
+ "buildDate": "2026-04-27T01:58:07Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude.zst",
8
- "checksum": "adcdcaf24ae240fdc59a2c5e790c2d1eb3d93cb729ff9ba9993a3801553c7201",
9
- "size": 44236339,
8
+ "checksum": "794387f97195b7aff15193e88a260ea8718213c7f1a50ce6165bed77af435d3d",
9
+ "size": 44532566,
10
10
  "bundle": {
11
- "checksum": "cf5f610c299ce7eddc8b83a32aff1aba4308b93e9d25539549f3c52c2315b5bb",
12
- "size": 44244892
11
+ "checksum": "54cb26c375f61ff3d4f6ed57e91135d324c2bd13186788fd0ac95b6882c6c103",
12
+ "size": 44529587
13
13
  }
14
14
  },
15
15
  "darwin-x64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "b2cbcbe5e57a7fbd89d73fdc1f6488116034aaa3c85b59530552cae50b478451",
18
- "size": 45941282,
17
+ "checksum": "8c4163a2647a0da489ed7ccb78408f90603913f7b821e098b794c6ad60ba8985",
18
+ "size": 46240905,
19
19
  "bundle": {
20
- "checksum": "ad46d2cb1134bde351eb95406f07f33be2b27410b8e1029fc028b86f95a969fb",
21
- "size": 45945061
20
+ "checksum": "0afd90ee954cde23a1e8d53ffb4479bb327e82dec3605afb0b718f5a8d7e2f02",
21
+ "size": 46246963
22
22
  }
23
23
  },
24
24
  "linux-arm64": {
25
25
  "binary": "claude.zst",
26
- "checksum": "be345830447e7ac70aee331f1faae49c1f0c621aae0dfcec5f4555635a723691",
27
- "size": 53802919
26
+ "checksum": "ebdb26ee2f63a2f0fa3da7b4e5acdb313a91648400f5e7ef89148761f6eb905d",
27
+ "size": 54069121
28
28
  },
29
29
  "linux-x64": {
30
30
  "binary": "claude.zst",
31
- "checksum": "9a00a29b1acc0c18e214e18d435176baaab24ab49f33b67c25d30a8689378325",
32
- "size": 54375672
31
+ "checksum": "49ab2b321de1c278d510129856bfd8c9ab735d5eb27496baf4d6c2159875eaa4",
32
+ "size": 54642591
33
33
  },
34
34
  "linux-arm64-musl": {
35
35
  "binary": "claude.zst",
36
- "checksum": "db04f97ee06c0e6ec43cfeb1b78f76fafc245a9dc2107a821bdca6c451cccc02",
37
- "size": 52412046
36
+ "checksum": "3487670ab9fc8918240e025d177e7cb56559efd1fb1056782c8701736ee07345",
37
+ "size": 52700328
38
38
  },
39
39
  "linux-x64-musl": {
40
40
  "binary": "claude.zst",
41
- "checksum": "ac0c7ebb578d0502cd35e1384eadf3a16307ab8c6a35ca9fb7af35ce0c9dd9ed",
42
- "size": 53073404
41
+ "checksum": "dac2d3b20520dd3a7308074ff779f0981bc7caec07c853725898aae532b22db2",
42
+ "size": 53385809
43
43
  },
44
44
  "win32-x64": {
45
45
  "binary": "claude.exe.zst",
46
- "checksum": "573e670be41609ef16e34ff686a8e4aeb3249fca6166fd0978d2ba49750955d8",
47
- "size": 55443349
46
+ "checksum": "c40e505e1b90c631fb48cf060eee43da12a4be1030735c5cd6e4c0c387b2eafc",
47
+ "size": 55720411
48
48
  },
49
49
  "win32-arm64": {
50
50
  "binary": "claude.exe.zst",
51
- "checksum": "4713446d69307b5a026e6553ae64e6518ef82727ebaa1a8a9b09f80e5637b73b",
52
- "size": 53562966
51
+ "checksum": "00c14cbbf8ab6a7711d8c3ec5e04466d16e841fccead240b75e581e6442ea39d",
52
+ "size": 53850938
53
53
  }
54
54
  }
55
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.2.120",
3
+ "version": "0.2.121",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -55,14 +55,14 @@
55
55
  "zod": "^4.0.0"
56
56
  },
57
57
  "optionalDependencies": {
58
- "@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.120",
59
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.120",
60
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.120",
61
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.120",
62
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.120",
63
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.120",
64
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.120",
65
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.120"
58
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.121",
59
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.121",
60
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.121",
61
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.121",
62
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.121",
63
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.121",
64
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.121",
65
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.121"
66
66
  },
67
67
  "files": [
68
68
  "sdk.mjs",
@@ -78,5 +78,5 @@
78
78
  "manifest.json",
79
79
  "manifest.zst.json"
80
80
  ],
81
- "claudeCodeVersion": "2.1.120"
81
+ "claudeCodeVersion": "2.1.121"
82
82
  }
package/sdk.d.ts CHANGED
@@ -424,6 +424,14 @@ declare type CreateSdkMcpServerOptions = {
424
424
  name: string;
425
425
  version?: string;
426
426
  tools?: Array<SdkMcpToolDefinition<any>>;
427
+ /**
428
+ * When true, all tools from this server are always included in the prompt
429
+ * and never deferred behind tool search. Applied via
430
+ * `_meta['anthropic/alwaysLoad']` on each tool. Equivalent to
431
+ * `defer_loading: false` on the API. Per-tool `tool({ alwaysLoad })` still
432
+ * works and is OR'd with this.
433
+ */
434
+ alwaysLoad?: boolean;
427
435
  };
428
436
 
429
437
  export declare type CwdChangedHookInput = BaseHookInput & {
@@ -928,6 +936,10 @@ export declare type McpHttpServerConfig = {
928
936
  url: string;
929
937
  headers?: Record<string, string>;
930
938
  tools?: McpServerToolPolicy[];
939
+ /**
940
+ * When true, all tools from this server are always included in the prompt and never deferred behind tool search. Equivalent to setting defer_loading: false on the API. Default: tools are deferred when tool search is enabled.
941
+ */
942
+ alwaysLoad?: boolean;
931
943
  };
932
944
 
933
945
  export declare type McpSdkServerConfig = {
@@ -1029,6 +1041,10 @@ export declare type McpSSEServerConfig = {
1029
1041
  url: string;
1030
1042
  headers?: Record<string, string>;
1031
1043
  tools?: McpServerToolPolicy[];
1044
+ /**
1045
+ * When true, all tools from this server are always included in the prompt and never deferred behind tool search. Equivalent to setting defer_loading: false on the API. Default: tools are deferred when tool search is enabled.
1046
+ */
1047
+ alwaysLoad?: boolean;
1032
1048
  };
1033
1049
 
1034
1050
  export declare type McpStdioServerConfig = {
@@ -1036,6 +1052,10 @@ export declare type McpStdioServerConfig = {
1036
1052
  command: string;
1037
1053
  args?: string[];
1038
1054
  env?: Record<string, string>;
1055
+ /**
1056
+ * When true, all tools from this server are always included in the prompt and never deferred behind tool search. Equivalent to setting defer_loading: false on the API. Default: tools are deferred when tool search is enabled.
1057
+ */
1058
+ alwaysLoad?: boolean;
1039
1059
  };
1040
1060
 
1041
1061
  /**
@@ -1917,6 +1937,13 @@ export declare type PostToolUseHookInput = BaseHookInput & {
1917
1937
  export declare type PostToolUseHookSpecificOutput = {
1918
1938
  hookEventName: 'PostToolUse';
1919
1939
  additionalContext?: string;
1940
+ /**
1941
+ * Replaces the tool output before it is sent to the model
1942
+ */
1943
+ updatedToolOutput?: unknown;
1944
+ /**
1945
+ * Replaces the output for MCP tools only. Prefer updatedToolOutput, which works for all tools
1946
+ */
1920
1947
  updatedMCPToolOutput?: unknown;
1921
1948
  };
1922
1949
 
@@ -2086,10 +2113,12 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
2086
2113
  * denial, missing file, or transport error.
2087
2114
  *
2088
2115
  * @param path - File path (relative to cwd or absolute)
2089
- * @param options - Optional maxBytes cap (default 1MB)
2116
+ * @param options - Optional maxBytes cap (default 1MB) and encoding
2117
+ * (default utf-8; pass 'base64' for binary files like images)
2090
2118
  */
2091
2119
  readFile(path: string, options?: {
2092
2120
  maxBytes?: number;
2121
+ encoding?: 'utf-8' | 'base64';
2093
2122
  }): Promise<SDKControlReadFileResponse | null>;
2094
2123
  /**
2095
2124
  * Reload plugins from disk and return the refreshed commands, agents,
@@ -2666,6 +2695,10 @@ declare type SDKControlReadFileRequest = {
2666
2695
  subtype: 'read_file';
2667
2696
  path: string;
2668
2697
  max_bytes?: number;
2698
+ /**
2699
+ * How to encode the bytes in `contents`. Defaults to utf-8 (lossy for binary); pass 'base64' to read images.
2700
+ */
2701
+ encoding?: 'utf-8' | 'base64';
2669
2702
  };
2670
2703
 
2671
2704
  /**
@@ -2675,6 +2708,10 @@ export declare type SDKControlReadFileResponse = {
2675
2708
  contents: string;
2676
2709
  absPath: string;
2677
2710
  truncated?: boolean;
2711
+ /**
2712
+ * Set when the request asked for base64. Absent means utf-8 — including when an older CLI ignored the request's encoding field.
2713
+ */
2714
+ encoding?: 'base64';
2678
2715
  };
2679
2716
 
2680
2717
  /**
@@ -4072,6 +4109,10 @@ export declare interface Settings {
4072
4109
  * Disable all hooks and statusLine execution
4073
4110
  */
4074
4111
  disableAllHooks?: boolean;
4112
+ /**
4113
+ * Disable the background-agents fleet (`claude agents`, `--bg`, /background, the on-demand daemon). Typically set in managed settings. Equivalent to CLAUDE_CODE_DISABLE_AGENTS_FLEET=1.
4114
+ */
4115
+ disableBackgroundAgents?: boolean;
4075
4116
  /**
4076
4117
  * 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.
4077
4118
  */
@@ -5063,7 +5104,7 @@ export declare interface Settings {
5063
5104
  */
5064
5105
  remoteControlAtStartup?: boolean;
5065
5106
  /**
5066
- * When no background daemon is running: 'transient' spawns one for this login session; 'ask' offers to install a persistent service
5107
+ * When no background service is running: 'transient' spawns one for this login session; 'ask' offers to install it persistently
5067
5108
  */
5068
5109
  daemonColdStart?: 'transient' | 'ask';
5069
5110
  /**