@anthropic-ai/claude-agent-sdk 0.3.326 → 0.3.327
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/bridge.mjs +74 -78
- package/browser-sdk.js +52 -51
- package/{core-rn7tc54w.mjs → core-25bstexa.mjs} +3 -3
- package/core-4ps8vwh1.mjs +42 -0
- package/core-9a7zb9bm.mjs +53 -0
- package/{core-ba5rrckm.mjs → core-a8ty0dnc.mjs} +2 -2
- package/{core-2h2qc9qv.mjs → core-ae73vzp2.mjs} +4 -4
- package/{core-ya1m7gzj.mjs → core-dsa3p77h.mjs} +3 -3
- package/{core-h6r54bwv.mjs → core-e93r8awg.mjs} +2 -2
- package/core-eqz9ara6.mjs +18 -0
- package/{core-td7rt8zt.mjs → core-esw7xtkz.mjs} +3 -3
- package/{core-k67vj6j9.mjs → core-ey906mbk.mjs} +5 -5
- package/{core-x4kwpwv9.mjs → core-k19jejpn.mjs} +2 -2
- package/{core-tf03rfab.mjs → core-kag24kjr.mjs} +3 -3
- package/{core-qbjntcdf.mjs → core-mhczx7zp.mjs} +4 -4
- package/{core-qj4dtgyt.mjs → core-nfa6p2rw.mjs} +3 -3
- package/{core-sstebd83.mjs → core-v6sp3qjw.mjs} +4 -4
- package/core.mjs +12 -11
- package/manifest.json +21 -21
- package/manifest.zst.json +25 -25
- package/package.json +25 -25
- package/sdk-tools.d.ts +4 -0
- package/sdk.d.ts +37 -9
- package/sdk.mjs +80 -84
- package/core-9sxfsmzx.mjs +0 -18
- package/core-dnsvg8nc.mjs +0 -53
- package/core-y6bhrwmk.mjs +0 -47
package/manifest.json
CHANGED
|
@@ -1,53 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.327",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"buildDate": "2026-11-
|
|
4
|
+
"commit": "f467840f2a4cef7025c988cdd4deac9aba5e264a",
|
|
5
|
+
"buildDate": "2026-11-17T18:29:12Z",
|
|
6
6
|
"platforms": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"binary": "claude",
|
|
9
|
-
"checksum": "
|
|
10
|
-
"size":
|
|
9
|
+
"checksum": "76d48205c926c8a6978cfc2171b631bcd01e20bbadd085638bb2ec57bea91c5b",
|
|
10
|
+
"size": 354515104
|
|
11
11
|
},
|
|
12
12
|
"darwin-x64": {
|
|
13
13
|
"binary": "claude",
|
|
14
|
-
"checksum": "
|
|
15
|
-
"size":
|
|
14
|
+
"checksum": "1fe75c05df7be824af1ed80ff9ccdf2be991f3a2212b97e05fc9a3bff2f39ef9",
|
|
15
|
+
"size": 369295744
|
|
16
16
|
},
|
|
17
17
|
"linux-arm64": {
|
|
18
18
|
"binary": "claude",
|
|
19
|
-
"checksum": "
|
|
20
|
-
"size":
|
|
19
|
+
"checksum": "acf0ef2f9da8d5ab08f193f007e19a06cbfb608b96a2f1f758d63a92a386cff8",
|
|
20
|
+
"size": 371779000
|
|
21
21
|
},
|
|
22
22
|
"linux-x64": {
|
|
23
23
|
"binary": "claude",
|
|
24
|
-
"checksum": "
|
|
25
|
-
"size":
|
|
24
|
+
"checksum": "343c744baa14bfd38286a7cb90871051f04379956da6c5b803a9e66019a76ac9",
|
|
25
|
+
"size": 372904464
|
|
26
26
|
},
|
|
27
27
|
"linux-arm64-musl": {
|
|
28
28
|
"binary": "claude",
|
|
29
|
-
"checksum": "
|
|
30
|
-
"size":
|
|
29
|
+
"checksum": "e44a59ef850788c578adaab7a6487d5d0af9c0844401da9d7263e7b41515754b",
|
|
30
|
+
"size": 356873160
|
|
31
31
|
},
|
|
32
32
|
"linux-x64-musl": {
|
|
33
33
|
"binary": "claude",
|
|
34
|
-
"checksum": "
|
|
35
|
-
"size":
|
|
34
|
+
"checksum": "d2b02e78664c1347aff8fcee045356ee044116be41d7f412721a6c50182b6d98",
|
|
35
|
+
"size": 359267592
|
|
36
36
|
},
|
|
37
37
|
"win32-x64": {
|
|
38
38
|
"binary": "claude.exe",
|
|
39
|
-
"checksum": "
|
|
40
|
-
"size":
|
|
39
|
+
"checksum": "d6c8075bfb3b87f1c1254e64b6c35dadc628d21e75930ae51e47047b3f05a4a2",
|
|
40
|
+
"size": 379536544
|
|
41
41
|
},
|
|
42
42
|
"win32-arm64": {
|
|
43
43
|
"binary": "claude.exe",
|
|
44
|
-
"checksum": "
|
|
45
|
-
"size":
|
|
44
|
+
"checksum": "d2c3395d252007540a5662a2cfd4d8903a0beb5fa32c893cd13b81be427625a7",
|
|
45
|
+
"size": 361547936
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"sdkCompat": {
|
|
49
49
|
"testedWrapperVersions": [
|
|
50
|
-
"0.3.292",
|
|
51
50
|
"0.3.293",
|
|
52
51
|
"0.3.294",
|
|
53
52
|
"0.3.295",
|
|
@@ -76,7 +75,8 @@
|
|
|
76
75
|
"0.3.322",
|
|
77
76
|
"0.3.323",
|
|
78
77
|
"0.3.324",
|
|
79
|
-
"0.3.325"
|
|
78
|
+
"0.3.325",
|
|
79
|
+
"0.3.326"
|
|
80
80
|
],
|
|
81
81
|
"harnessSchema": 1
|
|
82
82
|
}
|
package/manifest.zst.json
CHANGED
|
@@ -1,61 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.327",
|
|
3
3
|
"manifestSignatureEnforcement": "flag",
|
|
4
|
-
"commit": "
|
|
5
|
-
"buildDate": "2026-11-
|
|
4
|
+
"commit": "f467840f2a4cef7025c988cdd4deac9aba5e264a",
|
|
5
|
+
"buildDate": "2026-11-17T18:31:39Z",
|
|
6
6
|
"platforms": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"binary": "claude.zst",
|
|
9
|
-
"checksum": "
|
|
10
|
-
"size":
|
|
9
|
+
"checksum": "bba95782cd2be6baa993d93fe35719eb7a168ce8cfb12b9967e84f2f31341abb",
|
|
10
|
+
"size": 121833959,
|
|
11
11
|
"bundle": {
|
|
12
|
-
"checksum": "
|
|
13
|
-
"size":
|
|
12
|
+
"checksum": "12b8ad19c8e569093a03dc4ff3de9d93efee384810c05f7e79f2b3b6b2c56aba",
|
|
13
|
+
"size": 121836633
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"darwin-x64": {
|
|
17
17
|
"binary": "claude.zst",
|
|
18
|
-
"checksum": "
|
|
19
|
-
"size":
|
|
18
|
+
"checksum": "61e0618f147caa94eebfc4b3a5011c95f8ed355fc387fc7597ca58958d942567",
|
|
19
|
+
"size": 129401570,
|
|
20
20
|
"bundle": {
|
|
21
|
-
"checksum": "
|
|
22
|
-
"size":
|
|
21
|
+
"checksum": "d69384a537eef9bc463326f6a2cab8d6d82debbe9f2b3f8e8ffdb11e670334c1",
|
|
22
|
+
"size": 129401787
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"linux-arm64": {
|
|
26
26
|
"binary": "claude.zst",
|
|
27
|
-
"checksum": "
|
|
28
|
-
"size":
|
|
27
|
+
"checksum": "2f2201df61973fc0637e5e50c0c81c75884bec3ca7eed856e3242ab4cfb22e17",
|
|
28
|
+
"size": 133077941
|
|
29
29
|
},
|
|
30
30
|
"linux-x64": {
|
|
31
31
|
"binary": "claude.zst",
|
|
32
|
-
"checksum": "
|
|
33
|
-
"size":
|
|
32
|
+
"checksum": "a7ba3640f5c656d697b743c20bcfa4470e8b4e88aa352be82dafe3041d5f8961",
|
|
33
|
+
"size": 134515965
|
|
34
34
|
},
|
|
35
35
|
"linux-arm64-musl": {
|
|
36
36
|
"binary": "claude.zst",
|
|
37
|
-
"checksum": "
|
|
38
|
-
"size":
|
|
37
|
+
"checksum": "b138f2d35da647a95a6b3d0ab0c4edd53591cf527507c03f5cc154cc35fc8f35",
|
|
38
|
+
"size": 127253974
|
|
39
39
|
},
|
|
40
40
|
"linux-x64-musl": {
|
|
41
41
|
"binary": "claude.zst",
|
|
42
|
-
"checksum": "
|
|
43
|
-
"size":
|
|
42
|
+
"checksum": "4081ee69a1e09f8e219fd1eb475c275e4ee8a52e92cee1919ccca7bce66f7f3d",
|
|
43
|
+
"size": 128762925
|
|
44
44
|
},
|
|
45
45
|
"win32-x64": {
|
|
46
46
|
"binary": "claude.exe.zst",
|
|
47
|
-
"checksum": "
|
|
48
|
-
"size":
|
|
47
|
+
"checksum": "689a7f718b3653bf7aff96bb4cd3042adc76b5bc74fadcc3af23a548458a48e5",
|
|
48
|
+
"size": 137009857
|
|
49
49
|
},
|
|
50
50
|
"win32-arm64": {
|
|
51
51
|
"binary": "claude.exe.zst",
|
|
52
|
-
"checksum": "
|
|
53
|
-
"size":
|
|
52
|
+
"checksum": "18418aea0b5879318b2fb1ab3702c944cef79dd6a1c22a7367de3a24b2e208ce",
|
|
53
|
+
"size": 130871478
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"sdkCompat": {
|
|
57
57
|
"testedWrapperVersions": [
|
|
58
|
-
"0.3.292",
|
|
59
58
|
"0.3.293",
|
|
60
59
|
"0.3.294",
|
|
61
60
|
"0.3.295",
|
|
@@ -84,7 +83,8 @@
|
|
|
84
83
|
"0.3.322",
|
|
85
84
|
"0.3.323",
|
|
86
85
|
"0.3.324",
|
|
87
|
-
"0.3.325"
|
|
86
|
+
"0.3.325",
|
|
87
|
+
"0.3.326"
|
|
88
88
|
],
|
|
89
89
|
"harnessSchema": 1
|
|
90
90
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anthropic-ai/claude-agent-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.327",
|
|
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.
|
|
65
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.
|
|
66
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.
|
|
67
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.
|
|
68
|
-
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.
|
|
69
|
-
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.
|
|
70
|
-
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.
|
|
71
|
-
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.
|
|
64
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.327",
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.327",
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.327",
|
|
67
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.327",
|
|
68
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.327",
|
|
69
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.327",
|
|
70
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.327",
|
|
71
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.327"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
74
74
|
"sdk.mjs",
|
|
@@ -85,21 +85,21 @@
|
|
|
85
85
|
"extractFromBunfs.d.ts",
|
|
86
86
|
"manifest.json",
|
|
87
87
|
"manifest.zst.json",
|
|
88
|
-
"core-
|
|
89
|
-
"core-
|
|
90
|
-
"core-
|
|
91
|
-
"core-
|
|
92
|
-
"core-
|
|
93
|
-
"core-
|
|
94
|
-
"core-
|
|
95
|
-
"core-
|
|
96
|
-
"core-
|
|
97
|
-
"core-
|
|
98
|
-
"core-
|
|
99
|
-
"core-
|
|
100
|
-
"core-
|
|
101
|
-
"core-
|
|
102
|
-
"core-
|
|
88
|
+
"core-25bstexa.mjs",
|
|
89
|
+
"core-4ps8vwh1.mjs",
|
|
90
|
+
"core-9a7zb9bm.mjs",
|
|
91
|
+
"core-a8ty0dnc.mjs",
|
|
92
|
+
"core-ae73vzp2.mjs",
|
|
93
|
+
"core-dsa3p77h.mjs",
|
|
94
|
+
"core-e93r8awg.mjs",
|
|
95
|
+
"core-eqz9ara6.mjs",
|
|
96
|
+
"core-esw7xtkz.mjs",
|
|
97
|
+
"core-ey906mbk.mjs",
|
|
98
|
+
"core-k19jejpn.mjs",
|
|
99
|
+
"core-kag24kjr.mjs",
|
|
100
|
+
"core-mhczx7zp.mjs",
|
|
101
|
+
"core-nfa6p2rw.mjs",
|
|
102
|
+
"core-v6sp3qjw.mjs"
|
|
103
103
|
],
|
|
104
|
-
"claudeCodeVersion": "2.1.
|
|
104
|
+
"claudeCodeVersion": "2.1.327"
|
|
105
105
|
}
|
package/sdk-tools.d.ts
CHANGED
|
@@ -4299,6 +4299,10 @@ export interface MonitorOutput {
|
|
|
4299
4299
|
* No timeout — runs until TaskStop or session end.
|
|
4300
4300
|
*/
|
|
4301
4301
|
persistent?: boolean;
|
|
4302
|
+
/**
|
|
4303
|
+
* True when the command ran in the sandbox only because its permission check relied on the sandbox; the settings would otherwise have exempted it.
|
|
4304
|
+
*/
|
|
4305
|
+
keptInSandboxByCheck?: boolean;
|
|
4302
4306
|
}
|
|
4303
4307
|
export interface ProposeSkillsOutput {
|
|
4304
4308
|
/**
|
package/sdk.d.ts
CHANGED
|
@@ -56,6 +56,9 @@ export declare type AgentDefinition = {
|
|
|
56
56
|
* Model alias (e.g. 'fable', 'opus', 'sonnet', 'haiku') or full model ID (e.g. 'claude-fable-5'). 'inherit' uses the main model; if omitted, uses the default subagent model when one is configured, else the main model
|
|
57
57
|
*/
|
|
58
58
|
model?: string;
|
|
59
|
+
/**
|
|
60
|
+
* MCP servers for this agent, by name or as inline config. Passing a createSdkMcpServer() server here is deprecated. It is ignored with a warning and will be an error in a later release, so put it in the top-level mcpServers option.
|
|
61
|
+
*/
|
|
59
62
|
mcpServers?: AgentMcpServerSpec[];
|
|
60
63
|
/**
|
|
61
64
|
* Experimental: Critical reminder added to system prompt
|
|
@@ -1055,6 +1058,8 @@ export declare interface HookCallbackMatcher {
|
|
|
1055
1058
|
*/
|
|
1056
1059
|
onFailure?: 'continue' | 'block';
|
|
1057
1060
|
|
|
1061
|
+
|
|
1062
|
+
|
|
1058
1063
|
}
|
|
1059
1064
|
|
|
1060
1065
|
export declare type HookEvent = 'PreToolUse' | 'PostToolUse' | 'PostToolUseFailure' | 'PostToolBatch' | 'Notification' | 'UserPromptSubmit' | 'UserPromptExpansion' | 'SessionStart' | 'SessionEnd' | 'Stop' | 'StopFailure' | 'SubagentStart' | 'SubagentStop' | 'PreCompact' | 'PostCompact' | 'PreModelSwitch' | 'PostModelSwitch' | 'PermissionRequest' | 'PermissionDenied' | 'Setup' | 'TeammateIdle' | 'TaskCreated' | 'TaskCompleted' | 'Elicitation' | 'ElicitationResult' | 'ConfigChange' | 'WorktreeCreate' | 'WorktreeRemove' | 'InstructionsLoaded' | 'CwdChanged' | 'FileChanged' | 'DirectoryAdded' | 'MessageDisplay';
|
|
@@ -2442,6 +2447,8 @@ export declare type Options = {
|
|
|
2442
2447
|
*/
|
|
2443
2448
|
managedSettings?: Settings;
|
|
2444
2449
|
|
|
2450
|
+
|
|
2451
|
+
|
|
2445
2452
|
/**
|
|
2446
2453
|
* Control which filesystem settings to load.
|
|
2447
2454
|
* - `'user'` - Global user settings (`~/.claude/settings.json`)
|
|
@@ -4372,6 +4379,7 @@ export declare type SDKControlGetContextUsageResponse = {
|
|
|
4372
4379
|
cache_read_input_tokens: number;
|
|
4373
4380
|
} | null;
|
|
4374
4381
|
|
|
4382
|
+
|
|
4375
4383
|
};
|
|
4376
4384
|
|
|
4377
4385
|
/**
|
|
@@ -4945,6 +4953,7 @@ declare type SDKControlInitializeRequest = {
|
|
|
4945
4953
|
perTaskStopAffordance?: boolean;
|
|
4946
4954
|
|
|
4947
4955
|
|
|
4956
|
+
|
|
4948
4957
|
/**
|
|
4949
4958
|
* Plugins to load for the session, in the same shape as the SDK `plugins` option: the stdin form of one --plugin-dir flag per entry (--plugin-dir-no-mcp when skipMcpDiscovery is set), so the launch command line does not grow with the plugin count. Loaded only by a CLI launched with --await-initialize, which reads this request during startup before any plugin work. Without that flag, on a repeated initialize, or over a remote session transport the field loads nothing; plugins_applied in the response reports whether the listed plugins are in fact loaded.
|
|
4950
4959
|
*/
|
|
@@ -4957,6 +4966,8 @@ declare type SDKControlInitializeRequest = {
|
|
|
4957
4966
|
|
|
4958
4967
|
|
|
4959
4968
|
|
|
4969
|
+
|
|
4970
|
+
|
|
4960
4971
|
};
|
|
4961
4972
|
|
|
4962
4973
|
/**
|
|
@@ -4995,6 +5006,8 @@ export declare type SDKControlInitializeResponse = {
|
|
|
4995
5006
|
*/
|
|
4996
5007
|
plugins_applied?: boolean;
|
|
4997
5008
|
|
|
5009
|
+
|
|
5010
|
+
|
|
4998
5011
|
/**
|
|
4999
5012
|
* Whether the `mcpServers` in this initialize are the set the process read at launch under --await-initialize, so a re-sent initialize naming the same set also reads true; false otherwise. True says they were taken as an --mcp-config item, not that each one connected: a server missing from system/init mcp_servers was not loaded. The field loads nothing after launch. Absent when the request named none, and on CLIs that predate the field, which never read `mcpServers`: a host that sent servers must treat absence as not applied.
|
|
5000
5013
|
*/
|
|
@@ -5265,6 +5278,7 @@ declare type SDKControlPermissionRequest = {
|
|
|
5265
5278
|
* True when the dialog must not offer the persistent "don't ask again" row for this ask: accepting it would write a whole-tool allow rule broader than the ask's own verb (PermissionAskDecision.suppressAlwaysAllowRule), or the ask comes from a run a plugin started, where Claude Code saves no rule from the answer, not even for the session. Hosts rendering approve options should omit any persistent-rule affordance when set.
|
|
5266
5279
|
*/
|
|
5267
5280
|
suppress_always_allow_rule?: boolean;
|
|
5281
|
+
|
|
5268
5282
|
/**
|
|
5269
5283
|
* True when the ask must not be approvable by a single stray keystroke (PermissionAskDecision.defaultToNo): a terminal-style prompt opens on its decline option and takes no digit shortcut. Hosts rendering approve options should not pre-select approve when set.
|
|
5270
5284
|
*/
|
|
@@ -5691,6 +5705,8 @@ declare type SDKHookCallbackMatcher = {
|
|
|
5691
5705
|
*/
|
|
5692
5706
|
onFailure?: 'continue' | 'block';
|
|
5693
5707
|
|
|
5708
|
+
|
|
5709
|
+
|
|
5694
5710
|
};
|
|
5695
5711
|
|
|
5696
5712
|
/**
|
|
@@ -5890,6 +5906,7 @@ export declare type SDKMessageOrigin = {
|
|
|
5890
5906
|
|
|
5891
5907
|
|
|
5892
5908
|
|
|
5909
|
+
|
|
5893
5910
|
} | {
|
|
5894
5911
|
kind: 'task-notification';
|
|
5895
5912
|
/**
|
|
@@ -6531,9 +6548,9 @@ export declare type SDKSettingsParseError = {
|
|
|
6531
6548
|
};
|
|
6532
6549
|
|
|
6533
6550
|
/**
|
|
6534
|
-
* 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. sandbox_required_unavailable: a working sandbox is required and it cannot run in this session, for example because bubblewrap is missing or the platform is not supported; make the sandbox available or have the requirement changed. initialize_not_first: Claude Code was started with --await-initialize, and its first stdin line was not the initialize control request (another message, or not valid JSON). Either the host wrote something else first, or a wrapper script between the host and Claude Code read or changed that line; the fix is in the host or the wrapper script, not a retry. config_file_invalid: a configuration file read at start-up is not valid JSON; errors names the file and, for the global configuration file, how to restore or repair it, and invalid_config_file has the paths as fields. The file is left unchanged, and every start without a terminal is refused until it is repaired, so a retry alone does not help. managed_settings_not_delivered: Claude Code was started with --managed-settings-in-initialize and could not use the managed settings in the initialize control request. Stdin ended or failed first, or its first line was too long; the request has no managedSettings object, that object could not be used, or the request's plugins or mcpServers field is malformed; or the launch does not read that request at start-up or also passes --managed-settings. errors says which. Claude Code starts no session without them; the fix is in the host or in a wrapper script between it and Claude Code, not a retry.
|
|
6551
|
+
* 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, or (not on Windows) a folder name in its path is not valid UTF-8 and a different file, folder or link stands at the name Claude Code reads it as, for that folder or one above it; start from another directory, rename that folder, or remove the other entry. 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. sandbox_required_unavailable: a working sandbox is required and it cannot run in this session, for example because bubblewrap is missing or the platform is not supported; make the sandbox available or have the requirement changed. initialize_not_first: Claude Code was started with --await-initialize, and its first stdin line was not the initialize control request (another message, or not valid JSON). Either the host wrote something else first, or a wrapper script between the host and Claude Code read or changed that line; the fix is in the host or the wrapper script, not a retry. config_file_invalid: a configuration file read at start-up is not valid JSON; errors names the file and, for the global configuration file, how to restore or repair it, and invalid_config_file has the paths as fields. The file is left unchanged, and every start without a terminal is refused until it is repaired, so a retry alone does not help. managed_settings_not_delivered: Claude Code was started with --managed-settings-in-initialize and could not use the managed settings in the initialize control request. Stdin ended or failed first, or its first line was too long; the request has no managedSettings object, that object could not be used, or the request's plugins or mcpServers field is malformed; or the launch does not read that request at start-up or also passes --managed-settings. errors says which. Claude Code starts no session without them; the fix is in the host or in a wrapper script between it and Claude Code, not a retry. initialize_fields_not_delivered: as managed_settings_not_delivered, for --initialize-fields and the settings or disallowedTools that it names; also when a named field's own flag (--settings, --disallowedTools) is passed too.
|
|
6535
6552
|
*/
|
|
6536
|
-
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' | 'sandbox_required_unavailable' | 'initialize_not_first' | 'config_file_invalid' | 'managed_settings_not_delivered';
|
|
6553
|
+
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' | 'sandbox_required_unavailable' | 'initialize_not_first' | 'config_file_invalid' | 'managed_settings_not_delivered' | 'initialize_fields_not_delivered';
|
|
6537
6554
|
|
|
6538
6555
|
export declare type SDKStatus = 'compacting' | 'requesting' | null;
|
|
6539
6556
|
|
|
@@ -6651,6 +6668,7 @@ export declare type SDKSystemMessage = {
|
|
|
6651
6668
|
|
|
6652
6669
|
|
|
6653
6670
|
|
|
6671
|
+
|
|
6654
6672
|
uuid: UUID;
|
|
6655
6673
|
session_id: string;
|
|
6656
6674
|
};
|
|
@@ -6758,6 +6776,9 @@ export declare type SDKTaskStartedMessage = {
|
|
|
6758
6776
|
* meta.name from the workflow script (e.g. 'spec'). Only set when task_type is 'local_workflow'.
|
|
6759
6777
|
*/
|
|
6760
6778
|
workflow_name?: string;
|
|
6779
|
+
/**
|
|
6780
|
+
* Text describing what this run was asked. Absent on a subagent run that Claude Code resumed with text of its own (such as a background task's notice); keep the prompt an earlier task_started gave. On a run that continues an interrupted turn, this is the task's description.
|
|
6781
|
+
*/
|
|
6761
6782
|
prompt?: string;
|
|
6762
6783
|
/**
|
|
6763
6784
|
* Ambient/housekeeping task. Consumers should hide this from the inline transcript; it may still appear in a tasks panel.
|
|
@@ -7496,7 +7517,7 @@ export declare interface Settings {
|
|
|
7496
7517
|
[k: string]: unknown;
|
|
7497
7518
|
};
|
|
7498
7519
|
/**
|
|
7499
|
-
* The claude.ai Project this session names for your organization's usage reports: the Project's ID, starting with "claude_proj_" or "chan_", or the UUID of a "claude_proj_" Project. An empty string names none and stops lower-precedence files from naming one; the organization default still applies.
|
|
7520
|
+
* The claude.ai Project this session names for your organization's usage reports: the Project's ID, starting with "claude_proj_" or "chan_", or the UUID of a "claude_proj_" Project. An empty string names none and stops lower-precedence files from naming one; the organization default still applies. A Project is sent only when Claude Code uses your claude.ai login, connects directly to the Anthropic API, is not in a cloud session, and CLAUDE_CODE_ATTRIBUTION_HEADER is not 0. CLAUDE_CODE_ATTRIBUTION_PROJECT takes precedence over it. Set in managed settings, it overrides people's own settings files. A project's .claude/settings.json and settings.local.json count only once the folder is trusted; for runs in a folder nobody has trusted, such as CI, use CLAUDE_CODE_ATTRIBUTION_PROJECT. Behind a Claude apps gateway that reports usage by group, name one of your groups instead, such as "payments"; CLAUDE_CODE_ATTRIBUTION_HEADER does not affect that.
|
|
7500
7521
|
*/
|
|
7501
7522
|
attributionProject?: string;
|
|
7502
7523
|
/**
|
|
@@ -7504,7 +7525,7 @@ export declare interface Settings {
|
|
|
7504
7525
|
*/
|
|
7505
7526
|
attributionProjectPolicy?: {
|
|
7506
7527
|
/**
|
|
7507
|
-
* The Project used when neither CLAUDE_CODE_ATTRIBUTION_PROJECT nor attributionProject names one: its ID, starting with "claude_proj_" or "chan_", or the UUID of a "claude_proj_" Project.
|
|
7528
|
+
* The Project used when neither CLAUDE_CODE_ATTRIBUTION_PROJECT nor attributionProject names one: its ID, starting with "claude_proj_" or "chan_", or the UUID of a "claude_proj_" Project. Behind a Claude apps gateway that reports usage by group, a group name instead.
|
|
7508
7529
|
*/
|
|
7509
7530
|
default?: string;
|
|
7510
7531
|
};
|
|
@@ -8106,7 +8127,7 @@ export declare interface Settings {
|
|
|
8106
8127
|
};
|
|
8107
8128
|
};
|
|
8108
8129
|
/**
|
|
8109
|
-
* Managed plugins (plugin\@marketplace ids that managed enabledPlugins sets true) whose hooks run first, outermost, in the listed order: the first id listed sees every event before any other plugin and every result after it. Managed plugins
|
|
8130
|
+
* Managed plugins (plugin\@marketplace ids that managed enabledPlugins sets true) whose hooks run first, outermost, in the listed order: the first id listed sees every event before any other plugin and every result after it. Managed plugins from a local folder or a remote marketplace managed settings name, and not listed here or in appendPlugins, follow the listed ones; user, project and marketplace plugins come after those; then appendPlugins; then the built-in plugins. The bundled cc-plugin-sec-default\@builtin seats itself outermost (on a machine with managed settings and for Team and Enterprise organizations) unless this list is set, in which case list it where it should sit or leave it out. Name it there as sec-default\@builtin, the id every release reads, for as long as any machine in the organization may run a release from before its rename; a release that knows the new id reads either. Any other id that is not an enabled managed plugin is skipped; an id listed in both keys is prepended. Only honored from managed settings (or, on a machine with none, from user settings for your own plugins); ignored in project, local and --settings sources.
|
|
8110
8131
|
*/
|
|
8111
8132
|
prependPlugins?: string[];
|
|
8112
8133
|
/**
|
|
@@ -8370,7 +8391,7 @@ export declare interface Settings {
|
|
|
8370
8391
|
*/
|
|
8371
8392
|
autoUpdate?: boolean;
|
|
8372
8393
|
/**
|
|
8373
|
-
* Deprecated and ignored: settings that hold it still load. A plugin takes the organization tier when managed settings enable it
|
|
8394
|
+
* Deprecated and ignored: settings that hold it still load. A plugin takes the organization tier when managed settings enable it and declare its marketplace with a remote source.
|
|
8374
8395
|
*/
|
|
8375
8396
|
pluginDigests?: {
|
|
8376
8397
|
[k: string]: string[];
|
|
@@ -8634,7 +8655,7 @@ export declare interface Settings {
|
|
|
8634
8655
|
*/
|
|
8635
8656
|
autoUpdate?: boolean;
|
|
8636
8657
|
/**
|
|
8637
|
-
* Deprecated and ignored: settings that hold it still load. A plugin takes the organization tier when managed settings enable it
|
|
8658
|
+
* Deprecated and ignored: settings that hold it still load. A plugin takes the organization tier when managed settings enable it and declare its marketplace with a remote source.
|
|
8638
8659
|
*/
|
|
8639
8660
|
pluginDigests?: {
|
|
8640
8661
|
[k: string]: string[];
|
|
@@ -9399,13 +9420,17 @@ export declare interface Settings {
|
|
|
9399
9420
|
*/
|
|
9400
9421
|
parentSettingsBehavior?: 'first-wins' | 'merge';
|
|
9401
9422
|
/**
|
|
9402
|
-
* Controls how the managed settings sources compose. "first-wins" (default): the highest-priority source present (server-managed > MDM (managed plist / HKLM) > managed-settings.json) is the managed tier alone. "merge": every present source deep-merges with fixed precedence server-managed > MDM > managed-settings.json — scalars take the highest source's value (a restrictive boolean or enum — the allowManaged*Only locks, the disable* switches, the sandbox lock family — takes the strictest value any source sets) and arrays union, except fallbackModel, the restriction allowlists allowedMcpServers, allowedProviders, availableModels, strictKnownMarketplaces and allowedChannelPlugins, and sandbox.credentials.awsPairs and sandbox.ripgrep (the highest source that sets one owns it whole), modelOverrides (the whole map of the highest source that sets it, dropped when that source sits below the one that sets availableModels), managedMcpServers (server names union; a name set by two sources takes the higher source's whole entry), and the keys taken from the highest source only: the auth pins forceLoginOrgUUID, forceLoginMethod, forceLoginGatewayUrl and gatewayInternalNetworks, the credential helpers apiKeyHelper, awsAuthRefresh, awsCredentialExport, gcpAuthRefresh, otelHeadersHelper and proxyAuthHelper, modelPicker, permissions.defaultMode, parentSettingsBehavior and the policyHelper configuration (env keeps its own per-key union). In both modes, a forceLoginOrgUUID, or a forceLoginMethod of claudeai or console, that this machine's own MDM policy or managed settings file sets applies ahead of server-managed settings. Honored only from the highest-priority source present; enable it only when every lower source is admin-controlled, since lower sources then contribute entries such as permissions.allow. HKCU and --managed-settings never take part in the merge.
|
|
9423
|
+
* Controls how the managed settings sources compose. "first-wins" (default): the highest-priority source present (server-managed > MDM (managed plist / HKLM) > managed-settings.json) is the managed tier alone. "merge": every present source deep-merges with fixed precedence server-managed > MDM > managed-settings.json — scalars take the highest source's value (a restrictive boolean or enum — the allowManaged*Only locks, the disable* switches, the sandbox lock family — takes the strictest value any source sets) and arrays union, except fallbackModel, the restriction allowlists allowedMcpServers, allowedProviders, availableModels, strictKnownMarketplaces and allowedChannelPlugins, and sandbox.credentials.awsPairs and sandbox.ripgrep (the highest source that sets one owns it whole), modelOverrides (the whole map of the highest source that sets it, dropped when that source sits below the one that sets availableModels), managedMcpServers (server names union; a name set by two sources takes the higher source's whole entry), and the keys taken from the highest source only: the auth pins forceLoginOrgUUID, forceLoginMethod, forceLoginGatewayUrl and gatewayInternalNetworks, allowNestedModelAccessUnderForceLogin, the credential helpers apiKeyHelper, awsAuthRefresh, awsCredentialExport, gcpAuthRefresh, otelHeadersHelper and proxyAuthHelper, modelPicker, permissions.defaultMode, parentSettingsBehavior and the policyHelper configuration (env keeps its own per-key union). In both modes, a forceLoginOrgUUID, or a forceLoginMethod of claudeai or console, that this machine's own MDM policy or managed settings file sets applies ahead of server-managed settings. Honored only from the highest-priority source present; enable it only when every lower source is admin-controlled, since lower sources then contribute entries such as permissions.allow. HKCU and --managed-settings never take part in the merge.
|
|
9403
9424
|
*/
|
|
9404
9425
|
managedSourcesBehavior?: 'first-wins' | 'merge';
|
|
9405
9426
|
/**
|
|
9406
9427
|
* Organization UUID to require for OAuth login. Accepts a single UUID string or an array of UUIDs (any one is permitted). When set in managed settings, login fails if the authenticated account does not belong to a listed organization.
|
|
9407
9428
|
*/
|
|
9408
9429
|
forceLoginOrgUUID?: string | string[];
|
|
9430
|
+
/**
|
|
9431
|
+
* Self-hosted runner hosts only. Set to true to let a Claude Code started by a runner session's command use the runner's model access (--nested-model-access) when this machine's managed settings set forceLoginOrgUUID or forceLoginMethod. It asks the runner which organization the session owner's sign-in belongs to, and stops if the pin does not permit it or the runner does not answer. Without this key it is left signed out. Any program on the machine can pretend to be the runner, so with this key the pin is not a security boundary: set it on runner hosts only, never in a profile that reaches people's own computers. Honored only from this machine's own administrator sources (MDM, the managed settings file, or a policy helper that they name); ignored in server-managed, user, project, local and --settings sources.
|
|
9432
|
+
*/
|
|
9433
|
+
allowNestedModelAccessUnderForceLogin?: boolean;
|
|
9409
9434
|
/**
|
|
9410
9435
|
* Managed settings only (managed-settings.json, MDM, or server-managed). The API providers Claude Code may use on this machine: "anthropic" (the Anthropic API on Anthropic's own host, via a claude.ai or Console sign-in or an API key; pair it with forceLoginMethod / forceLoginOrgUUID to require a sign-in), "bedrock", "vertex", "foundry", "anthropicAws", "mantle" (each meaning that provider's own service: its regional, FIPS, private-endpoint and sovereign-cloud hosts), "customEndpoint" (the Anthropic API or a cloud provider's API sent to some other host — ANTHROPIC_BASE_URL, that provider's ANTHROPIC_*_BASE_URL, a Foundry resource name that is not a bare name, or for Bedrock the AWS SDK's AWS_ENDPOINT_URL[_BEDROCK[_RUNTIME]] — such as an LLM gateway; admitted only for the value pinned in the "env" block of the same managed source), or "gateway" (the Cloud gateway sign-in). A session on a provider that is not listed is refused at startup, at login, and when it next contacts the API, with a message naming what selected the provider and the entry that would allow it. Under a list, where first-party traffic goes (ANTHROPIC_BASE_URL, a gateway sign-in) is honored only when the same managed source pins it in "env" (or forceLoginGatewayUrl), and a claude ssh tunnel into the machine is refused. A cloud provider's credential and tenancy variables, and the network path and TLS trust (HTTPS_PROXY, NODE_EXTRA_CA_CERTS, CLAUDE_CODE_CERT_STORE), are not judged by this list; set those for the fleet in the managed "env" block, whose values replace the user's. To route Bedrock through a gateway for a fleet, pin ANTHROPIC_BEDROCK_BASE_URL there (it is what the clients use, ahead of an endpoint_url in ~/.aws/config, which this list does not judge); the AWS SDK's AWS_ENDPOINT_URL* pins only sanction where the SDK's own clients go and never stand in for the "bedrock" entry. Unset allows every provider; an empty array allows none. Only a list in managed-settings.json or MDM is enforcement on the machine: it cannot be widened or hidden by server-managed settings and reaches every session. A list set only in the admin console reaches only sessions that fetch your server-managed settings — not a session on a cloud provider, another organization or a non-Anthropic ANTHROPIC_BASE_URL, one authenticating only with apiKeyHelper or ANTHROPIC_AUTH_TOKEN, a Pro/Max/Ultra login, --bare without an API key, or a first launch before the fetch lands — all conditions the user controls. Versions that predate this setting ignore it; pair it with a minimum-version policy on a mixed fleet. 'claude auth status' reports the Anthropic API as apiProvider "firstParty".
|
|
9411
9436
|
*/
|
|
@@ -9786,7 +9811,7 @@ export declare interface Settings {
|
|
|
9786
9811
|
*/
|
|
9787
9812
|
maxEffortLevel?: 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
9788
9813
|
/**
|
|
9789
|
-
* Auto-compact window for this model, in tokens (
|
|
9814
|
+
* Auto-compact window for this model, in tokens (at least 100000), or "auto" for the window tuned for the model. Within one settings file it replaces the top-level autoCompactWindow for the model. /autocompact saves here. The canonical model name as key also matches its dated, [1m], Bedrock and Vertex spellings.
|
|
9790
9815
|
*/
|
|
9791
9816
|
autoCompactWindow?: 'auto' | number;
|
|
9792
9817
|
[k: string]: unknown;
|
|
@@ -10046,6 +10071,8 @@ export declare interface Settings {
|
|
|
10046
10071
|
*/
|
|
10047
10072
|
precomputeCompactionEnabled?: boolean;
|
|
10048
10073
|
|
|
10074
|
+
|
|
10075
|
+
|
|
10049
10076
|
/**
|
|
10050
10077
|
* Set to false to stop Claude Code from compacting a long conversation while the session is idle. Defaults to true.
|
|
10051
10078
|
*/
|
|
@@ -10287,6 +10314,7 @@ export declare interface SpareProcess extends AsyncDisposable {
|
|
|
10287
10314
|
}>;
|
|
10288
10315
|
/** Settles when the spare's process exits, claimed or not — a parked spare that dies should be replaced. */
|
|
10289
10316
|
readonly exited: Promise<void>;
|
|
10317
|
+
|
|
10290
10318
|
/**
|
|
10291
10319
|
* Terminate the process. Before a claim this discards the spare (and
|
|
10292
10320
|
* rejects `claimed`); after one it is the same as closing the Query.
|