@anthropic-ai/claude-agent-sdk
0.3.330 · 20 Nov 2026SEE LICENSE IN README.md20.7M / weekRepositorynpmAtom feed
351 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
0.3.275
17 Sep 2026Fixed a deferred tool call's result being emitted with internal keys such as
toolUseResultinstead oftool_use_resultwhen the tool re-runs at the start of a resumed turnFixed
getSessionMessages()andforkSession()sometimes missing a turn's assistant message when called right after the turn'sresultmessageFixed
forkSession({ upToMessageId })rejecting a client-suppliedSDKUserMessage.uuidthat is not in UUID format
What's changed
Fixed a deferred tool call's result being emitted with internal keys such as
toolUseResultinstead oftool_use_resultwhen the tool re-runs at the start of a resumed turnFixed
getSessionMessages()andforkSession()sometimes missing a turn's assistant message when called right after the turn'sresultmessageFixed
forkSession({ upToMessageId })rejecting a client-suppliedSDKUserMessage.uuidthat is not in UUID formatFixed
forkSessionrejecting the id thatgetSessionMessagesreturns for a message sent while Claude was working, and a fork showing a re-run prompt twiceFixed
getSessionMessages()omitting a task notification or other queued message that Claude read while running a tool; it now comes back where Claude read itUpdated to parity with Claude Code v2.1.275
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.275 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.275 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.275 # or bun add @anthropic-ai/claude-agent-sdk@0.3.275
0.3.274
16 Sep 2026Added
startup_failure_reasonto the error result a stream-json run writes before exiting on a known startup failureAdded
mcpServer: {name, source}tocanUseTooloptions,mcp_serverto tool hook inputs, andsourceto MCP server status rows, so hosts can key trust onsource === "sdk"Added
CLAUDE_CODE_MCP_STARTUP_WAIT_MS(pass viaenv) to bound or disable (0) the first-turn wait for connecting MCP servers
What's changed
Added
startup_failure_reasonto the error result a stream-json run writes before exiting on a known startup failureAdded
mcpServer: {name, source}tocanUseTooloptions,mcp_serverto tool hook inputs, andsourceto MCP server status rows, so hosts can key trust onsource === "sdk"Added
CLAUDE_CODE_MCP_STARTUP_WAIT_MS(pass viaenv) to bound or disable (0) the first-turn wait for connecting MCP serversAdded
CLAUDE_CODE_EMIT_STARTUP_TIMING=1for stream-json hosts: the session's firstsystem/initthen carries the per-phasestartup_timingbreakdown that cloud sessions already emitFixed
getSessionMessages()omitting a message the user sent while Claude was running a tool; it now comes back as a user message where Claude read itFixed missing
origin: {kind: 'task-notification'}on the replayed user message when a background task finishes during a running turn (--replay-user-messages)Improved startup: the first turn no longer waits up to 2s for connecting MCP servers from settings files or plugins whose tools tool search defers;
options.mcpServersservers are still awaitedChanged queued background-task completions to share one model call: each still gets its own
result, all but the last empty withnum_turns: 0Updated to parity with Claude Code v2.1.274
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.274 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.274 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.274 # or bun add @anthropic-ai/claude-agent-sdk@0.3.274
0.3.273
15 Sep 2026Added a
usage_reportsibling (SDKUsageReport: session totals, the plan's usage rows as the server sends them, extra usage) on the assistant message that delivers a headless/usageresultAdded
reason: "worker_restart"totask_notificationmessages when a background task was stopped by a worker process restartAdded a one-line transcript notice when the SDK host's
StoporSessionStarthook callback times out, shown once until the host answers again
What's changed
Added a
usage_reportsibling (SDKUsageReport: session totals, the plan's usage rows as the server sends them, extra usage) on the assistant message that delivers a headless/usageresultAdded
reason: "worker_restart"totask_notificationmessages when a background task was stopped by a worker process restartAdded a one-line transcript notice when the SDK host's
StoporSessionStarthook callback times out, shown once until the host answers againFixed a
Stop,SubagentStoporSessionStarthook callback that exceeds its timeout being reported as a hook failure and discarding other hooks' decisions; it now counts as no decisionFixed the browser SSE transport dropping the live slash-command list update (
system/commands_changed)Updated to parity with Claude Code v2.1.273
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.273 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.273 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.273 # or bun add @anthropic-ai/claude-agent-sdk@0.3.273
0.3.272
14 Sep 2026Updated to parity with Claude Code v2.1.272
0.3.271
14 Sep 2026Added optional
omitClaudeMdtoAgentDefinitionin theagentsoption, so a subagent can run without user, project and local CLAUDE.md files; managed policy files still loadFixed
listSessions,getSessionMessagesandgetSessionInfowithdiron Windows not finding sessions for a directory on a mapped network drive or SUBST driveFixed
sessionStoreresume losing the global config when it is stored under the legacy.config.jsonname or an OAuth-suffixed file name
What's changed
Added optional
omitClaudeMdtoAgentDefinitionin theagentsoption, so a subagent can run without user, project and local CLAUDE.md files; managed policy files still loadFixed
listSessions,getSessionMessagesandgetSessionInfowithdiron Windows not finding sessions for a directory on a mapped network drive or SUBST driveFixed
sessionStoreresume losing the global config when it is stored under the legacy.config.jsonname or an OAuth-suffixed file nameRemoved
persistentfrom theMonitorInputtool typeUpdated to parity with Claude Code v2.1.271
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.271 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.271 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.271 # or bun add @anthropic-ai/claude-agent-sdk@0.3.271
0.3.270
12 Sep 2026Updated to parity with Claude Code v2.1.270
0.3.269
11 Sep 2026Changed
user_message_uuid,user_message_uuidsandresume_reasonto be stamped on a turn's first complete assistant message as well as its first stream event when partial messages are onFixed
result.permission_denialsomitting Read, Edit and Write calls blocked by a path-scoped deny ruleFixed interrupts and permission responses being delayed while a host-started MCP server OAuth sign-in waited on a slow authorization server
What's changed
Changed
user_message_uuid,user_message_uuidsandresume_reasonto be stamped on a turn's first complete assistant message as well as its first stream event when partial messages are onFixed
result.permission_denialsomitting Read, Edit and Write calls blocked by a path-scoped deny ruleFixed interrupts and permission responses being delayed while a host-started MCP server OAuth sign-in waited on a slow authorization server
Fixed missing
tool_use_idontask_started/task_notificationwhen the CLI resumes a background subagent on its own; they now carry the agent's last call idChanged plan mode to route writes through
canUseTooleven whenallowDangerouslySkipPermissionsis set; the flag now only enables switching tobypassPermissionslaterUpdated to parity with Claude Code v2.1.269
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.269 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.269 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.269 # or bun add @anthropic-ai/claude-agent-sdk@0.3.269
0.3.268
10 Sep 2026Added
result_indexto result messages: the result's position in delivery order within the run, from 0Added
local_commandto the result message of a turn that ran a slash command without entering the model loop, carrying the command's nameAdded
hold_on_cache_impactto thereload_pluginscontrol request (Query.reloadPlugins({ holdOnCacheImpact: true })): holds a reload that would invalidate the session's prompt cache
What's changed
Added
result_indexto result messages: the result's position in delivery order within the run, from 0Added
local_commandto the result message of a turn that ran a slash command without entering the model loop, carrying the command's nameAdded
hold_on_cache_impactto thereload_pluginscontrol request (Query.reloadPlugins({ holdOnCacheImpact: true })): holds a reload that would invalidate the session's prompt cacheAdded
resume_reasonto assistant, stream-event and result messages, set only on the automatic re-run of a turn a host restart interruptedAdded
kind(used, free, buffer, deferred) to each category in theget_context_usagecontrol response, matching the/contextresult'scontext_usagerowsAdded optional
defaultToNoandsuppressAlwaysAllowRulehints tocanUseTooloptions: the prompt should open on its decline option, or offer no persistent "always allow" choiceChanged
setModel()to confirm a model id the CLI doesn't know locally with the API the first time a session uses it, instead of refusing it as unrecognizedChanged
user_message_uuidon the automatic re-run of an interrupted turn to name that turn's last user promptChanged the
initializesuccess response to always includepending_permission_requests(empty when nothing is pending), so clients can tell that apart from an older CLIChanged the task-tracking tools (TaskCreate/Get/Update/List, TodoWrite) to be default tools only on Claude 3.x, Opus 4.0–4.7, Sonnet 4.0–4.6 and Haiku 4.5; elsewhere list them in
tools/allowedToolsUpdated to parity with Claude Code v2.1.268
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.268 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.268 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.268 # or bun add @anthropic-ai/claude-agent-sdk@0.3.268
0.3.267
9 Sep 2026Added
getCcrEvent(query, message)andgetSseLastSequenceNum(query)to the browser SDK's SSE transport, plusfromSequenceNum,onCatchUpTruncatedandonDeliveryUpdateSSE optionsChanged
systemPromptrecording to default on for custom prompts and appends (a mid-session prompt change takes effect at the next compaction); passsnapshot: falseto keep per-request renderingUpdated to parity with Claude Code v2.1.267
0.3.266
8 Sep 2026Updated to parity with Claude Code v2.1.266
0.3.265
8 Sep 2026Added
user_message_uuidanduser_message_uuidsto a synthetic turn's first reply and result for a message sent withisSynthetic: trueand auuid, naming the message that started itAdded
user_message_uuidanduser_message_uuidsto the first reply and the result of a turn Claude Code started itself, such as a resume, naming the messages you sent that it picked up mid-turnFixed
user_message_uuidmissing from the success result of a turn that sent no API request, such as a slash command
What's changed
Added
user_message_uuidanduser_message_uuidsto a synthetic turn's first reply and result for a message sent withisSynthetic: trueand auuid, naming the message that started itAdded
user_message_uuidanduser_message_uuidsto the first reply and the result of a turn Claude Code started itself, such as a resume, naming the messages you sent that it picked up mid-turnFixed
user_message_uuidmissing from the success result of a turn that sent no API request, such as a slash commandFixed multi-turn sessions resetting the shell working directory to the
cwdoption at each new user message; acdmade by the agent now persists across turns, as in the interactive appChanged
user_message_uuidto be set on the first reply after each change of the message a turn is answering, instead of on one reply frame per turnUpdated to parity with Claude Code v2.1.265
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.265 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.265 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.265 # or bun add @anthropic-ai/claude-agent-sdk@0.3.265
0.3.263
6 Sep 2026Updated to parity with Claude Code v2.1.263
0.3.261
4 Sep 2026Added
pluginDelivery: 'initialize'to sendpluginsover stdin so the launch command line no longer grows with the plugin count (fixes Windows start failures with many plugins)Fixed
query()throwing "Object not disposable" in runtimes without a nativeSymbol.dispose, such as Node ≤22vmcontexts (Jest'snodeenvironment, vitestvmThreads/vmForks) and Node <18.18Updated to parity with Claude Code v2.1.261
0.3.260
3 Sep 2026Added optional
user_message_uuidtothinking_tokenssystem messages, linking thinking progress to the user message that triggered the turnAdded optional
first_content_frame_ms,first_stream_post_ms,first_stream_post_ack_msandfirst_stream_post_wall_msfields to the success result message for remote-session latency breakdownsFixed
rewindFiles()reporting success when no files could be restored (for example when checkpoint backups are missing); it now fails
What's changed
Added optional
user_message_uuidtothinking_tokenssystem messages, linking thinking progress to the user message that triggered the turnAdded optional
first_content_frame_ms,first_stream_post_ms,first_stream_post_ack_msandfirst_stream_post_wall_msfields to the success result message for remote-session latency breakdownsFixed
rewindFiles()reporting success when no files could be restored (for example when checkpoint backups are missing); it now failsChanged
error_max_structured_output_retriesresults to append the last StructuredOutput tool error; validation errors now name the offending key, allowed values, and actual length or countChanged
rate_limit_eventto also re-emit during an exceeded window on repeat 429s (about once per 30 seconds per limit window), so stream consumers can refresh stale rate-limit stateUpdated to parity with Claude Code v2.1.260
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.260 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.260 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.260 # or bun add @anthropic-ai/claude-agent-sdk@0.3.260
0.3.259
2 Sep 2026Added
user_message_uuidsbesideuser_message_uuidon a turn's first reply frame and result: every user message the turn answered, so a reply to several merged messages can be matched to eachAdded
permissionPrompts: 'none'option to auto-deny permission prompts in sessions with nobody to answer them, without disabling auto mode's classifierUpdated to parity with Claude Code v2.1.259
0.3.258
1 Sep 2026Updated to parity with Claude Code v2.1.258
0.3.257
1 Sep 2026Added
thinkingTokenstoModelUsage(a subset ofoutputTokens), and fixed result-messageusage.output_tokens_details.thinking_tokensreporting 0 instead of the session's real countAdded
tool_use_result.resourceLinkson user messages carrying MCP tool results: theresource_linkblocks the tool returned, so hosts can render returned files without parsing the result textAdded optional
resource_linkstotask_notificationfor an auto-backgrounded MCP tool call that completed, listing the files it returned by reference; join to the call viatool_use_id
What's changed
Added
thinkingTokenstoModelUsage(a subset ofoutputTokens), and fixed result-messageusage.output_tokens_details.thinking_tokensreporting 0 instead of the session's real countAdded
tool_use_result.resourceLinkson user messages carrying MCP tool results: theresource_linkblocks the tool returned, so hosts can render returned files without parsing the result textAdded optional
resource_linkstotask_notificationfor an auto-backgrounded MCP tool call that completed, listing the files it returned by reference; join to the call viatool_use_idFixed
mcp_reconnectandmcp_toggleacting on a same-named.mcp.json/~/.claude.jsonserver instead of the--mcp-configormcp_set_serversoneFixed
mcp_toggledisable also removing the tools of a sibling MCP server whose name extends the disabled one's (disablingfoodroppedfoo__bar's tools)Changed
mcp_set_serversto also list a server whose connection attempt throws underadded(with afailedrow inmcp_status), not only undererrorsChanged Agent tool calls to emit the periodic
tool_progressheartbeat (heartbeat: true) like other long tools; heartbeat frames never clear asubagent_retryindicatorFixed the browser SDK bundle (
@anthropic-ai/claude-agent-sdk/browser) never streaming any messages on engines without nativeSymbol.dispose(Safari/iOS, Firefox ESR, older Chromium)Fixed a background Bash task that is still running when a stream-json session ends right after an interrupt (stdin closed) never receiving its final
task_notificationFixed
-pgiving up on a long-running background subagent without actually stopping it, sobackground_tasks_changedkept listing it and events for it arrived after itsstoppednotificationAdded
detailoption toQuery.getContextUsage():'summary'answers from the last response's usage and local estimates without per-category token-count API calls (default'full')Updated to parity with Claude Code v2.1.257
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.257 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.257 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.257 # or bun add @anthropic-ai/claude-agent-sdk@0.3.257
0.3.252
31 Aug 2026Updated to parity with Claude Code v2.1.252
0.3.251
28 Aug 2026Updated to parity with Claude Code v2.1.251
0.3.250
27 Aug 2026Updated to parity with Claude Code v2.1.250
0.3.248
27 Aug 2026Added a per-server
timeoutfor SDK-hosted MCP servers (createSdkMcpServer({ timeout })), overridingMCP_TOOL_TIMEOUTfor that server's tool calls
0.3.247
26 Aug 2026Added an optional
ambientflag totask_started,task_notificationandbackground_tasks_changedtask entries so hosts can exclude housekeeping tasks from activity indicatorsFixed the
permissionModeon per-turnsystem/initframes reporting the mode at turn start instead of the live mode, so a mode switch right after submitting no longer sends a stale value
0.3.246
25 Aug 2026Added optional
user_message_uuidto error result messages and to the first assistant message orstream_eventof each turn, linking a reply or failure to the user message that triggered itAdded
modelUsage[*].costBasis('list' | 'managed' | 'unknown') reporting which price table each model'scostUSDwas computed fromAdded
modelPricingsupport in themanagedSettingsoption for hosts that setCLAUDE_CODE_PROVIDER_MANAGED_BY_HOST; an admin-managed settings source that setsmodelPricingstill wins
What's changed
Added optional
user_message_uuidto error result messages and to the first assistant message orstream_eventof each turn, linking a reply or failure to the user message that triggered itAdded
modelUsage[*].costBasis('list' | 'managed' | 'unknown') reporting which price table each model'scostUSDwas computed fromAdded
modelPricingsupport in themanagedSettingsoption for hosts that setCLAUDE_CODE_PROVIDER_MANAGED_BY_HOST; an admin-managed settings source that setsmodelPricingstill winsAdded
perTaskStopAffordanceoption: when set,interrupt()aborts only the current turn and keeps background agents and workflows running; otherwise (and for one-shot string prompts) they stop
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.246 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.246 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.246 # or bun add @anthropic-ai/claude-agent-sdk@0.3.246
0.3.245
25 Aug 2026Updated to parity with Claude Code v2.1.245
0.3.243
24 Aug 2026Added optional
queued_turn_countto result messages: the number of queued user sends still pending when the result was produced, so hosts know whether another turn and result will followFixed
mcp_statusreporting a remote MCP server as connected after its connection dropped; it now reports pending while reconnecting, then connected or failedFixed managed
disableAllHooksalso disabling hook callbacks registered through thehooksoption; they now keep running, matchingallowManagedHooksOnly
Added optional
queued_turn_countto result messages: the number of queued user sends still pending when the result was produced, so hosts know whether another turn and result will followFixed
mcp_statusreporting a remote MCP server as connected after its connection dropped; it now reports pending while reconnecting, then connected or failedFixed managed
disableAllHooksalso disabling hook callbacks registered through thehooksoption; they now keep running, matchingallowManagedHooksOnlyChanged Read tool PDF results: the
documentblock (or pageimageblocks forpagesreads) now arrives inside thetool_resultcontent instead of as a separateusermessage after itUpdated to parity with Claude Code v2.1.243
0.3.242
24 Aug 2026Updated to parity with Claude Code v2.1.242
0.3.241
22 Aug 2026Updated to parity with Claude Code v2.1.241
0.3.240
22 Aug 2026Updated to parity with Claude Code v2.1.240
0.3.239
21 Aug 2026total_cost_usd/modelUsage.costUSDnow include the 1.1× US-only-inference (data residency) multiplier when the response reportsinference_geo: "us"A result held back for background subagents in one-shot mode now reports
total_cost_usd,duration_api_msandmodelUsageas of its release, not the turn-end snapshotFixed
SYSTEM_PROMPT_DYNAMIC_BOUNDARYin an arraysystemPromptbeing sent to the model as literal text on Bedrock, Vertex, Foundry, and gateway providers
What's changed
total_cost_usd/modelUsage.costUSDnow include the 1.1× US-only-inference (data residency) multiplier when the response reportsinference_geo: "us"A result held back for background subagents in one-shot mode now reports
total_cost_usd,duration_api_msandmodelUsageas of its release, not the turn-end snapshotFixed
SYSTEM_PROMPT_DYNAMIC_BOUNDARYin an arraysystemPromptbeing sent to the model as literal text on Bedrock, Vertex, Foundry, and gateway providersA repeated
initializeon a running process is now followed by abackground_tasks_changedsnapshot of the live background tasks, so reconnecting hosts see work that is still running
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.239 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.239 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.239 # or bun add @anthropic-ai/claude-agent-sdk@0.3.239
0.3.238
20 Aug 2026Added
is_backgroundedandspawn_depthtotask_startedevents for subagent tasks (is_backgroundedalso on background Bash tasks)Added
suppressOriginalPrompttoUserPromptExpansionhook output, matchingUserPromptSubmitAdded
command_lifecyclestaterefused: a cross-session peer message the session's receive-side policy declines now reports this terminal state instead of producing no lifecycle frames
What's changed
Added
is_backgroundedandspawn_depthtotask_startedevents for subagent tasks (is_backgroundedalso on background Bash tasks)Added
suppressOriginalPrompttoUserPromptExpansionhook output, matchingUserPromptSubmitAdded
command_lifecyclestaterefused: a cross-session peer message the session's receive-side policy declines now reports this terminal state instead of producing no lifecycle framesFixed SDK hook callbacks silently not applying after a host re-sends
initializeto an already-running CLI; the response now reportshooks_appliedFixed
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=truenot keepingprompt_suggestionmessages on when the account is near, but not over, its usage limitChanged
vcs_state_changedpush events to emit one event per pushed branch
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.238 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.238 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.238 # or bun add @anthropic-ai/claude-agent-sdk@0.3.238
0.3.237
19 Aug 2026Reading the note…
0.3.236
19 Aug 2026Reading the note…
0.3.235
18 Aug 2026Reading the note…
0.3.234
17 Aug 2026Reading the note…
0.3.233
14 Aug 2026Reading the note…
0.3.232
13 Aug 2026Reading the note…
0.3.231
13 Aug 2026Reading the note…
0.3.229
12 Aug 2026Reading the note…
0.3.228
11 Aug 2026Reading the note…
0.3.227
10 Aug 2026Reading the note…
0.3.226
8 Aug 2026Reading the note…
0.3.225
7 Aug 2026Reading the note…
0.3.224
7 Aug 2026Reading the note…
0.3.223
5 Aug 2026Reading the note…
0.3.222
4 Aug 2026Reading the note…
0.3.221
3 Aug 2026Reading the note…
0.3.220
24 Jul 2026Reading the note…
0.3.219
24 Jul 2026Reading the note…
0.3.218
22 Jul 2026Reading the note…
0.3.217
21 Jul 2026Reading the note…
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.