@anthropic-ai/claude-agent-sdk 0.3.291 → 0.3.293

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.291",
2
+ "version": "2.1.293",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "f7d32cfe47f735a7e70c5cce1ff6044b24692b4c",
5
- "modsCommit": "2bfb629dfaff0c8318047a4beb93cf1dc5b58b18",
6
- "buildDate": "2026-10-06T02:41:25Z",
4
+ "commit": "3abc54a9d60b4d12c627afad22d6e5f58a6199d2",
5
+ "modsCommit": "765f236fe1bfcc678e0ec59af9170fb7d6771a3a",
6
+ "buildDate": "2026-10-07T06:56:40Z",
7
7
  "platforms": {
8
8
  "darwin-arm64": {
9
9
  "binary": "claude",
10
- "checksum": "9a1d2ed6bb4421e8fc80c892c0413f293be3ee50ae3d7dda1a7622197a056690",
11
- "size": 233211568
10
+ "checksum": "4e21122a227857da1178aca3299700c1fd7f2b77c93f12e73c2c76db796a105e",
11
+ "size": 236330608
12
12
  },
13
13
  "darwin-x64": {
14
14
  "binary": "claude",
15
- "checksum": "223bf4de0e8f38cb254fc38f82fda09f9fcfd4e2aac62b59ef7e7f1960a45ddd",
16
- "size": 241681792
15
+ "checksum": "267af22d4eb187b8d65d1592e6fabf57b1df6c254913d5a6c5d8b956a02cd002",
16
+ "size": 244819072
17
17
  },
18
18
  "linux-arm64": {
19
19
  "binary": "claude",
20
- "checksum": "c18473a04cc4f077435d5d9081f09ebea46e699eb2825cea64741c4bccb87647",
21
- "size": 249028600
20
+ "checksum": "a43629e888f0a7d96c5e8de62abf44852433a7ff2481574688db3e5b6399491f",
21
+ "size": 252108792
22
22
  },
23
23
  "linux-x64": {
24
24
  "binary": "claude",
25
- "checksum": "078fad28d0297c9a25d306b635b2d8816c6839347520f29eb54ffea5d56142fb",
26
- "size": 249642168
25
+ "checksum": "8968405e26db478af44eabc4635ab5ca557057b702a54460a59c13e1b253e978",
26
+ "size": 252755128
27
27
  },
28
28
  "linux-arm64-musl": {
29
29
  "binary": "claude",
30
- "checksum": "582811002a94033fb27f1a307ab893a32ebac827b4ea1b20f72eb778ccf834ab",
31
- "size": 241383232
30
+ "checksum": "00755ae106b6925c1adb2b17e4c6d9b0c41eb4cc55bcad3581345b0aa3176c85",
31
+ "size": 244463424
32
32
  },
33
33
  "linux-x64-musl": {
34
34
  "binary": "claude",
35
- "checksum": "e4b1fb39b56a6798063fa04912e838c01dd58dffeb238d6dcd31ad2d172e82c5",
36
- "size": 243388504
35
+ "checksum": "853fff235f19ce65ae304b79f126f7dd8a60855d5c7ce98e43e3e12416b782bc",
36
+ "size": 246501464
37
37
  },
38
38
  "win32-x64": {
39
39
  "binary": "claude.exe",
40
- "checksum": "70052a17e06561a4563597f79570e81ccc0772474c3c6ac522aa5ccc71773013",
41
- "size": 253042848
40
+ "checksum": "8693c4a02dde7441d0066ede68af8ddfc408bb982d77e12b506286268224e6fa",
41
+ "size": 256155808
42
42
  },
43
43
  "win32-arm64": {
44
44
  "binary": "claude.exe",
45
- "checksum": "fb1b35e6d1a91e45478cc6bd4e5ae7138dd00c3f79df339b7ab1fbbbbaf69bc0",
46
- "size": 240567968
45
+ "checksum": "64026e57249070fc83d91768ad417d40683ee18ac0383b36f5c77b3f17f8eb83",
46
+ "size": 243679904
47
47
  }
48
48
  },
49
49
  "sdkCompat": {
50
50
  "testedWrapperVersions": [
51
- "0.3.251",
52
51
  "0.3.252",
53
52
  "0.3.257",
54
53
  "0.3.258",
package/manifest.zst.json CHANGED
@@ -1,62 +1,61 @@
1
1
  {
2
- "version": "2.1.291",
2
+ "version": "2.1.293",
3
3
  "manifestSignatureEnforcement": "flag",
4
- "commit": "f7d32cfe47f735a7e70c5cce1ff6044b24692b4c",
5
- "modsCommit": "2bfb629dfaff0c8318047a4beb93cf1dc5b58b18",
6
- "buildDate": "2026-10-06T02:42:33Z",
4
+ "commit": "3abc54a9d60b4d12c627afad22d6e5f58a6199d2",
5
+ "modsCommit": "765f236fe1bfcc678e0ec59af9170fb7d6771a3a",
6
+ "buildDate": "2026-10-07T06:57:50Z",
7
7
  "platforms": {
8
8
  "darwin-arm64": {
9
9
  "binary": "claude.zst",
10
- "checksum": "2f750a99ce662a1f5d586a88e1a13463c9e88ae9e55a492878a82e46685414f5",
11
- "size": 77709814,
10
+ "checksum": "28388647d76919972795439c4ac43654985a36b9bd18a8a541a9e7c78286ffec",
11
+ "size": 78779601,
12
12
  "bundle": {
13
- "checksum": "614337527cc1322f79021a909803906aace475a013b14cf2924012e6bb40a6bb",
14
- "size": 77720906
13
+ "checksum": "8433d0d9cd0dc718601daba8da8c58f3eb08976d865458c47746dadffc4bfbc3",
14
+ "size": 78796164
15
15
  }
16
16
  },
17
17
  "darwin-x64": {
18
18
  "binary": "claude.zst",
19
- "checksum": "91e8b3e811cbd1c95ce848e2e7067c686a5c27b98f3594b21c9de3159a2e73d0",
20
- "size": 81924067,
19
+ "checksum": "969a39b6b64c8e2d91ca4751e5f96439c3960e6029c5af4c0bac5e546b0a180d",
20
+ "size": 82996143,
21
21
  "bundle": {
22
- "checksum": "8bef52ddf0dc51d08e1c3cb594671324edb9398da35c83d8a6bb84f6de6a5a0e",
23
- "size": 81922297
22
+ "checksum": "d96fccce310b4c47363a4305afa7944bd942c9d09d94933fcd1f692140c5e614",
23
+ "size": 83003941
24
24
  }
25
25
  },
26
26
  "linux-arm64": {
27
27
  "binary": "claude.zst",
28
- "checksum": "1516c691c7ca10ca0a09d00160c006dfdb1f44263c928e6e4360363717de03f6",
29
- "size": 86807536
28
+ "checksum": "031f4c6c3489065ffc4942e06b920b6fa52fb03830bb375fae6919c11537d725",
29
+ "size": 87847361
30
30
  },
31
31
  "linux-x64": {
32
32
  "binary": "claude.zst",
33
- "checksum": "659b2a4f57441eae2bad4e1ee67f93c26fe630863683463f48c7000ebeda8372",
34
- "size": 87530446
33
+ "checksum": "25786da347c30641dc6c50733d090d77cb540f105a61af7e9895b56e39fe16a5",
34
+ "size": 88583323
35
35
  },
36
36
  "linux-arm64-musl": {
37
37
  "binary": "claude.zst",
38
- "checksum": "1375f3eb6216e3135bc74246fc8302d3f717792a587196bfca52b78408c4df83",
39
- "size": 85206110
38
+ "checksum": "befc1849bdc2b0516646c3761340bcbe24fb2f06675c0a2e7dc8e84bef6fb823",
39
+ "size": 86247982
40
40
  },
41
41
  "linux-x64-musl": {
42
42
  "binary": "claude.zst",
43
- "checksum": "e3c4559aeed8bfbd665c769dabc04d6b6fa54ec704db80f36153b9272bd63236",
44
- "size": 85976967
43
+ "checksum": "3ebe36274ca5b43dcf55102774998ebad2f4f36e976a0e18639d995d77964796",
44
+ "size": 87007611
45
45
  },
46
46
  "win32-x64": {
47
47
  "binary": "claude.exe.zst",
48
- "checksum": "693ddb8ce8ddaf9f1514c394d7997d2b6d02037e41960ff6864b83b0428b71fd",
49
- "size": 89823809
48
+ "checksum": "83cb0bd7fed48fa6c672a3e6e8a0a752e64bd93cf8d3076fee81bab4f89fb7c8",
49
+ "size": 90886108
50
50
  },
51
51
  "win32-arm64": {
52
52
  "binary": "claude.exe.zst",
53
- "checksum": "661f032008df3727922f7087ef08900d4d5728a14544316d1e68ee43e74c339d",
54
- "size": 86165279
53
+ "checksum": "d4dd9a840bc8a839a57674fac621969a8a91ba05814070d119e114cd1a00b092",
54
+ "size": 87214350
55
55
  }
56
56
  },
57
57
  "sdkCompat": {
58
58
  "testedWrapperVersions": [
59
- "0.3.251",
60
59
  "0.3.252",
61
60
  "0.3.257",
62
61
  "0.3.258",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.291",
3
+ "version": "0.3.293",
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.291",
65
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.291",
66
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.291",
67
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.291",
68
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.291",
69
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.291",
70
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.291",
71
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.291"
64
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.293",
65
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.293",
66
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.293",
67
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.293",
68
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.293",
69
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.293",
70
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.293",
71
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.293"
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-fgc83rkd.mjs",
89
- "core-ke40g9bw.mjs"
88
+ "core-ae32wa3s.mjs",
89
+ "core-d0szsqzn.mjs"
90
90
  ],
91
- "claudeCodeVersion": "2.1.291"
91
+ "claudeCodeVersion": "2.1.293"
92
92
  }
package/sdk-tools.d.ts CHANGED
@@ -468,6 +468,8 @@ export type ArtifactOutput =
468
468
  pinned?: boolean;
469
469
  }[];
470
470
  truncated?: boolean;
471
+ total?: number;
472
+ total_at_least?: true;
471
473
  pins_enabled?: boolean;
472
474
  scope?: "shared" | "all";
473
475
  external_listed?: true;
@@ -779,6 +781,10 @@ export interface AgentInput {
779
781
  * Optional model override for this agent. Takes precedence over the agent definition's model frontmatter and the configured default subagent model. If omitted, uses the agent definition's model, else the default (inherits from the parent unless a default subagent model is configured). Ignored for subagent_type: "fork" — forks always inherit the parent model.
780
782
  */
781
783
  model?: "sonnet" | "opus" | "haiku" | "fable";
784
+ /**
785
+ * Reasoning effort for this agent. Set this ONLY when the user, or instructions such as CLAUDE.md or a skill, explicitly ask that this agent or delegated work run at a specific effort level, never on your own judgment; otherwise omit it and the agent runs at its usual effort.
786
+ */
787
+ effort?: "low" | "medium" | "high" | "xhigh" | "max";
782
788
  /**
783
789
  * Agents run in the background by default; you will be notified when one completes. Set to false only when your very next action depends on this agent's result and nothing else could usefully happen while it runs — otherwise leave it in the background so the user can hand you other work.
784
790
  */
@@ -3302,7 +3308,7 @@ export interface BashOutput {
3302
3308
  */
3303
3309
  backgroundCwdHint?: string;
3304
3310
  /**
3305
- * True when this backgrounded command is owned by a synchronous subagent and is therefore terminated when that agent gives its final response; absent when the command survives (main loop, async subagents)
3311
+ * 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
3306
3312
  */
3307
3313
  backgroundEndsWithFinalResponse?: true;
3308
3314
  /**
@@ -4048,11 +4054,19 @@ export interface ReadNotificationsOutput {
4048
4054
  * Verbatim notification body.
4049
4055
  */
4050
4056
  content: string;
4057
+ /**
4058
+ * RFC3339 timestamp, by this machine's clock, of when the notification reached this session's queue. Missing from results saved before this field existed.
4059
+ */
4060
+ arrived_at?: string;
4051
4061
  }[];
4052
4062
  /**
4053
4063
  * Notifications still queued after this drain (drains are size-budgeted); call the tool again to read them.
4054
4064
  */
4055
4065
  remaining: number;
4066
+ /**
4067
+ * RFC3339 timestamp, by this machine's clock, of when this call read the queue. Missing from results saved before this field existed.
4068
+ */
4069
+ read_at?: string;
4056
4070
  }
4057
4071
  export interface ScheduleWakeupOutput {
4058
4072
  /**
package/sdk.d.ts CHANGED
@@ -1199,6 +1199,7 @@ export declare type McpSdkServerConfig = {
1199
1199
  * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Values below 1000ms are ignored (falls through to MCP_TOOL_TIMEOUT or the default). Applies when the server is first registered; changing it for an already-registered server has no effect until it is removed and re-added.
1200
1200
  */
1201
1201
  timeout?: number;
1202
+
1202
1203
  };
1203
1204
 
1204
1205
  /**
@@ -3644,6 +3645,10 @@ export declare type SDKAssistantMessage = {
3644
3645
  * True when this assistant message was truncated by an interrupt/abort before the stream completed: stop_reason was never received and the content may end mid-word. Absent on normally completed messages.
3645
3646
  */
3646
3647
  aborted?: true;
3648
+ /**
3649
+ * ID of the subagent that produced this message: the `task_id` of its task events, unchanged when the subagent is resumed. Absent on main-thread messages.
3650
+ */
3651
+ agent_id?: string;
3647
3652
  /**
3648
3653
  * Subagent type that produced this message.
3649
3654
  */
@@ -3702,7 +3707,7 @@ export declare type SDKAuthStatusMessage = {
3702
3707
  };
3703
3708
 
3704
3709
  /**
3705
- * The full set of live background tasks, emitted whenever membership changes (start, completion, kill, a foreground agent being backgrounded) or an entry's `ambient` flag flips. A level signal, unlike the task_started/task_notification edge bookends: consumers that only need 'is background work running' should replace their set with each payload rather than pairing edges, so a missed bookend cannot wedge a stale running indicator. Ordering relative to the bookends for the same transition is unspecified (in practice the level precedes them) and the payload carries ids only, so do not correlate it with the edge stream. The level is per-process: nothing is emitted at startup, so consumers must reset to the empty set whenever the session's CLI process (re)starts and let the next membership change repopulate it. A host that re-initializes an already-running process (a repeated `initialize` control request, e.g. after reconnecting) is sent a snapshot of the current set right behind the success response to that request, even when it is empty, so it need not wait for a change; CLIs that predate this send nothing there.
3710
+ * The full set of live background tasks, emitted whenever membership changes (start, completion, kill, a foreground agent being backgrounded) or an entry's `ambient` flag or `parent_task_id` changes. A level signal, unlike the task_started/task_notification edge bookends: consumers that only need 'is background work running' should replace their set with each payload rather than pairing edges, so a missed bookend cannot wedge a stale running indicator. Ordering relative to the bookends for the same transition is unspecified (in practice a task that starts in the background joins the level before its task_started, and a finishing task leaves it after its task_updated and task_notification), so do not correlate it with the edge stream. The level is per-process: nothing is emitted at startup, so consumers must reset to the empty set whenever the session's CLI process (re)starts and let the next membership change repopulate it. A host that re-initializes an already-running process (a repeated `initialize` control request, e.g. after reconnecting) is sent a snapshot of the current set right behind the success response to that request, even when it is empty, so it need not wait for a change; CLIs that predate this send nothing there.
3706
3711
  */
3707
3712
  export declare type SDKBackgroundTasksChangedMessage = {
3708
3713
  type: 'system';
@@ -3712,12 +3717,25 @@ export declare type SDKBackgroundTasksChangedMessage = {
3712
3717
  */
3713
3718
  tasks: {
3714
3719
  task_id: string;
3720
+ /**
3721
+ * Id of one run of the task: equal on every task_* event, background_tasks_changed entry and saved notification (its origin.runId) of that run. A resumed task keeps its task_id and gets a new one. The run ids of one task sort, by plain string comparison, in the order the runs opened; a frame that names a run sorting before the one a reader shows is late. Nothing else about the format is promised. Absent for a task this process did not register, and from CLIs that predate it.
3722
+ */
3723
+ run_id?: string;
3715
3724
  task_type: string;
3725
+ /**
3726
+ * Agent type of a local_agent task, such as "general-purpose" or a custom agent's name; "main-session" for a backgrounded main session. Not set on other tasks.
3727
+ */
3728
+ subagent_type?: string;
3716
3729
  description: string;
3730
+ /**
3731
+ * task_id of the subagent (local_agent) task whose agent launched this subagent, shell, monitor or workflow task. Absent when the launcher is the main thread, has no task_id of its own (a teammate, an agent inside a workflow), or is no longer tracked. A resumed subagent keeps its original parent. The parent may be a foreground or already-ended task, so treat an unknown id as no parent.
3732
+ */
3733
+ parent_task_id?: string;
3717
3734
  /**
3718
3735
  * True for tasks that are not activity (every skip_transcript task, plus every live-update watcher, requested or auto-started); hosts should exclude them from activity indicators.
3719
3736
  */
3720
3737
  ambient?: boolean;
3738
+
3721
3739
  }[];
3722
3740
  uuid: UUID;
3723
3741
  session_id: string;
@@ -4473,6 +4491,7 @@ declare type SDKControlInitializeRequest = {
4473
4491
  * Per-server tool-call timeout in milliseconds. Overrides the MCP_TOOL_TIMEOUT environment variable for this server. Hard wall-clock limit per call; progress notifications do not extend it. Values below 1000ms are ignored (falls through to MCP_TOOL_TIMEOUT or the default). Applies when the server is first registered; changing it for an already-registered server has no effect until it is removed and re-added.
4474
4492
  */
4475
4493
  timeout?: number;
4494
+
4476
4495
  }>;
4477
4496
  /**
4478
4497
  * 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.
@@ -4608,6 +4627,7 @@ declare type SDKControlInterruptRequest = {
4608
4627
 
4609
4628
 
4610
4629
 
4630
+
4611
4631
  };
4612
4632
 
4613
4633
  /**
@@ -4855,7 +4875,7 @@ export declare type SDKControlPermissionRulesState = {
4855
4875
  };
4856
4876
 
4857
4877
  /**
4858
- * Read a file from the session filesystem for the remote sidebar viewer. Path is resolved against cwd and gated by the same read-permission rules as the Read tool.
4878
+ * Read a file from the session filesystem for the remote sidebar viewer. Path is resolved against cwd by default and gated by the same read-permission rules as the Read tool.
4859
4879
  */
4860
4880
  declare type SDKControlReadFileRequest = {
4861
4881
  subtype: 'read_file';
@@ -4865,6 +4885,7 @@ declare type SDKControlReadFileRequest = {
4865
4885
  * How to encode the bytes in `contents`. Defaults to utf-8 (lossy for binary); pass 'base64' to read images.
4866
4886
  */
4867
4887
  encoding?: 'utf-8' | 'base64';
4888
+
4868
4889
  };
4869
4890
 
4870
4891
  /**
@@ -4878,6 +4899,7 @@ export declare type SDKControlReadFileResponse = {
4878
4899
  * Set when the request asked for base64. Absent means utf-8 — including when an older CLI ignored the request's encoding field.
4879
4900
  */
4880
4901
  encoding?: 'base64';
4902
+
4881
4903
  };
4882
4904
 
4883
4905
  /**
@@ -5382,6 +5404,10 @@ export declare type SDKMessageOrigin = {
5382
5404
  */
5383
5405
  fireReason?: string;
5384
5406
 
5407
+ /**
5408
+ * On a background task's own notification: the run_id its task_* events carried, as of when the notification was queued. Not part of the text the model reads.
5409
+ */
5410
+ runId?: string;
5385
5411
  } | {
5386
5412
  kind: 'coordinator';
5387
5413
  } | {
@@ -5494,6 +5520,7 @@ export declare type SDKPartialAssistantMessage = {
5494
5520
  session_id: string;
5495
5521
  ttft_ms?: number;
5496
5522
 
5523
+
5497
5524
  /**
5498
5525
  * 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.
5499
5526
  */
@@ -5692,6 +5719,7 @@ export declare type SDKResultError = {
5692
5719
  */
5693
5720
  modelUsage: Record<string, ModelUsage>;
5694
5721
 
5722
+
5695
5723
  permission_denials: SDKPermissionDenial[];
5696
5724
  /**
5697
5725
  * User-initiated sends still waiting in the command queue when this result was produced. Greater than 0 means at least one more user turn (and result) follows without further input, barring cancellation; 0 means none is pending, or the session is ending (end_session or a shutdown latched mid-turn discards the backlog). Queued sends may coalesce into fewer turns, so this counts pending sends, not remaining results. System-generated queue entries are not counted. Absent on fatal startup results and on surfaces without a command queue.
@@ -5748,7 +5776,6 @@ export declare type SDKResultSuccess = {
5748
5776
 
5749
5777
 
5750
5778
 
5751
-
5752
5779
  user_message_uuid?: string;
5753
5780
  user_message_uuids?: string[];
5754
5781
  resume_reason?: string;
@@ -5796,6 +5823,7 @@ export declare type SDKResultSuccess = {
5796
5823
  */
5797
5824
  modelUsage: Record<string, ModelUsage>;
5798
5825
 
5826
+
5799
5827
  permission_denials: SDKPermissionDenial[];
5800
5828
  /**
5801
5829
  * User-initiated sends still waiting in the command queue when this result was produced. Greater than 0 means at least one more user turn (and result) follows without further input, barring cancellation; 0 means none is pending, or the session is ending (end_session or a shutdown latched mid-turn discards the backlog). Queued sends may coalesce into fewer turns, so this counts pending sends, not remaining results. System-generated queue entries are not counted. Absent on fatal startup results and on surfaces without a command queue.
@@ -5891,9 +5919,9 @@ export declare type SDKSettingsParseError = {
5891
5919
  };
5892
5920
 
5893
5921
  /**
5894
- * 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.
5922
+ * 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.
5895
5923
  */
5896
- 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';
5924
+ 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';
5897
5925
 
5898
5926
  export declare type SDKStatus = 'compacting' | 'requesting' | null;
5899
5927
 
@@ -5905,6 +5933,7 @@ export declare type SDKStatusMessage = {
5905
5933
  compact_result?: 'success' | 'failed';
5906
5934
  compact_error?: string;
5907
5935
 
5936
+
5908
5937
  uuid: UUID;
5909
5938
  session_id: string;
5910
5939
  };
@@ -6000,6 +6029,10 @@ export declare type SDKTaskNotificationMessage = {
6000
6029
  type: 'system';
6001
6030
  subtype: 'task_notification';
6002
6031
  task_id: string;
6032
+ /**
6033
+ * Id of one run of the task: equal on every task_* event, background_tasks_changed entry and saved notification (its origin.runId) of that run. A resumed task keeps its task_id and gets a new one. The run ids of one task sort, by plain string comparison, in the order the runs opened; a frame that names a run sorting before the one a reader shows is late. Nothing else about the format is promised. Absent for a task this process did not register, and from CLIs that predate it.
6034
+ */
6035
+ run_id?: string;
6003
6036
  tool_use_id?: string;
6004
6037
  status: 'completed' | 'failed' | 'stopped';
6005
6038
  /**
@@ -6017,6 +6050,8 @@ export declare type SDKTaskNotificationMessage = {
6017
6050
  * CLI-owned: for a backgrounded MCP task (task_type mcp_task) that completed, the `resource_link` content blocks of its final result — the files it returned by reference — collected from the raw result before the CLI renders it as the text the model reads. A backgrounded task's tool_result is the placeholder text and its real result arrives as this notification, so this is where a host learns which files that tool call produced; join to the originating call via tool_use_id. Same fields and caps as tool_use_result.resourceLinks (at most 50 links, 64 KiB serialized), absent when the result had none or the task is any other type. Never populated from the server's _meta.
6018
6051
  */
6019
6052
  resource_links?: SDKMcpResourceLink[];
6053
+
6054
+
6020
6055
  skip_transcript?: boolean;
6021
6056
  /**
6022
6057
  * True for tasks that are not activity (every skip_transcript task, plus every live-update watcher, requested or auto-started); hosts should exclude them from activity indicators.
@@ -6030,6 +6065,10 @@ export declare type SDKTaskProgressMessage = {
6030
6065
  type: 'system';
6031
6066
  subtype: 'task_progress';
6032
6067
  task_id: string;
6068
+ /**
6069
+ * Id of one run of the task: equal on every task_* event, background_tasks_changed entry and saved notification (its origin.runId) of that run. A resumed task keeps its task_id and gets a new one. The run ids of one task sort, by plain string comparison, in the order the runs opened; a frame that names a run sorting before the one a reader shows is late. Nothing else about the format is promised. Absent for a task this process did not register, and from CLIs that predate it.
6070
+ */
6071
+ run_id?: string;
6033
6072
  tool_use_id?: string;
6034
6073
  description: string;
6035
6074
  /**
@@ -6055,6 +6094,10 @@ export declare type SDKTaskStartedMessage = {
6055
6094
  type: 'system';
6056
6095
  subtype: 'task_started';
6057
6096
  task_id: string;
6097
+ /**
6098
+ * Id of one run of the task: equal on every task_* event, background_tasks_changed entry and saved notification (its origin.runId) of that run. A resumed task keeps its task_id and gets a new one. The run ids of one task sort, by plain string comparison, in the order the runs opened; a frame that names a run sorting before the one a reader shows is late. Nothing else about the format is promised. Absent for a task this process did not register, and from CLIs that predate it.
6099
+ */
6100
+ run_id?: string;
6058
6101
  tool_use_id?: string;
6059
6102
  description: string;
6060
6103
  /**
@@ -6065,10 +6108,15 @@ export declare type SDKTaskStartedMessage = {
6065
6108
  * Whether the task was registered in the background (true) or in the foreground with the spawning tool call blocking on it (false). A resumed subagent is always registered in the background. A later move to the background arrives as task_updated patch.is_backgrounded. Set for local_agent and local_bash tasks.
6066
6109
  */
6067
6110
  is_backgrounded?: boolean;
6111
+
6068
6112
  /**
6069
6113
  * Nesting depth of a spawned subagent (local_agent) task: 1 for a top-level spawn, N+1 when spawned from inside a depth-N agent. Not set on other tasks.
6070
6114
  */
6071
6115
  spawn_depth?: number;
6116
+ /**
6117
+ * task_id of the subagent (local_agent) task whose agent launched this subagent, shell, monitor or workflow task. Absent when the launcher is the main thread, has no task_id of its own (a teammate, an agent inside a workflow), or is no longer tracked. A resumed subagent keeps its original parent. The parent may be a foreground or already-ended task, so treat an unknown id as no parent.
6118
+ */
6119
+ parent_task_id?: string;
6072
6120
  task_type?: string;
6073
6121
  /**
6074
6122
  * meta.name from the workflow script (e.g. 'spec'). Only set when task_type is 'local_workflow'.
@@ -6091,6 +6139,10 @@ export declare type SDKTaskUpdatedMessage = {
6091
6139
  type: 'system';
6092
6140
  subtype: 'task_updated';
6093
6141
  task_id: string;
6142
+ /**
6143
+ * Id of one run of the task: equal on every task_* event, background_tasks_changed entry and saved notification (its origin.runId) of that run. A resumed task keeps its task_id and gets a new one. The run ids of one task sort, by plain string comparison, in the order the runs opened; a frame that names a run sorting before the one a reader shows is late. Nothing else about the format is promised. Absent for a task this process did not register, and from CLIs that predate it.
6144
+ */
6145
+ run_id?: string;
6094
6146
  /**
6095
6147
  * Wire-safe subset of TaskState fields that changed. Excludes abortController, messages, result. Clients merge into their local task map.
6096
6148
  */
@@ -6306,6 +6358,10 @@ export declare type SDKUserMessage = {
6306
6358
  */
6307
6359
  inline_pastes?: string[];
6308
6360
  session_id?: string;
6361
+ /**
6362
+ * ID of the subagent that produced this message: the `task_id` of its task events, unchanged when the subagent is resumed. Absent on main-thread messages.
6363
+ */
6364
+ agent_id?: string;
6309
6365
  /**
6310
6366
  * Subagent type that produced this message.
6311
6367
  */
@@ -6742,7 +6798,7 @@ export declare interface Settings {
6742
6798
  */
6743
6799
  desktopSessionCleanupPeriodDays?: number;
6744
6800
  /**
6745
- * Set to false to turn off syncing of the skills you have enabled on claude.ai. In your user settings (or managed settings): nothing more is downloaded, previously synced skills (~/.claude/skills/synced) can no longer be run, are hidden from every session started afterwards, and are moved to ~/.claude/skills/.trash at the next launch (deleted after cleanupPeriodDays; re-downloaded, not restored, if you re-enable). In .claude/settings.local.json or --settings: downloads stop and synced skills are blocked and hidden for sessions in that workspace or invocation only (nothing is moved). Not read from project settings (.claude/settings.json). Only false is honored — the feature is enabled server-side for your account, so setting true does not turn it on early. While it is on, synced skills are available in every session, re-synced every 10 minutes, and removed when you disable them on claude.ai. Only applies when signed in with your Claude account.
6801
+ * Set to false to turn off syncing of the skills you have enabled on claude.ai. In your user settings (or managed settings): nothing more is downloaded, previously synced skills (~/.claude/skills/synced) can no longer be run, are hidden from every session started afterwards, and are moved to ~/.claude/skills/.trash at the next launch (deleted after cleanupPeriodDays; re-downloaded, not restored, if you re-enable). In .claude/settings.local.json or --settings: downloads stop and synced skills are blocked and hidden for sessions in that workspace or invocation only (nothing is moved). Not read from project settings (.claude/settings.json). Only false is honored — the feature is enabled server-side for your account, so setting true does not turn it on early. While it is on, synced skills are available in every session, re-synced about every 10 minutes while a session is in use and a quarter as often otherwise, and removed when you disable them on claude.ai. Only applies when signed in with your Claude account.
6746
6802
  */
6747
6803
  syncClaudeAiSkills?: boolean;
6748
6804
  /**
@@ -9816,7 +9872,7 @@ export declare interface Transport {
9816
9872
  /**
9817
9873
  * Messages meaning "a usage limit was genuinely reached" — the error-path
9818
9874
  * outputs of getLimitReachedText (rateLimitMessages.ts) and
9819
- * getFableCreditsRequiredContent (api/errors.ts).
9875
+ * getUsageCreditsOnlyModelRejectionContent (api/errors.ts).
9820
9876
  *
9821
9877
  * @alpha
9822
9878
  */