@anthropic-ai/claude-agent-sdk 0.2.141 → 0.3.143

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.141",
3
- "commit": "4f4623ddd339e1c1b87d659b7c9eb3b66397e7a3",
4
- "buildDate": "2026-05-13T21:34:55Z",
2
+ "version": "2.1.143",
3
+ "commit": "cfb8132e4c3551e2773f41a1900efd1cc93637db",
4
+ "buildDate": "2026-05-15T17:47:13Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude",
8
- "checksum": "31ac95bb19a33b1d0cddd3f3ff594bf8bfd2be5051cd2af7867109641cab705e",
9
- "size": 207076896
8
+ "checksum": "2701c6cfd68483f8faf0316a1ba6481a1455a90645ada179f0c48d8c36d722ef",
9
+ "size": 207605280
10
10
  },
11
11
  "darwin-x64": {
12
12
  "binary": "claude",
13
- "checksum": "fa9000fdf4a522fcaf30ea283555aca2ba5d0e76cdb8842154b7735b558c7c25",
14
- "size": 209591056
13
+ "checksum": "bc8ff4ce02b765a033808fb596f9522306cbe5c50d21344ed8752c08966f362c",
14
+ "size": 210119440
15
15
  },
16
16
  "linux-arm64": {
17
17
  "binary": "claude",
18
- "checksum": "dc931e24f62afbadc8dc68115278b08493825a3ed1ea753d587077181a6cc63b",
19
- "size": 232437384
18
+ "checksum": "32e8edc4a5c3c41d18607c75d1b8e7bec643330c03e266be46ac3b41a446c4eb",
19
+ "size": 232961672
20
20
  },
21
21
  "linux-x64": {
22
22
  "binary": "claude",
23
- "checksum": "832be26e8f15b2ae99e520a22b034fc4bfad1cb5b84de6b706487072c56bb42e",
24
- "size": 232572624
23
+ "checksum": "f75fdc3ff9d9cd494b86192f9e349b5c5c6d3970ed4d5cd5c7b330c5a2b1dcc4",
24
+ "size": 233088720
25
25
  },
26
26
  "linux-arm64-musl": {
27
27
  "binary": "claude",
28
- "checksum": "e6e6a481c0aab084198b3529c6d96774e14d18da999aba7d22e207952ed8faf0",
29
- "size": 225292120
28
+ "checksum": "e68903ec56ddd5560bb0820c96c8f7a4193e7eab6236ede56cb2e05f450ce44f",
29
+ "size": 225816408
30
30
  },
31
31
  "linux-x64-musl": {
32
32
  "binary": "claude",
33
- "checksum": "8af1f6e19d3786cac74dcf369ff58f79df08be429813b29ae076247cc8d1ddae",
34
- "size": 226966576
33
+ "checksum": "e4cb8588ed6e38f9920bdaa2611263d4a0b0d11300f1d23945df234fdf5e278a",
34
+ "size": 227482672
35
35
  },
36
36
  "win32-x64": {
37
37
  "binary": "claude.exe",
38
- "checksum": "3ab326c39d195dbe394c173f31126d880a80270f98ade74ef555429e2dadb19f",
39
- "size": 228410016
38
+ "checksum": "e480244f2a4660fe76ed32442c1e3e2edda8fb5433417e73faba39f0e7f69eb6",
39
+ "size": 228902560
40
40
  },
41
41
  "win32-arm64": {
42
42
  "binary": "claude.exe",
43
- "checksum": "f622af48157bce7a24905fa6121191f5a472800ed9f77fa41c59bd5ecd161285",
44
- "size": 224374432
43
+ "checksum": "5cbad78d2f316fedd0d621289aae558aaf259b404d0a46e0e49662ef3b397986",
44
+ "size": 224866976
45
45
  }
46
46
  }
47
47
  }
package/manifest.zst.json CHANGED
@@ -1,55 +1,55 @@
1
1
  {
2
- "version": "2.1.141",
3
- "commit": "4f4623ddd339e1c1b87d659b7c9eb3b66397e7a3",
4
- "buildDate": "2026-05-13T21:41:28Z",
2
+ "version": "2.1.143",
3
+ "commit": "cfb8132e4c3551e2773f41a1900efd1cc93637db",
4
+ "buildDate": "2026-05-15T17:54:02Z",
5
5
  "platforms": {
6
6
  "darwin-arm64": {
7
7
  "binary": "claude.zst",
8
- "checksum": "ded188fd6b63c8e03d95500760a7414ba6906876c626476b3c1aaf8e7d87f8a0",
9
- "size": 42914116,
8
+ "checksum": "de2803764796c6b908c203b330c4aa152be67291b85afb11777a9705b9f3133a",
9
+ "size": 42998050,
10
10
  "bundle": {
11
- "checksum": "27c366c8a650d90a4a48b624fd89d6a2daee2c2f53a2a1ad11a26eb603557855",
12
- "size": 42918185
11
+ "checksum": "ed3695422acd6338ab038aa0964b00c98d6e2cd0b17bb5b482d5f66082294038",
12
+ "size": 43008215
13
13
  }
14
14
  },
15
15
  "darwin-x64": {
16
16
  "binary": "claude.zst",
17
- "checksum": "5bce9e6dbd397709c12d4ba19424dae4e185dc8b70179cf9f1bef07317d42d3f",
18
- "size": 44816821,
17
+ "checksum": "e0c65fc323f611df3d5093f8f21494a6f811f39de7f28bf93b552902f1fe9abf",
18
+ "size": 44914712,
19
19
  "bundle": {
20
- "checksum": "1b3be19bdea17a3b20fb214549ca10c064b9269d653d3a5e66aab615c7b078e7",
21
- "size": 44837419
20
+ "checksum": "f89d54e92a526eab1c1441ad716941c8c20462809d692ae5a03d29fc475913e6",
21
+ "size": 44916790
22
22
  }
23
23
  },
24
24
  "linux-arm64": {
25
25
  "binary": "claude.zst",
26
- "checksum": "7327ee9b0488231f4a7ecfbc0110337877af508b25078e0f7a1561ec72c0f9b1",
27
- "size": 50723547
26
+ "checksum": "81e45b0efc7cf75298912cbcf953d366f1937c7573fbc3457508cb9022c21bb1",
27
+ "size": 50768400
28
28
  },
29
29
  "linux-x64": {
30
30
  "binary": "claude.zst",
31
- "checksum": "b8be41003357a75527ceffe3f75b936427c5cd5ffb8d6847a29b6f165ba3ca1a",
32
- "size": 51286205
31
+ "checksum": "6cbd2d23d9b6f8e06f8a1614f5212d13ae3b1c748b6b59df90157575b3e4f8a1",
32
+ "size": 51405057
33
33
  },
34
34
  "linux-arm64-musl": {
35
35
  "binary": "claude.zst",
36
- "checksum": "899a1f33abb7bea21129aa379bd757956d38bde484bdbba5f0a7efb4e8d0270d",
37
- "size": 49328098
36
+ "checksum": "53b68f1d98c2e24c100f5fc7e873cad7f0470af69c751cd5917460402277fb2f",
37
+ "size": 49422676
38
38
  },
39
39
  "linux-x64-musl": {
40
40
  "binary": "claude.zst",
41
- "checksum": "1fd02e4d619c5266b99c7f97cbad4fb6838f73a4cd717dd173b9ede93d70adcd",
42
- "size": 50009722
41
+ "checksum": "fe24a7fa385ade60594375ec9fada75060bf028d6562b84461f4dd1b13abc521",
42
+ "size": 50119926
43
43
  },
44
44
  "win32-x64": {
45
45
  "binary": "claude.exe.zst",
46
- "checksum": "607ec8680c87ea6251f2785fa574d798851ef7470313eefd45b6b0f877d67d4c",
47
- "size": 52034683
46
+ "checksum": "f1070448e53ffdd83f65b2773bffa2e1136d462e2f3be72cff0f4effd0611ac4",
47
+ "size": 52123091
48
48
  },
49
49
  "win32-arm64": {
50
50
  "binary": "claude.exe.zst",
51
- "checksum": "c970ff7b932bee058f530a10e4dc0a0b8fff53acc49b64bb5b67b03432d299ee",
52
- "size": 50306178
51
+ "checksum": "967b9e021cdc470d10478e5ff8cfe93624337a7475478658954f275489d28adb",
52
+ "size": 50393488
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.141",
3
+ "version": "0.3.143",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "exports": {
@@ -47,22 +47,20 @@
47
47
  "automation",
48
48
  "code-generation"
49
49
  ],
50
- "dependencies": {
51
- "@anthropic-ai/sdk": "^0.93.0",
52
- "@modelcontextprotocol/sdk": "^1.29.0"
53
- },
54
50
  "peerDependencies": {
51
+ "@anthropic-ai/sdk": ">=0.93.0",
52
+ "@modelcontextprotocol/sdk": "^1.29.0",
55
53
  "zod": "^4.0.0"
56
54
  },
57
55
  "optionalDependencies": {
58
- "@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.141",
59
- "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.141",
60
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.141",
61
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.141",
62
- "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.141",
63
- "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.141",
64
- "@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.141",
65
- "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.141"
56
+ "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.143",
57
+ "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.143",
58
+ "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.143",
59
+ "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.143",
60
+ "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.143",
61
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.143",
62
+ "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.143",
63
+ "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.143"
66
64
  },
67
65
  "files": [
68
66
  "sdk.mjs",
@@ -78,5 +76,5 @@
78
76
  "manifest.json",
79
77
  "manifest.zst.json"
80
78
  ],
81
- "claudeCodeVersion": "2.1.141"
79
+ "claudeCodeVersion": "2.1.143"
82
80
  }
package/sdk.d.ts CHANGED
@@ -635,7 +635,7 @@ export declare type ForkSessionOptions = SessionMutationOptions & {
635
635
  * Result of a fork operation.
636
636
  */
637
637
  export declare type ForkSessionResult = {
638
- /** New session UUID. Resumable via `resumeSession(sessionId)`. */
638
+ /** New session UUID. Resumable via `query({ options: { resume: sessionId } })`. */
639
639
  sessionId: string;
640
640
  };
641
641
 
@@ -954,9 +954,10 @@ export declare type McpHttpServerConfig = {
954
954
  headers?: Record<string, string>;
955
955
  tools?: McpServerToolPolicy[];
956
956
  /**
957
- * 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. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even when MCP_CONNECTION_NONBLOCKING=1, since the tools must be present when the turn-1 prompt is built.
957
+ * 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. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
958
958
  */
959
959
  alwaysLoad?: boolean;
960
+
960
961
  };
961
962
 
962
963
  export declare type McpSdkServerConfig = {
@@ -1059,9 +1060,10 @@ export declare type McpSSEServerConfig = {
1059
1060
  headers?: Record<string, string>;
1060
1061
  tools?: McpServerToolPolicy[];
1061
1062
  /**
1062
- * 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. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even when MCP_CONNECTION_NONBLOCKING=1, since the tools must be present when the turn-1 prompt is built.
1063
+ * 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. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1063
1064
  */
1064
1065
  alwaysLoad?: boolean;
1066
+
1065
1067
  };
1066
1068
 
1067
1069
  export declare type McpStdioServerConfig = {
@@ -1070,9 +1072,10 @@ export declare type McpStdioServerConfig = {
1070
1072
  args?: string[];
1071
1073
  env?: Record<string, string>;
1072
1074
  /**
1073
- * 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. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even when MCP_CONNECTION_NONBLOCKING=1, since the tools must be present when the turn-1 prompt is built.
1075
+ * 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. As a side effect this also blocks startup until the server is connected (capped at the standard 5s connect timeout) even though MCP startup is otherwise non-blocking by default, since the tools must be present when the turn-1 prompt is built.
1074
1076
  */
1075
1077
  alwaysLoad?: boolean;
1078
+
1076
1079
  };
1077
1080
 
1078
1081
  /**
@@ -1226,6 +1229,32 @@ export declare type Options = {
1226
1229
  * otherwise be allowed.
1227
1230
  */
1228
1231
  disallowedTools?: string[];
1232
+ /**
1233
+ * Map of tool-name aliases applied before name resolution. When the
1234
+ * model emits a `tool_use` whose name is a key in this map, the tool
1235
+ * execution path resolves the mapped name instead.
1236
+ *
1237
+ * This lets SDK consumers redirect built-in tool names to their own
1238
+ * tools. For example, a host that runs Bash inside a remote sandbox via
1239
+ * an MCP tool can set `{ Bash: 'mcp__workspace__bash' }` so that if the
1240
+ * model emits `Bash` (e.g. because a skill document instructed it to),
1241
+ * the call is routed to the MCP tool instead of failing as unknown.
1242
+ *
1243
+ * The redirect is single-hop: an alias that points at another aliased
1244
+ * name resolves that target literally rather than following a chain, so
1245
+ * cycles like `{A: 'B', B: 'A'}` cannot loop.
1246
+ *
1247
+ * `toolAliases` is complementary to `disallowedTools`, not a replacement
1248
+ * for it: the alias only affects name-based lookup of model-emitted
1249
+ * `tool_use` blocks, whereas `disallowedTools` also blocks harness-internal
1250
+ * direct calls that hold the tool object without a name lookup.
1251
+ *
1252
+ * @example
1253
+ * ```typescript
1254
+ * toolAliases: { Bash: 'mcp__workspace__bash' }
1255
+ * ```
1256
+ */
1257
+ toolAliases?: Record<string, string>;
1229
1258
  /**
1230
1259
  * Specify the base set of available built-in tools.
1231
1260
  * - `string[]` - Array of specific tool names (e.g., `['Bash', 'Read', 'Edit']`)
@@ -2465,6 +2494,15 @@ export declare type SDKAssistantMessage = {
2465
2494
  error?: SDKAssistantMessageError;
2466
2495
  uuid: UUID;
2467
2496
  session_id: string;
2497
+ request_id?: string;
2498
+ /**
2499
+ * Subagent type that produced this message.
2500
+ */
2501
+ subagent_type?: string;
2502
+ /**
2503
+ * Description of the subagent task that produced this message.
2504
+ */
2505
+ task_description?: string;
2468
2506
  };
2469
2507
 
2470
2508
  export declare type SDKAssistantMessageError = 'authentication_failed' | 'oauth_org_not_allowed' | 'billing_error' | 'rate_limit' | 'invalid_request' | 'server_error' | 'unknown' | 'max_output_tokens';
@@ -2714,6 +2752,10 @@ declare type SDKControlInitializeRequest = {
2714
2752
  */
2715
2753
  planModeInstructions?: string;
2716
2754
 
2755
+ /**
2756
+ * Map of tool-name aliases applied before name resolution. When the model emits a tool_use whose name is a key in this map, the tool execution path resolves the mapped name instead. Single-hop (no chains). See Options.toolAliases.
2757
+ */
2758
+ toolAliases?: Record<string, string>;
2717
2759
  /**
2718
2760
  * When true, omit per-user dynamic sections (working directory, auto-memory path) from the cached system prompt and re-inject them as the first user message. Lets cross-user prompt caching hit on a static system prompt prefix. Tradeoff: the model sees this context slightly later in the prompt, so steering on the working directory and memory location is marginally less authoritative. Has no effect when a custom (non-preset) system prompt is in use.
2719
2761
  */
@@ -3316,6 +3358,7 @@ export declare type SDKResultSuccess = {
3316
3358
  subtype: 'success';
3317
3359
  duration_ms: number;
3318
3360
  duration_api_ms: number;
3361
+ ttft_ms?: number;
3319
3362
  is_error: boolean;
3320
3363
  api_error_status?: number | null;
3321
3364
  num_turns: number;
@@ -3334,30 +3377,6 @@ export declare type SDKResultSuccess = {
3334
3377
  session_id: string;
3335
3378
  };
3336
3379
 
3337
- /**
3338
- * V2 API - UNSTABLE
3339
- * Session interface for multi-turn conversations.
3340
- * Has methods, so not serializable.
3341
- * @deprecated Use `query()` instead. The V2 session API will be removed in a future release.
3342
- * @alpha
3343
- */
3344
- export declare interface SDKSession {
3345
- /**
3346
- * The session ID. Available after receiving the first message.
3347
- * For resumed sessions, available immediately.
3348
- * Throws if accessed before the session is initialized.
3349
- */
3350
- readonly sessionId: string;
3351
- /** Send a message to the agent */
3352
- send(message: string | SDKUserMessage): Promise<void>;
3353
- /** Stream messages from the agent */
3354
- stream(): AsyncGenerator<SDKMessage, void>;
3355
- /** Close the session */
3356
- close(): void;
3357
- /** Async disposal support (calls close if not already closed) */
3358
- [Symbol.asyncDispose](): Promise<void>;
3359
- }
3360
-
3361
3380
  /**
3362
3381
  * Session metadata returned by listSessions and getSessionInfo.
3363
3382
  */
@@ -3404,85 +3423,6 @@ export declare type SDKSessionInfo = {
3404
3423
  createdAt?: number;
3405
3424
  };
3406
3425
 
3407
- /**
3408
- * V2 API - UNSTABLE
3409
- * Options for creating a session.
3410
- * @deprecated Use `query()` instead. The V2 session API will be removed in a future release.
3411
- * @alpha
3412
- */
3413
- export declare type SDKSessionOptions = {
3414
- /** Model to use */
3415
- model: string;
3416
- /** Path to Claude Code executable */
3417
- pathToClaudeCodeExecutable?: string;
3418
- /** Executable to use (node, bun) */
3419
- executable?: 'node' | 'bun';
3420
- /** Arguments to pass to executable */
3421
- executableArgs?: string[];
3422
- /**
3423
- * Environment variables to pass to the Claude Code process.
3424
- * Defaults to `process.env`.
3425
- *
3426
- * SDK consumers can identify their app/library to include in the User-Agent header by setting:
3427
- * - `CLAUDE_AGENT_SDK_CLIENT_APP` - Your app/library identifier (e.g., "my-app/1.0.0", "my-library/2.1")
3428
- */
3429
- env?: {
3430
- [envVar: string]: string | undefined;
3431
- };
3432
- /**
3433
- * Working directory for the Claude Code process. Defaults to the current
3434
- * process's working directory.
3435
- */
3436
- cwd?: string;
3437
- /**
3438
- * Which settings sources to load (CLAUDE.md, `.claude/settings.json`).
3439
- * Defaults to `[]`: no project/user settings are loaded unless specified.
3440
- * Note that `query()` has the opposite default and loads all sources when
3441
- * this is omitted.
3442
- */
3443
- settingSources?: SettingSource[];
3444
- /**
3445
- * Must be set to `true` when using `permissionMode: 'bypassPermissions'`.
3446
- * This is a safety measure to ensure intentional bypassing of permissions.
3447
- */
3448
- allowDangerouslySkipPermissions?: boolean;
3449
- /**
3450
- * List of tool names that are auto-allowed without prompting for permission.
3451
- * These tools will execute automatically without asking the user for approval.
3452
- */
3453
- allowedTools?: string[];
3454
- /**
3455
- * List of tool names that are disallowed. These tools will be removed
3456
- * from the model's context and cannot be used.
3457
- */
3458
- disallowedTools?: string[];
3459
- /**
3460
- * Custom permission handler for controlling tool usage. Called before each
3461
- * tool execution to determine if it should be allowed, denied, or prompt the user.
3462
- */
3463
- canUseTool?: CanUseTool;
3464
- /**
3465
- * Hook callbacks for responding to various events during execution.
3466
- */
3467
- hooks?: Partial<Record<HookEvent, HookCallbackMatcher[]>>;
3468
- /**
3469
- * Permission mode for the session.
3470
- * - `'default'` - Standard permission behavior, prompts for dangerous operations
3471
- * - `'acceptEdits'` - Auto-accept file edit operations
3472
- * - `'bypassPermissions'` - Bypass all permission checks (requires `allowDangerouslySkipPermissions`)
3473
- * - `'plan'` - Planning mode, no execution of tools
3474
- * - `'dontAsk'` - Don't prompt for permissions, deny if not pre-approved
3475
- */
3476
- permissionMode?: PermissionMode;
3477
- /**
3478
- * Custom workflow instructions for plan mode. When `permissionMode` is
3479
- * `'plan'`, this string replaces the default code-implementation workflow
3480
- * body in the plan-mode system reminder. The CLI still wraps it with the
3481
- * read-only enforcement preamble and the ExitPlanMode protocol footer.
3482
- */
3483
- planModeInstructions?: string;
3484
- };
3485
-
3486
3426
  /**
3487
3427
  * Mirrors notifySessionStateChanged. 'idle' fires after heldBackResult flushes and the bg-agent do-while exits — authoritative turn-over signal.
3488
3428
  */
@@ -3584,6 +3524,10 @@ export declare type SDKTaskProgressMessage = {
3584
3524
  task_id: string;
3585
3525
  tool_use_id?: string;
3586
3526
  description: string;
3527
+ /**
3528
+ * Subagent type for Task tool subagents.
3529
+ */
3530
+ subagent_type?: string;
3587
3531
  usage: {
3588
3532
  total_tokens: number;
3589
3533
  tool_uses: number;
@@ -3602,6 +3546,10 @@ export declare type SDKTaskStartedMessage = {
3602
3546
  task_id: string;
3603
3547
  tool_use_id?: string;
3604
3548
  description: string;
3549
+ /**
3550
+ * Subagent type for Task tool subagents.
3551
+ */
3552
+ subagent_type?: string;
3605
3553
  task_type?: string;
3606
3554
  /**
3607
3555
  * meta.name from the workflow script (e.g. 'spec'). Only set when task_type is 'local_workflow'.
@@ -3624,7 +3572,7 @@ export declare type SDKTaskUpdatedMessage = {
3624
3572
  * Wire-safe subset of TaskState fields that changed. Excludes abortController, messages, result. Clients merge into their local task map.
3625
3573
  */
3626
3574
  patch: {
3627
- status?: 'pending' | 'running' | 'completed' | 'failed' | 'killed';
3575
+ status?: 'pending' | 'running' | 'completed' | 'failed' | 'killed' | 'paused';
3628
3576
  description?: string;
3629
3577
  end_time?: number;
3630
3578
  total_paused_ms?: number;
@@ -3673,6 +3621,14 @@ export declare type SDKUserMessage = {
3673
3621
  timestamp?: string;
3674
3622
  uuid?: UUID;
3675
3623
  session_id?: string;
3624
+ /**
3625
+ * Subagent type that produced this message.
3626
+ */
3627
+ subagent_type?: string;
3628
+ /**
3629
+ * Description of the subagent task that produced this message.
3630
+ */
3631
+ task_description?: string;
3676
3632
  };
3677
3633
 
3678
3634
  export declare type SDKUserMessageReplay = {
@@ -4321,6 +4277,10 @@ export declare interface Settings {
4321
4277
  * Which ref new worktrees branch from. 'fresh' (default) branches from origin/<default-branch> for a clean tree. 'head' branches from your current local HEAD so unpushed commits and feature-branch state are present. Applies to --worktree, EnterWorktree, and agent isolation.
4322
4278
  */
4323
4279
  baseRef?: 'fresh' | 'head';
4280
+ /**
4281
+ * Isolation mode for background sessions in this repo. 'worktree' (default) blocks Edit/Write in the main checkout until EnterWorktree is called. 'none' lets background jobs edit the working copy directly.
4282
+ */
4283
+ bgIsolation?: 'worktree' | 'none';
4324
4284
  };
4325
4285
  /**
4326
4286
  * Disable all hooks and statusLine execution
@@ -5692,37 +5652,6 @@ export declare interface Transport {
5692
5652
  [Symbol.dispose]?(): void;
5693
5653
  }
5694
5654
 
5695
- /**
5696
- * V2 API - UNSTABLE
5697
- * Create a persistent session for multi-turn conversations.
5698
- * @deprecated Use `query()` instead. The V2 session API will be removed in a future release.
5699
- * @alpha
5700
- */
5701
- export declare function unstable_v2_createSession(_options: SDKSessionOptions): SDKSession;
5702
-
5703
- /**
5704
- * V2 API - UNSTABLE
5705
- * One-shot convenience function for single prompts.
5706
- * @deprecated Use `query()` instead. The V2 session API will be removed in a future release.
5707
- * @alpha
5708
- *
5709
- * @example
5710
- * ```typescript
5711
- * const result = await unstable_v2_prompt("What files are here?", {
5712
- * model: 'claude-sonnet-4-6'
5713
- * })
5714
- * ```
5715
- */
5716
- export declare function unstable_v2_prompt(_message: string, _options: SDKSessionOptions): Promise<SDKResultMessage>;
5717
-
5718
- /**
5719
- * V2 API - UNSTABLE
5720
- * Resume an existing session by ID.
5721
- * @deprecated Use `query()` instead. The V2 session API will be removed in a future release.
5722
- * @alpha
5723
- */
5724
- export declare function unstable_v2_resumeSession(_sessionId: string, _options: SDKSessionOptions): SDKSession;
5725
-
5726
5655
  export declare type UserPromptExpansionHookInput = BaseHookInput & {
5727
5656
  hook_event_name: 'UserPromptExpansion';
5728
5657
  expansion_type: 'slash_command' | 'mcp_prompt';