@anthropic-ai/claude-agent-sdk 0.3.276 → 0.3.278

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,55 +1,53 @@
1
1
  {
2
- "version": "2.1.276",
2
+ "version": "2.1.278",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "bc0a4292e0472d227ceecb07d892ab1a777a4926",
5
- "modsCommit": "68ac8bbf0245b615b41517bf8f2b2f35af1ae31d",
6
- "buildDate": "2026-09-18T00:49:31Z",
4
+ "commit": "809c980662e3525645594dc8b74f78c38a348db1",
5
+ "modsCommit": "31a3b00bef145a0393d9dbf840a98674fec07712",
6
+ "buildDate": "2026-09-19T01:22:08Z",
7
7
  "platforms": {
8
8
  "darwin-arm64": {
9
9
  "binary": "claude",
10
- "checksum": "9de364db11a410d53cbbb0f6b1f18c66c90053efc9a63370072856d10db66329",
11
- "size": 215643408
10
+ "checksum": "bd245662fb8a0e321b3bf133e930371d6563c387527885f30b2613aef3ba14d6",
11
+ "size": 217695408
12
12
  },
13
13
  "darwin-x64": {
14
14
  "binary": "claude",
15
- "checksum": "cf0b4af7bce5d991a577d1150e86d45b7b83ef57cdb0384044ca54661ded24c6",
16
- "size": 224441440
15
+ "checksum": "c522425e3d42275d2ac2238757ef8ba7f80d165a934044ec5a7a5fd7d7b9950b",
16
+ "size": 226521952
17
17
  },
18
18
  "linux-arm64": {
19
19
  "binary": "claude",
20
- "checksum": "e9ac3df956083645578a382ad64ec304468666e362c33bfdefd803cd6ff596b0",
21
- "size": 231989488
20
+ "checksum": "7de6cab134e48321148e30182c98614118e8f4666819412bead45865190b34ed",
21
+ "size": 234021104
22
22
  },
23
23
  "linux-x64": {
24
24
  "binary": "claude",
25
- "checksum": "8a56c8a14bd3cb246e2bdb7e60aefe0f609bff78c8bbcc5ea6b1817c111c6145",
26
- "size": 232059192
25
+ "checksum": "5c4735937844e84f8a93306e841a5b0e12252909b07870f789b190468da147ab",
26
+ "size": 234119480
27
27
  },
28
28
  "linux-arm64-musl": {
29
29
  "binary": "claude",
30
- "checksum": "fa56170180251debb60b2f10f3d27311738d907553f717b4f961fe72848856c1",
31
- "size": 224605856
30
+ "checksum": "cc8266db086b92faa10180d8c34fb4f196022ad13d0d8800b656966f94a9f0f4",
31
+ "size": 226637472
32
32
  },
33
33
  "linux-x64-musl": {
34
34
  "binary": "claude",
35
- "checksum": "396c3914f3e25b6c66535a55ea06ce9927896ffb7cd25f368c703e06373ff97e",
36
- "size": 225980376
35
+ "checksum": "e21d4818a7282c1b18f7949af863a58e640f017a8ffa4053f5ae927ac95d954a",
36
+ "size": 228036568
37
37
  },
38
38
  "win32-x64": {
39
39
  "binary": "claude.exe",
40
- "checksum": "a863895d829a246d97c1b881fae85593aab97b5b7ea5436ad964798f5f48a022",
41
- "size": 235169440
40
+ "checksum": "006ea5c8638f67f10a5ae66bb232fd267c9f6af294e3f03f4cfcf1fd3f2cced8",
41
+ "size": 237232800
42
42
  },
43
43
  "win32-arm64": {
44
44
  "binary": "claude.exe",
45
- "checksum": "a0edbfbb634837d52b6408562419b487a62c61557d32d018c78142e5471555d9",
46
- "size": 226394272
45
+ "checksum": "099128d103db9f10ca4e23c91b586ed7939f6c27deade560734fd8a8ba8e2b5f",
46
+ "size": 228457632
47
47
  }
48
48
  },
49
49
  "sdkCompat": {
50
50
  "testedWrapperVersions": [
51
- "0.3.237",
52
- "0.3.238",
53
51
  "0.3.239",
54
52
  "0.3.240",
55
53
  "0.3.241",
@@ -77,7 +75,9 @@
77
75
  "0.3.272",
78
76
  "0.3.273",
79
77
  "0.3.274",
80
- "0.3.275"
78
+ "0.3.275",
79
+ "0.3.276",
80
+ "0.3.277"
81
81
  ],
82
82
  "harnessSchema": 1
83
83
  }
package/manifest.zst.json CHANGED
@@ -1,63 +1,61 @@
1
1
  {
2
- "version": "2.1.276",
2
+ "version": "2.1.278",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "bc0a4292e0472d227ceecb07d892ab1a777a4926",
5
- "modsCommit": "68ac8bbf0245b615b41517bf8f2b2f35af1ae31d",
6
- "buildDate": "2026-09-18T00:50:49Z",
4
+ "commit": "809c980662e3525645594dc8b74f78c38a348db1",
5
+ "modsCommit": "31a3b00bef145a0393d9dbf840a98674fec07712",
6
+ "buildDate": "2026-09-19T01:23:12Z",
7
7
  "platforms": {
8
8
  "darwin-arm64": {
9
9
  "binary": "claude.zst",
10
- "checksum": "c152f199101ffb6a197fa79f3c1617f2e4ad72d9dd4ccef36559696bc6fbbf60",
11
- "size": 71019331,
10
+ "checksum": "dba9162d25e74c59ad72c9df72f80cbc42ecc984137effc095d3efc6cdba5688",
11
+ "size": 71680385,
12
12
  "bundle": {
13
- "checksum": "38d7c719597489b2b79069161d3b9e93b907f5e44b97cd44e479f0742a9eaa1e",
14
- "size": 71024230
13
+ "checksum": "1d99d25dd40f9e4fa26d51f243d5537fe72ee105506bf7ab2473da247e81c383",
14
+ "size": 71682327
15
15
  }
16
16
  },
17
17
  "darwin-x64": {
18
18
  "binary": "claude.zst",
19
- "checksum": "a7c803a21afc1f0e14aac3819de14a031cc259212de04ac14831c2ecac019f5b",
20
- "size": 75199422,
19
+ "checksum": "b4b9893caa7e2a03603f957fcfeb796e44adfdb205e65e58600c096aedb92bc9",
20
+ "size": 75875517,
21
21
  "bundle": {
22
- "checksum": "49e425e56529477345458b2ed194eeddb24f9af457ae48e0a5895669343a3b62",
23
- "size": 75199821
22
+ "checksum": "35afa32d1b9bac1ff525a97666955450381cd0221d536d16cffcc9dd353f5012",
23
+ "size": 75883179
24
24
  }
25
25
  },
26
26
  "linux-arm64": {
27
27
  "binary": "claude.zst",
28
- "checksum": "2e0040597f5723fdc0608d11f84674e734a3bae0a3b23b7a0712c99e0d5fb5d8",
29
- "size": 80195460
28
+ "checksum": "4b758a132d4e52d5580ff13d127f3b21aac02c780cbf8803485ab2b5a14dff1b",
29
+ "size": 80854910
30
30
  },
31
31
  "linux-x64": {
32
32
  "binary": "claude.zst",
33
- "checksum": "0b2e7bfc53a34b64d03af28509f7803623efb02a7be598509981f937fe2849a8",
34
- "size": 80820724
33
+ "checksum": "5f5db204251b8457ac68b2004ed140a50c8feea62e5246cc28cde8d04ad760cb",
34
+ "size": 81468815
35
35
  },
36
36
  "linux-arm64-musl": {
37
37
  "binary": "claude.zst",
38
- "checksum": "660a62b76eac08fcc1c86ac0450f9a3689c80af4d4da3ed762efde999db7b9c6",
39
- "size": 78648975
38
+ "checksum": "d23b5988351582876f3b560b75db3f838af4361358e1268ea254b43eebd745af",
39
+ "size": 79306049
40
40
  },
41
41
  "linux-x64-musl": {
42
42
  "binary": "claude.zst",
43
- "checksum": "48e9423690734c4f5718eba6fea0c516bceee0c53b7522ec374aed65556aa082",
44
- "size": 79312653
43
+ "checksum": "c02648026dd185b43a34baa0c4668fdd1d8e4a8a7ebfcc1132ffce836b95e0b0",
44
+ "size": 79966866
45
45
  },
46
46
  "win32-x64": {
47
47
  "binary": "claude.exe.zst",
48
- "checksum": "497143079a9c781ec15adf8ac682ac8cc4d8db80844ce7051c102c765308526c",
49
- "size": 83217487
48
+ "checksum": "29d81b3f574221ca5e354186e31297923b412b06c6d93ff96b75dbd5fb3809e4",
49
+ "size": 83867525
50
50
  },
51
51
  "win32-arm64": {
52
52
  "binary": "claude.exe.zst",
53
- "checksum": "d805fed8cbe7f1919b8f2b4bcb3718c426dda4ac1b5695555a69d0cc9a6a053a",
54
- "size": 79954588
53
+ "checksum": "35b0714245e6a9f659af91725ea9e65fa215f87822ee7ec3520aabc6a0a28e45",
54
+ "size": 80611186
55
55
  }
56
56
  },
57
57
  "sdkCompat": {
58
58
  "testedWrapperVersions": [
59
- "0.3.237",
60
- "0.3.238",
61
59
  "0.3.239",
62
60
  "0.3.240",
63
61
  "0.3.241",
@@ -85,7 +83,9 @@
85
83
  "0.3.272",
86
84
  "0.3.273",
87
85
  "0.3.274",
88
- "0.3.275"
86
+ "0.3.275",
87
+ "0.3.276",
88
+ "0.3.277"
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.276",
3
+ "version": "0.3.278",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -57,14 +57,14 @@
57
57
  "zod": "^4.0.0"
58
58
  },
59
59
  "optionalDependencies": {
60
- "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.276",
61
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.276",
62
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.276",
63
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.276",
64
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.276",
65
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.276",
66
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.276",
67
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.276"
60
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.278",
61
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.278",
62
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.278",
63
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.278",
64
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.278",
65
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.278",
66
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.278",
67
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.278"
68
68
  },
69
69
  "files": [
70
70
  "sdk.mjs",
@@ -80,5 +80,5 @@
80
80
  "manifest.json",
81
81
  "manifest.zst.json"
82
82
  ],
83
- "claudeCodeVersion": "2.1.276"
83
+ "claudeCodeVersion": "2.1.278"
84
84
  }
package/sdk-tools.d.ts CHANGED
@@ -11,7 +11,6 @@
11
11
  export type ToolInputSchemas =
12
12
  | AgentInput
13
13
  | BashInput
14
- | TaskOutputInput
15
14
  | ExitPlanModeInput
16
15
  | FileEditInput
17
16
  | FileReadInput
@@ -38,7 +37,6 @@ export type ToolInputSchemas =
38
37
  | TaskGetInput
39
38
  | TaskUpdateInput
40
39
  | TaskListInput
41
- | REPLInput
42
40
  | WorkflowInput
43
41
  | CronCreateInput
44
42
  | CronDeleteInput
@@ -92,7 +90,6 @@ export type ToolOutputSchemas =
92
90
  | ProposeSkillsOutput
93
91
  | ProposeGoalOutput
94
92
  | EnterPlanModeOutput
95
- | REPLOutput
96
93
  | WorkflowOutput
97
94
  | CronCreateOutput
98
95
  | CronDeleteOutput
@@ -822,20 +819,6 @@ export interface BashInput {
822
819
  */
823
820
  dangerouslyDisableSandbox?: boolean;
824
821
  }
825
- export interface TaskOutputInput {
826
- /**
827
- * The task ID to get output from
828
- */
829
- task_id: string;
830
- /**
831
- * Whether to wait for completion
832
- */
833
- block: boolean;
834
- /**
835
- * Max wait time in ms
836
- */
837
- timeout: number;
838
- }
839
822
  export interface ExitPlanModeInput {
840
823
  /**
841
824
  * Deprecated: no longer used.
@@ -2849,20 +2832,6 @@ export interface TaskUpdateInput {
2849
2832
  };
2850
2833
  }
2851
2834
  export interface TaskListInput {}
2852
- export interface REPLInput {
2853
- /**
2854
- * JavaScript code to execute. Supports top-level await. State persists across calls.
2855
- */
2856
- code: string;
2857
- /**
2858
- * Clear, concise description of what this script does in active voice (5-10 words). E.g. "Trace upgrade message to its GrowthBook flag"
2859
- */
2860
- description?: string;
2861
- /**
2862
- * Optional timeout in milliseconds (default 30000, max 600000)
2863
- */
2864
- timeout?: number;
2865
- }
2866
2835
  export interface WorkflowInput {
2867
2836
  /**
2868
2837
  * Self-contained workflow script. Must begin with `export const meta = { name, description, phases }` (pure literal, no computed values) followed by the script body using agent()/parallel()/pipeline()/phase().
@@ -4109,67 +4078,6 @@ export interface EnterPlanModeOutput {
4109
4078
  */
4110
4079
  message: string;
4111
4080
  }
4112
- export interface REPLOutput {
4113
- /**
4114
- * The code that was executed
4115
- */
4116
- code: string;
4117
- /**
4118
- * Return value from the code execution
4119
- */
4120
- result?: {
4121
- [k: string]: unknown;
4122
- };
4123
- /**
4124
- * Captured console.log output
4125
- */
4126
- stdout: string;
4127
- /**
4128
- * Captured console.error output
4129
- */
4130
- stderr: string;
4131
- /**
4132
- * Error message if execution failed
4133
- */
4134
- error?: string;
4135
- /**
4136
- * True on an async-dispatch receipt or refusal: the script was handed to the async dispatcher (queued — outcome arrives later as a poll event — or refused at the queue cap), so this Output carries no execution output and resume replay must skip the block
4137
- */
4138
- asyncDispatched?: boolean;
4139
- /**
4140
- * Images returned by inner Read calls — surfaced as image content blocks
4141
- */
4142
- images?: {
4143
- base64: string;
4144
- mediaType: string;
4145
- }[];
4146
- /**
4147
- * Count of inner-Read images dropped by the per-result image cap; surfaced as a note in the tool_result
4148
- */
4149
- imagesOmitted?: number;
4150
- /**
4151
- * Pages of inner page-range Reads that could not be processed as an image; surfaced as one note each in the tool_result
4152
- */
4153
- imagePagesFailed?: {
4154
- page: number;
4155
- file?: string;
4156
- error?: string;
4157
- }[];
4158
- /**
4159
- * Count of failed-page notes dropped by the per-result note cap; surfaced as a note in the tool_result
4160
- */
4161
- imagePagesFailedOmitted?: number;
4162
- /**
4163
- * PDFs returned by inner Read calls — surfaced as document content blocks
4164
- */
4165
- documents?: {
4166
- base64: string;
4167
- }[];
4168
- /**
4169
- * Count of inner-Read PDFs dropped by the per-result document cap; surfaced as a note in the tool_result
4170
- */
4171
- documentsOmitted?: number;
4172
- }
4173
4081
  export interface WorkflowOutput {
4174
4082
  status: "async_launched" | "remote_launched";
4175
4083
  taskId: string;
package/sdk.d.ts CHANGED
@@ -1956,6 +1956,7 @@ export declare type Options = {
1956
1956
 
1957
1957
 
1958
1958
 
1959
+
1959
1960
  /**
1960
1961
  * Enable prompt suggestions. When true, the agent emits a `prompt_suggestion`
1961
1962
  * message after each turn with a predicted next user prompt.
@@ -2738,8 +2739,11 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
2738
2739
  * and when omitted the display mode from session start (`thinking.display`
2739
2740
  * / `--thinking-display`) is kept — a session started with thinking
2740
2741
  * disabled has none, so re-enabling without this param gets that default.
2742
+ * `'highlights'` (the API's one-line thinking titles) is honored by the
2743
+ * API only for Anthropic-hosted remote sessions; elsewhere the API rejects
2744
+ * it and the session falls back to `'omitted'`.
2741
2745
  */
2742
- setMaxThinkingTokens(maxThinkingTokens: number | null, thinkingDisplay?: 'summarized' | 'omitted' | null): Promise<void>;
2746
+ setMaxThinkingTokens(maxThinkingTokens: number | null, thinkingDisplay?: 'summarized' | 'omitted' | 'highlights' | null): Promise<void>;
2743
2747
  /**
2744
2748
  * Merge settings into the flag settings layer. This is the inline `settings`
2745
2749
  * option of `query()`, applied mid-session. Flag settings sit above
@@ -2770,12 +2774,14 @@ export declare interface Query extends AsyncGenerator<SDKMessage, void> {
2770
2774
  * same path /config uses (canonical store root, gitignore upkeep,
2771
2775
  * hardened write) — and live-apply them. Unlike applyFlagSettings, which
2772
2776
  * only touches the session-scoped flag layer. The handler accepts only an
2773
- * explicit key allowlist (currently just outputStyle) with string values
2774
- * — deletion is not supported — and refuses remote transports and
2775
- * sessions whose --setting-sources exclude the target source. Rejects
2776
- * with the gate's or writer's error otherwise.
2777
+ * explicit key allowlist per file (localSettings: outputStyle; userSettings:
2778
+ * effortLevel, saved for the session's current model as /effort saves it,
2779
+ * without setting the running session's level) with string values — deletion is not
2780
+ * supported — and refuses remote transports and sessions whose
2781
+ * --setting-sources exclude the target source. Rejects with the gate's or
2782
+ * writer's error otherwise.
2777
2783
  */
2778
- updateSettings(source: 'localSettings', settings: Record<string, unknown>): Promise<void>;
2784
+ updateSettings(source: 'localSettings' | 'userSettings', settings: Record<string, unknown>): Promise<void>;
2779
2785
  /**
2780
2786
  * Get the full initialization result, including supported commands, models,
2781
2787
  * account info, and output style configuration.
@@ -4765,12 +4771,12 @@ declare type SDKControlSetColorRequest = {
4765
4771
  };
4766
4772
 
4767
4773
  /**
4768
- * Sets the maximum number of thinking tokens for extended thinking. When max_thinking_tokens is omitted or 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. 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.
4774
+ * Sets the maximum number of thinking tokens for extended thinking. When max_thinking_tokens is omitted or 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. 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 allows it only for Claude Code sessions that Anthropic hosts; for any other client this request still succeeds and the session falls back to 'omitted' (no thinking text) once the API has rejected the value.
4769
4775
  */
4770
4776
  declare type SDKControlSetMaxThinkingTokensRequest = {
4771
4777
  subtype: 'set_max_thinking_tokens';
4772
4778
  max_thinking_tokens?: number | null;
4773
- thinking_display?: ('summarized' | 'omitted') | null;
4779
+ thinking_display?: ('summarized' | 'omitted' | 'highlights') | null;
4774
4780
  };
4775
4781
 
4776
4782
  /**
@@ -4806,14 +4812,14 @@ declare type SDKControlStopTaskRequest = {
4806
4812
  };
4807
4813
 
4808
4814
  /**
4809
- * Merges the provided settings into a settings file through the CLI's own writer (canonical store root, gitignore upkeep, hardened write) and live-applies them — the same path /config uses. Unlike apply_flag_settings, which only touches the session-scoped flag layer. The handler accepts an explicit key allowlist only (currently just outputStyle — the file feeds hook and permission-rule loading, so each key is a security decision), requires string values (key deletion is not supported), and refuses remote transports and sessions whose --setting-sources exclude the target source.
4815
+ * Writes settings through the CLI's own writer. For localSettings, merges the given keys into the project's local settings file (canonical store root, gitignore upkeep, hardened write) and live-applies them — the same path /config uses; allowlist: outputStyle. For userSettings, takes effortLevel only and saves it as the default for the session's current model, under modelSettings as /effort saves it ('max' is session-only and is not written; the running session's level is not set here — send apply_flag_settings for that). Unlike apply_flag_settings, which only touches the session-scoped flag layer. Each file feeds hook and permission-rule loading, so each allowed key is a security decision. String values only (key deletion is not supported); refused on remote transports and in sessions whose --setting-sources exclude the target source.
4810
4816
  */
4811
4817
  declare type SDKControlUpdateSettingsRequest = {
4812
4818
  subtype: 'update_settings';
4813
4819
  /**
4814
- * Which settings file to write. Only the project's local settings file for now — the scope host UIs need so their writes land exactly where /config's do.
4820
+ * Which settings file to write: the project's local settings file, where /config's writes land, or the user's settings file, which takes effortLevel only.
4815
4821
  */
4816
- source: 'localSettings';
4822
+ source: 'localSettings' | 'userSettings';
4817
4823
  settings: Record<string, unknown>;
4818
4824
  };
4819
4825
 
@@ -5357,7 +5363,7 @@ export declare type SDKResultError = {
5357
5363
  num_turns: number;
5358
5364
  stop_reason: string | null;
5359
5365
  /**
5360
- * Cumulative estimated cost in USD for this query() call, covering the same query-pipeline calls as modelUsage and sharing its lifecycle: cumulative across turns in streaming-input sessions — each result carries the running total so far, so read the latest result rather than summing across results. Crash/startup-error results may carry zeroed values, resumed sessions start fresh, and a mid-session /clear resets the running total. An estimate, not a billing statement.
5366
+ * Cumulative estimated cost in USD for this query() call, covering the same query-pipeline calls as modelUsage and sharing its lifecycle: cumulative across turns in streaming-input sessions — each result carries the running total so far, so read the latest result rather than summing across results. Crash/startup-error results may carry zeroed values, a resumed or forked session continues from the total its transcript saved, when it has one (so the first result already carries the earlier turns; maxBudgetUsd counts only the spend since this query() call started or last /clear), and a mid-session /clear resets the running total. An estimate, not a billing statement.
5361
5367
  */
5362
5368
  total_cost_usd: number;
5363
5369
  /**
@@ -5365,7 +5371,7 @@ export declare type SDKResultError = {
5365
5371
  */
5366
5372
  usage: NonNullableUsage;
5367
5373
  /**
5368
- * Per-model totals for every model call made through the query pipeline during this query() call — main loop, Task subagents, sidechains, and internal calls such as compaction and Workflow agents. Cumulative across turns in streaming-input sessions: each result carries the running total so far, so read the latest result rather than summing across results. Internal helper calls outside the query pipeline (e.g. the permission classifier, token-count probes) are excluded; crash/startup-error results may carry zeroed usage, resumed sessions start fresh, and a mid-session /clear resets the running total. The correct field for token/cost accounting; treat it as an estimate, not a billing statement.
5374
+ * Per-model totals for every model call made through the query pipeline during this query() call — main loop, Task subagents, sidechains, and internal calls such as compaction and Workflow agents. Cumulative across turns in streaming-input sessions: each result carries the running total so far, so read the latest result rather than summing across results. Internal helper calls outside the query pipeline (e.g. the permission classifier, token-count probes) are excluded; crash/startup-error results may carry zeroed usage, a resumed or forked session continues from the totals its transcript saved, when it has them (so the first result already carries the earlier turns), and a mid-session /clear resets the running total. The correct field for token/cost accounting; treat it as an estimate, not a billing statement.
5369
5375
  */
5370
5376
  modelUsage: Record<string, ModelUsage>;
5371
5377
 
@@ -5425,7 +5431,14 @@ export declare type SDKResultSuccess = {
5425
5431
  first_content_frame_ms?: number;
5426
5432
  first_stream_post_ms?: number;
5427
5433
  first_stream_post_ack_ms?: number;
5434
+ first_stream_post_queue_wait_ms?: number;
5435
+ first_stream_post_queued_behind?: 'durable_post' | 'ephemeral_post' | 'retry_backoff' | 'hold' | 'none';
5428
5436
  first_stream_post_wall_ms?: number;
5437
+
5438
+
5439
+
5440
+ first_text_post_ms?: number;
5441
+ first_text_post_wall_ms?: number;
5429
5442
  time_to_request_from_spawn_ms?: number;
5430
5443
  warm_spare_claimed?: boolean;
5431
5444
  time_origin_ms?: number;
@@ -5436,7 +5449,7 @@ export declare type SDKResultSuccess = {
5436
5449
  result: string;
5437
5450
  stop_reason: string | null;
5438
5451
  /**
5439
- * Cumulative estimated cost in USD for this query() call, covering the same query-pipeline calls as modelUsage and sharing its lifecycle: cumulative across turns in streaming-input sessions — each result carries the running total so far, so read the latest result rather than summing across results. Crash/startup-error results may carry zeroed values, resumed sessions start fresh, and a mid-session /clear resets the running total. An estimate, not a billing statement.
5452
+ * Cumulative estimated cost in USD for this query() call, covering the same query-pipeline calls as modelUsage and sharing its lifecycle: cumulative across turns in streaming-input sessions — each result carries the running total so far, so read the latest result rather than summing across results. Crash/startup-error results may carry zeroed values, a resumed or forked session continues from the total its transcript saved, when it has one (so the first result already carries the earlier turns; maxBudgetUsd counts only the spend since this query() call started or last /clear), and a mid-session /clear resets the running total. An estimate, not a billing statement.
5440
5453
  */
5441
5454
  total_cost_usd: number;
5442
5455
  /**
@@ -5444,7 +5457,7 @@ export declare type SDKResultSuccess = {
5444
5457
  */
5445
5458
  usage: NonNullableUsage;
5446
5459
  /**
5447
- * Per-model totals for every model call made through the query pipeline during this query() call — main loop, Task subagents, sidechains, and internal calls such as compaction and Workflow agents. Cumulative across turns in streaming-input sessions: each result carries the running total so far, so read the latest result rather than summing across results. Internal helper calls outside the query pipeline (e.g. the permission classifier, token-count probes) are excluded; crash/startup-error results may carry zeroed usage, resumed sessions start fresh, and a mid-session /clear resets the running total. The correct field for token/cost accounting; treat it as an estimate, not a billing statement.
5460
+ * Per-model totals for every model call made through the query pipeline during this query() call — main loop, Task subagents, sidechains, and internal calls such as compaction and Workflow agents. Cumulative across turns in streaming-input sessions: each result carries the running total so far, so read the latest result rather than summing across results. Internal helper calls outside the query pipeline (e.g. the permission classifier, token-count probes) are excluded; crash/startup-error results may carry zeroed usage, a resumed or forked session continues from the totals its transcript saved, when it has them (so the first result already carries the earlier turns), and a mid-session /clear resets the running total. The correct field for token/cost accounting; treat it as an estimate, not a billing statement.
5448
5461
  */
5449
5462
  modelUsage: Record<string, ModelUsage>;
5450
5463
 
@@ -5627,6 +5640,7 @@ export declare type SDKSystemMessage = {
5627
5640
 
5628
5641
 
5629
5642
 
5643
+
5630
5644
  uuid: UUID;
5631
5645
  session_id: string;
5632
5646
  };
@@ -5807,7 +5821,7 @@ export declare type SDKUsageReport = {
5807
5821
  */
5808
5822
  rate_limits: {
5809
5823
  /**
5810
- * The server's usage rows (the usage endpoint's limits[]), as sent: which meters apply, their scope, labels, severity and order are the server's, so a client renders them verbatim and a new meter needs no client release. Empty when the server reported no meters; null when the body carried no rows at all (a server that predates them). When the usage fetch failed and the CLI fell back to rate-limit response headers, this holds at most the one row it synthesizes from them (the overage-included weekly window, shaped like the server's), or null when the headers carried none.
5824
+ * The server's usage rows (the usage endpoint's limits[]), as sent: which meters apply, their scope, labels, severity and order are the server's, so a client renders them verbatim and a new meter needs no client release. Empty when the server reported no meters; null when the body carried no rows at all (a server that predates them). Null too while the usage fetch is failing: the rows here are only ever the server's current reply, so neither the row the CLI builds from rate-limit response headers for its own screen nor its snapshot of an earlier reply appears here.
5811
5825
  */
5812
5826
  limits: {
5813
5827
  /**
@@ -5838,13 +5852,13 @@ export declare type SDKUsageReport = {
5838
5852
  } | null;
5839
5853
  } | null;
5840
5854
  /**
5841
- * The server's reading of the row for a meter's colour, e.g. 'normal', 'warning' or 'critical'; a client falls back to its own thresholds without it.
5855
+ * The server's reading of the row for a meter's colour, e.g. 'normal', 'warning' or 'critical'. Every row here is the server's, so a client never grades a row itself.
5842
5856
  */
5843
- severity?: string | null;
5857
+ severity: string;
5844
5858
  /**
5845
5859
  * The server's headline pick: the row a single-value indicator shows.
5846
5860
  */
5847
- is_active?: boolean | null;
5861
+ is_active: boolean;
5848
5862
  }[] | null;
5849
5863
  /**
5850
5864
  * Extra-usage (overage) spend for the billing period, when the plan has it. Amounts are in minor units of `currency` (cents for USD); is_enabled is false while extra usage cannot cover sends.
@@ -5925,7 +5939,12 @@ export declare type SDKUserMessage = {
5925
5939
 
5926
5940
 
5927
5941
 
5942
+
5928
5943
  uuid?: UUID;
5944
+ /**
5945
+ * 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`.
5946
+ */
5947
+ pasted_content?: MessageParam['content'][];
5929
5948
  session_id?: string;
5930
5949
  /**
5931
5950
  * Subagent type that produced this message.
@@ -6001,6 +6020,7 @@ export declare type SDKUserMessageReplay = {
6001
6020
 
6002
6021
 
6003
6022
 
6023
+
6004
6024
  uuid: UUID;
6005
6025
  session_id: string;
6006
6026
  isReplay: true;
@@ -6850,7 +6870,7 @@ export declare interface Settings {
6850
6870
  */
6851
6871
  bashOutputMaxChars?: number;
6852
6872
  /**
6853
- * How many characters of a background task's output the TaskOutput tool hands Claude inline (default 32000; values clamp to 4000-128000). Longer output is cut to its most recent characters with the path of the full output file, except that a shell command still running returns its first characters up to this size. When set, this also replaces TASK_MAX_OUTPUT_LENGTH, which on its own only sizes that window.
6873
+ * Deprecated: no longer has any effect (the TaskOutput tool was removed). Read a background task's output file with the Read tool instead.
6854
6874
  */
6855
6875
  taskOutputMaxChars?: number;
6856
6876
  /**
@@ -8915,6 +8935,10 @@ export declare type SlashCommand = {
8915
8935
  * Alternate names that resolve to this command (e.g., /cost and /stats both resolve to /usage)
8916
8936
  */
8917
8937
  aliases?: string[];
8938
+ /**
8939
+ * True when the command is Claude Code's own; absent for a command defined by a user, project, plugin or MCP server. Rows can share a name: when a marked row carries it, /name runs that one, and an unmarked row is the one /name runs only when no marked row shares its name. The marker describes the row's name, not its aliases: a typed alias runs a command that has it as its name, when one exists, whatever this marker says.
8940
+ */
8941
+ builtin?: boolean;
8918
8942
  };
8919
8943
 
8920
8944
  /**