@anthropic-ai/claude-agent-sdk 0.3.205 → 0.3.207

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.
@@ -1,4 +1,4 @@
1
- /* eslint-disable custom-rules/no-sync-fs */
1
+ /* oxlint-disable custom-rules/no-sync-fs */
2
2
  // Extracts a file from Bun's $bunfs virtual filesystem to a real temp directory
3
3
  // so it can be spawned as a subprocess (child processes cannot access $bunfs).
4
4
  //
@@ -28,7 +28,7 @@ function tmpdir() {
28
28
  return process.env.CLAUDE_CODE_TMPDIR
29
29
  }
30
30
  if (process.platform === 'darwin') {
31
- // eslint-disable-next-line custom-rules/no-hardcoded-tmp -- mirrors tempfile.ts: macOS /tmp works fine; os.tmpdir() below is for Android-on-Linux where /tmp isn't writable.
31
+ // oxlint-disable-next-line custom-rules/no-hardcoded-tmp -- mirrors tempfile.ts: macOS /tmp works fine; os.tmpdir() below is for Android-on-Linux where /tmp isn't writable.
32
32
  return '/tmp'
33
33
  }
34
34
  return osTmpdir()
package/manifest.json CHANGED
@@ -1,47 +1,68 @@
1
1
  {
2
- "version": "2.1.205",
3
- "commit": "4cf2699a14277d4a8edf7e74442381071fc0cfd2",
4
- "buildDate": "2026-07-08T17:46:21Z",
2
+ "version": "2.1.207",
3
+ "commit": "bc512d56332530b2be3f5079e29ec17aa20b8553",
4
+ "buildDate": "2026-07-10T21:39:38Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude",
8
- "checksum": "33e28624c5ae84f2bd7d2d8761e5d2e77997ba965cb11b6448de6b6e2c566f9c",
9
- "size": 237437968
8
+ "checksum": "1397a062c6889675055e3314dd956376ac51262a7734ad9e819c26975d71547a",
9
+ "size": 241237136
10
10
  },
11
11
  "darwin-x64": {
12
12
  "binary": "claude",
13
- "checksum": "4299a3f48551ef365f2d056f24d87e84b822c4c10b6acc46979446b7b5c60ceb",
14
- "size": 246862928
13
+ "checksum": "8a4355d251a60c90d8cf08f32fdb22a8157dd3d085542f95d0da0475f9a2c57c",
14
+ "size": 249273680
15
15
  },
16
16
  "linux-arm64": {
17
17
  "binary": "claude",
18
- "checksum": "c1874c85bcd3a88b70439fd50ff5910b7e6ac5371c14dd49d4ccc2878a592d09",
19
- "size": 253803248
18
+ "checksum": "8bc14a284065383460f37981d724b8f7aa7ca93c9849d2fe367e08f03383f454",
19
+ "size": 256228080
20
20
  },
21
21
  "linux-x64": {
22
22
  "binary": "claude",
23
- "checksum": "dd8734c0b6a503fe1d17425184e57b397c30bb0337a33f1470d9985febfe5b09",
24
- "size": 257006392
23
+ "checksum": "85e7e988a392d859f90802ca21fb26e89d3c9ab527f5ed0b08df3955e34d5c83",
24
+ "size": 259402552
25
25
  },
26
26
  "linux-arm64-musl": {
27
27
  "binary": "claude",
28
- "checksum": "a8cd2a626d7d0b5fb3516164a4cf3b4acbbadb053a5b1b2a2462ccbd2ebf6bde",
29
- "size": 247051448
28
+ "checksum": "ec3b657344dcf6693f434fe11ffe4592381d31d4e6a7976649c1a610770dcc74",
29
+ "size": 249476280
30
30
  },
31
31
  "linux-x64-musl": {
32
32
  "binary": "claude",
33
- "checksum": "20018df16e75f4287c3bfb088e04019452cf262f66ee43041e285113c4e479d8",
34
- "size": 251695488
33
+ "checksum": "09a43ff41e33cbb0c4903a4939353933ee8f0d1964abab4b837004a951edb9ee",
34
+ "size": 254091648
35
35
  },
36
36
  "win32-x64": {
37
37
  "binary": "claude.exe",
38
- "checksum": "f09120889098672074e7c5166d5474da0c5482f2bec898b3510cacd9c1fefa42",
39
- "size": 247162528
38
+ "checksum": "781fdc2c89868b1cb05cc22c253ef142a0b44e7cc36236aecd6335745c7d42d0",
39
+ "size": 249485472
40
40
  },
41
41
  "win32-arm64": {
42
42
  "binary": "claude.exe",
43
- "checksum": "9a86e5acbc584ab7c1b684f1cc1bf5c7bddd6afd4817c0d2c2113d15bfbff0a9",
44
- "size": 241629344
43
+ "checksum": "fa0c887a3f944ba1915766b525538b82b029ca8078ed6ee180c3b83c1b862521",
44
+ "size": 243952800
45
45
  }
46
+ },
47
+ "sdkCompat": {
48
+ "testedWrapperVersions": [
49
+ "0.3.181",
50
+ "0.3.182",
51
+ "0.3.183",
52
+ "0.3.185",
53
+ "0.3.186",
54
+ "0.3.187",
55
+ "0.3.190",
56
+ "0.3.191",
57
+ "0.3.195",
58
+ "0.3.196",
59
+ "0.3.197",
60
+ "0.3.198",
61
+ "0.3.201",
62
+ "0.3.202",
63
+ "0.3.204",
64
+ "0.3.205"
65
+ ],
66
+ "harnessSchema": 1
46
67
  }
47
68
  }
package/manifest.zst.json CHANGED
@@ -1,55 +1,76 @@
1
1
  {
2
- "version": "2.1.205",
3
- "commit": "4cf2699a14277d4a8edf7e74442381071fc0cfd2",
4
- "buildDate": "2026-07-08T17:48:20Z",
2
+ "version": "2.1.207",
3
+ "commit": "bc512d56332530b2be3f5079e29ec17aa20b8553",
4
+ "buildDate": "2026-07-10T21:41:27Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude.zst",
8
- "checksum": "b1713d2279428d0c10acfa1731393ffa5cf30f3c5955ef172a6b13ae5af49023",
9
- "size": 48757644,
8
+ "checksum": "1a8f29a408042f9695f2f757ac55ea22c92607940d1ff7739b22b738dce221e2",
9
+ "size": 50610712,
10
10
  "bundle": {
11
- "checksum": "14cf66d61f52fc0b1674912a62f823538b2692059f8eeecb579c054d7e813a21",
12
- "size": 48749372
11
+ "checksum": "03debae4f03c3b2163f755a633b11708a69098bda768f6a241e99103821ab713",
12
+ "size": 50594718
13
13
  }
14
14
  },
15
15
  "darwin-x64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "22c4e2db930e973ef11572b9972a1b6d58a7b49835c2e2107eca88b7b3746d38",
18
- "size": 53154391,
17
+ "checksum": "b5e3cd3bb3a541a8e7eadf87a76b267804b9753326b8ffbae2b667afe85297fb",
18
+ "size": 53624005,
19
19
  "bundle": {
20
- "checksum": "3f3a79ecf0da7a80e27fd58cd742c65daa5236e45c28e34127616409ba8410a5",
21
- "size": 53153125
20
+ "checksum": "d272255ec783b43f8644d34d590d75c1904a55dfacf6c2f67342576871da5509",
21
+ "size": 53637501
22
22
  }
23
23
  },
24
24
  "linux-arm64": {
25
25
  "binary": "claude.zst",
26
- "checksum": "3e746e549d2c1f5e7ee68d84c5adecf6a54cba672ccce09ab982b839890673de",
27
- "size": 57833829
26
+ "checksum": "72b19a4cf11ee241a8187dd099bf662e1eebf7093996c61ef572f877882ca285",
27
+ "size": 58294671
28
28
  },
29
29
  "linux-x64": {
30
30
  "binary": "claude.zst",
31
- "checksum": "b7f51e61f52b316499bfd3b60d8eb188bea835cd6d226c68ea63c9e78d94bbf8",
32
- "size": 59080834
31
+ "checksum": "df17174ee43c41372332b5fa8cbc7787aa9a0e7eb0d1e2f83ef9cbba635027c8",
32
+ "size": 59550032
33
33
  },
34
34
  "linux-arm64-musl": {
35
35
  "binary": "claude.zst",
36
- "checksum": "fcda3caf5d92259a27b7561ba8a0d98e3892d9738078508b94da13ed80ebaa17",
37
- "size": 56501960
36
+ "checksum": "9012a37af351dd99f8f57555efd127d385037fa9d1e02f17dc8690e13f9f0d19",
37
+ "size": 56979756
38
38
  },
39
39
  "linux-x64-musl": {
40
40
  "binary": "claude.zst",
41
- "checksum": "6d5c482230c17f87dfca84b1792cbbe0be16e67cfd0bb059f32fab70652ce8f2",
42
- "size": 57890693
41
+ "checksum": "1fcedd418e777e178d682c64bb5ffa7d529b1e1fe71205f05cdf2064b94a6506",
42
+ "size": 58355365
43
43
  },
44
44
  "win32-x64": {
45
45
  "binary": "claude.exe.zst",
46
- "checksum": "1b3fef8dd08568bd68f352111c879fcad444f16c527b242633066819855744d3",
47
- "size": 59229824
46
+ "checksum": "26bfafd689f32a3422ea61ca602b5fdbd859ac5a3fdbee1ee6d2e5ec2a78883d",
47
+ "size": 59678481
48
48
  },
49
49
  "win32-arm64": {
50
50
  "binary": "claude.exe.zst",
51
- "checksum": "3210095a295804291820f2901293ce0a5cf51fcdf272c4b13054c8579c4aca28",
52
- "size": 57260419
51
+ "checksum": "feab03d833eb383445471007c2ece19d0ea12f0704f9c86252356d8f0b254b0c",
52
+ "size": 57703648
53
53
  }
54
+ },
55
+ "sdkCompat": {
56
+ "testedWrapperVersions": [
57
+ "0.3.181",
58
+ "0.3.182",
59
+ "0.3.183",
60
+ "0.3.185",
61
+ "0.3.186",
62
+ "0.3.187",
63
+ "0.3.190",
64
+ "0.3.191",
65
+ "0.3.195",
66
+ "0.3.196",
67
+ "0.3.197",
68
+ "0.3.198",
69
+ "0.3.201",
70
+ "0.3.202",
71
+ "0.3.204",
72
+ "0.3.205"
73
+ ],
74
+ "harnessSchema": 1
54
75
  }
55
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-agent-sdk",
3
- "version": "0.3.205",
3
+ "version": "0.3.207",
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.205",
61
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.205",
62
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.205",
63
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.205",
64
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.205",
65
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.205",
66
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.205",
67
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.205"
60
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.207",
61
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.207",
62
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.207",
63
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.207",
64
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.207",
65
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.207",
66
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.207",
67
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.207"
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.205"
83
+ "claudeCodeVersion": "2.1.207"
84
84
  }
package/sdk-tools.d.ts CHANGED
@@ -97,6 +97,7 @@ export type AgentOutput =
97
97
  content: {
98
98
  type: "text";
99
99
  text: string;
100
+ citations?: unknown[] | null;
100
101
  }[];
101
102
  resolvedModel?: string;
102
103
  totalToolUseCount: number;
@@ -111,11 +112,14 @@ export type AgentOutput =
111
112
  web_search_requests: number;
112
113
  web_fetch_requests: number;
113
114
  } | null;
114
- service_tier: ("standard" | "priority" | "batch") | null;
115
+ service_tier: string | null;
115
116
  cache_creation: {
116
117
  ephemeral_1h_input_tokens: number;
117
118
  ephemeral_5m_input_tokens: number;
118
119
  } | null;
120
+ inference_geo?: string | null;
121
+ speed?: string | null;
122
+ iterations?: unknown;
119
123
  };
120
124
  toolStats?: {
121
125
  readCount: number;
@@ -125,12 +129,16 @@ export type AgentOutput =
125
129
  linesAdded: number;
126
130
  linesRemoved: number;
127
131
  otherToolCount: number;
132
+ frameCount?: number;
128
133
  };
129
134
  status: "completed";
130
135
  prompt: string;
136
+ worktreePath?: string;
137
+ worktreeBranch?: string;
131
138
  }
132
139
  | {
133
140
  status: "async_launched";
141
+ isAsync?: true;
134
142
  /**
135
143
  * The ID of the async agent
136
144
  */
@@ -3102,7 +3110,7 @@ export interface WebFetchOutput {
3102
3110
  url: string;
3103
3111
  artifactRead?: {
3104
3112
  slug: string;
3105
- ver: string;
3113
+ ver?: string;
3106
3114
  };
3107
3115
  }
3108
3116
  export interface WebSearchOutput {
@@ -3407,6 +3415,10 @@ export interface ScheduleWakeupOutput {
3407
3415
  * True when the model ended the loop via `stop: true`
3408
3416
  */
3409
3417
  stopped?: boolean;
3418
+ /**
3419
+ * How many pending dynamic-loop wakeups stop:true cancelled. 0 means nothing was pending — a recurring /loop cron is not cancelled by stop:true.
3420
+ */
3421
+ cancelledWakeups?: number;
3410
3422
  }
3411
3423
  export interface MonitorOutput {
3412
3424
  /**
package/sdk.d.ts CHANGED
@@ -3413,15 +3413,53 @@ declare type SDKControlListModelsRequest = {
3413
3413
  };
3414
3414
 
3415
3415
  /**
3416
- * Invokes an MCP tool via the subprocess MCP client without a model turn. No permission check (control channel is trusted, same as other subtypes). SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call.
3416
+ * Invokes an MCP tool via the subprocess MCP client without a model turn. No permission check (control channel is trusted, same as other subtypes). SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call. STAGED calls (input_files/output_files declared) additionally stage lane rows in/out around the call — see the input_files describe. Staged failures come back as a success-subtype response whose staging field carries a typed error_code; subtype:error is emitted only when the call could not be attempted at all (server not connected, kill switch, dispatch failure) and means nothing ran. Standard RPC semantics: a redelivered request_id supersedes the in-flight run (it is aborted and its response suppressed — exactly one response per request_id); conversion is idempotent, so re-running is safe. Cancellable via control_cancel_request.
3417
3417
  */
3418
3418
  declare type SDKControlMcpCallRequest = {
3419
3419
  subtype: 'mcp_call';
3420
3420
  /**
3421
- * Fully-qualified MCP tool name, e.g. mcp__server__tool_name.
3421
+ * Fully-qualified MCP tool name, e.g. mcp__server__tool_name. Plugin-hosted servers are ordinary MCP servers here — e.g. mcp__plugin_documents_docs__doc_export (server names are normalized: non-[a-zA-Z0-9_-] becomes _).
3422
3422
  */
3423
3423
  tool: string;
3424
+ /**
3425
+ * Tool arguments. When input_files/output_files are declared, any string VALUE that exactly equals "{{in:NAME}}" or "{{out:NAME}}" (whole string, not a substring) is replaced with the worker-chosen absolute path of that named staged file before the call; a token naming no declared file fails the request with staging error_code=tool_error, and every declared output's "{{out:NAME}}" token must appear in arguments (the substituted path is the only way the tool learns where to write, so an unreferenced output fails the request before the tool runs). With no files declared — including expires_at/timeout_ms-only staged calls — passed through unchanged.
3426
+ */
3424
3427
  arguments?: Record<string, unknown>;
3428
+ /**
3429
+ * RFC3339 deadline, REQUIRED when output_files are declared (a stale buffered drain must not overwrite rows written since). Sending expires_at routes the call through the staging engine, same as timeout_ms — the response gains a staging result. UNDELIVERED requests buffer durably and drain after reattach; a drain past this instant is dropped with staging error_code=expired instead of executing stale. Once delivered to a live worker the request is acked immediately and never redelivered — a worker killed mid-run surfaces as a missing response (apply your own deadline), not a later drain. An unparseable value is treated as already expired (fail closed).
3430
+ */
3431
+ expires_at?: string;
3432
+ /**
3433
+ * Tool-execution timeout (staging and collection have their own transport timeouts). Clamped to [1000, 600000]; default 120000. Sending timeout_ms routes the call through the staging engine — so it is always enforced when present and the response carries a staging result; omit it for a plain call. Staged calls are POSIX-worker-only: on a Windows worker any staged-field call fails with a typed staging refusal.
3434
+ */
3435
+ timeout_ms?: number;
3436
+ /**
3437
+ * Declaring input_files or output_files makes this a STAGED call: rows are fetched from the synced-file lane into a private per-request temp dir the WORKER chooses (random, per-UID — the caller never sees or computes paths; it references files via tokens in arguments), the tool runs, and declared outputs are written back as lane rows (durable-at-ack PUT). The response then carries a `staging` result the caller switches on.
3438
+ */
3439
+ input_files?: {
3440
+ /**
3441
+ * Handle referenced from arguments as "{{in:NAME}}". Unique within the request.
3442
+ */
3443
+ name: string;
3444
+ /**
3445
+ * Synced-file lane row to stage, e.g. /working/.cowork/originals/a.docx. A missing row fails with staging error_code=input_missing; the etag actually staged is echoed back in staging.inputs_used.
3446
+ */
3447
+ lane_path: string;
3448
+ }[];
3449
+ output_files?: {
3450
+ /**
3451
+ * Handle referenced from arguments as "{{out:NAME}}" — the tool is told (via the substituted path) where to write; the worker collects from exactly that path. Unique within the request.
3452
+ */
3453
+ name: string;
3454
+ /**
3455
+ * Synced-file lane row to write, e.g. /working/report.cd. Unique within the request (two outputs on one row would self-conflict under CAS). Outputs over the 25 MiB lane cap fail with staging error_code=output_too_large.
3456
+ */
3457
+ lane_path: string;
3458
+ /**
3459
+ * Opaque lane etag the output row must still carry for the write to land (CAS). Omitted = unconditional last-writer-wins (an empty string is rejected, not treated as unconditional). A row that moved since fails that output with staging error_code=output_conflict and the requested bytes are not written. Redelivery of a completed CAS write re-runs and conflicts with its own prior write — treat output_conflict on a retry as possible-prior-success and reconcile by etag.
3460
+ */
3461
+ if_match?: string;
3462
+ }[];
3425
3463
  };
3426
3464
 
3427
3465
  /**
@@ -3956,7 +3994,7 @@ export declare type SDKModelRefusalFallbackMessage = {
3956
3994
  };
3957
3995
 
3958
3996
  /**
3959
- * Emitted when the model ends the stream with stop_reason "refusal" and no fallback model is configured, so the turn ends as an error. The structured counterpart to detecting stop_reason "refusal" on the assistant error frame. Not emitted when a fallback existed but was declined or gate-failed (model_refusal_fallback covers the retry case). Absent from older CLIs.
3997
+ * Emitted when the model ends the stream with stop_reason "refusal" and no retry runs: no fallback model is configured, or per-category routing declined the retry (the refusal category has no fallback map entry). The structured counterpart to detecting stop_reason "refusal" on the assistant error frame. Not emitted when the retry ran or the user declined the retry dialog (model_refusal_fallback covers the retry case). Absent from older CLIs.
3960
3998
  */
3961
3999
  export declare type SDKModelRefusalNoFallbackMessage = {
3962
4000
  type: 'system';
@@ -4403,6 +4441,9 @@ export declare type SDKUserMessage = {
4403
4441
  message: MessageParam;
4404
4442
  parent_tool_use_id: string | null;
4405
4443
  isSynthetic?: boolean;
4444
+ /**
4445
+ * Structured tool output — the tool's full Output object, not the string content sent to the model. The shape is per-tool, keyed by the matching tool_use block's name (see the *Output types in toolTypes); MCP and dynamic tools carry their own shapes, so the field stays unknown-typed. For the Agent/Task tool the completed shape is AgentToolCompletedOutput: the subagent's final report without the model-directed agentId/usage trailer, plus run totals — render from it instead of parsing the tool_result text.
4446
+ */
4406
4447
  tool_use_result?: unknown;
4407
4448
  priority?: 'now' | 'next' | 'later';
4408
4449
  origin?: SDKMessageOrigin;
@@ -4445,6 +4486,9 @@ export declare type SDKUserMessageReplay = {
4445
4486
  message: MessageParam;
4446
4487
  parent_tool_use_id: string | null;
4447
4488
  isSynthetic?: boolean;
4489
+ /**
4490
+ * Structured tool output — the tool's full Output object, not the string content sent to the model. The shape is per-tool, keyed by the matching tool_use block's name (see the *Output types in toolTypes); MCP and dynamic tools carry their own shapes, so the field stays unknown-typed. For the Agent/Task tool the completed shape is AgentToolCompletedOutput: the subagent's final report without the model-directed agentId/usage trailer, plus run totals — render from it instead of parsing the tool_result text.
4491
+ */
4448
4492
  tool_use_result?: unknown;
4449
4493
  priority?: 'now' | 'next' | 'later';
4450
4494
  origin?: SDKMessageOrigin;
@@ -6665,9 +6709,9 @@ export declare type TeammateIdleHookInput = BaseHookInput & {
6665
6709
  };
6666
6710
 
6667
6711
  /**
6668
- * Why the query loop terminated. Unset when the loop was bypassed (local slash command) or interrupted externally (budget/retry limits checked between yields).
6712
+ * Why the query loop terminated. Unset when the loop was bypassed (local slash command).
6669
6713
  */
6670
- export declare type TerminalReason = 'blocking_limit' | 'rapid_refill_breaker' | 'prompt_too_long' | 'image_error' | 'model_error' | 'aborted_streaming' | 'aborted_tools' | 'stop_hook_prevented' | 'hook_stopped' | 'tool_deferred' | 'max_turns' | 'background_requested' | 'completed';
6714
+ export declare type TerminalReason = 'blocking_limit' | 'rapid_refill_breaker' | 'prompt_too_long' | 'image_error' | 'model_error' | 'api_error' | 'malformed_tool_use_exhausted' | 'aborted_streaming' | 'aborted_tools' | 'stop_hook_prevented' | 'hook_stopped' | 'tool_deferred' | 'max_turns' | 'background_requested' | 'completed' | 'budget_exhausted' | 'structured_output_retry_exhausted' | 'tool_deferred_unavailable' | 'turn_setup_failed';
6671
6715
 
6672
6716
  /**
6673
6717
  * Claude decides when and how much to think (Opus 4.6+).