NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3768 most downloaded on npm
SDK for building AI agents with Claude Code's capabilities. Programmatically interact with Claude to build autonomous agents that can understand codebases, edit files, and execute workflows.
Last release today
03 Oct 2026
Ships on a steady schedule
a new release about every 8 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
313 releases · first in 2025
Updated to parity with Claude Code v2.1.289
npm install @anthropic-ai/claude-agent-sdk@0.3.289
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.289
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.289
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.289Updated to parity with Claude Code v2.1.288
npm install @anthropic-ai/claude-agent-sdk@0.3.288
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.288
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.288
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.288One column per month.
Added optional remote-session latency fields ( first_text_post_queue_wait_ms , first_text_post_queued_behind ) to the success result message
first_text_post_queue_wait_ms, first_text_post_queued_behind) to the success result messageincludePartialMessages streams sending a cut-short reply's message_stop late or never, so apps could show the reply as still in progresstoggleMcpServer() disabled the server or setMcpServers() removed itcommands_changed arriving before init, or twice, at session start: the initialize response now includes commands registered at startuptool_use_result for a WebFetch or WebSearch call that steps aside for a priority "now" message to { detachedToolCall: true }; the result follows in a later turntool_use_result for MCP tools: structuredContent over 1,048,576 JSON characters is left off and structuredContentOmitted: true set, except for SDK-server and MCP Apps toolsnpm install @anthropic-ai/claude-agent-sdk@0.3.287
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.287
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.287
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.287Added the initialize response field sdk_mcp_manifests_parked and the system/init capabilities sdk_mcp_manifests and sdk_mcp_tools_list_changed
sdk_mcp_manifests_parked and the system/init capabilities sdk_mcp_manifests and sdk_mcp_tools_list_changedtools or allowedToolstoggleMcpServer() not disconnecting, and failing to re-enable, an in-process MCP server created with createSdkMcpServer(), except one named claude-in-chromenow message to move running shell commands, agents and MCP calls to the background and join the running turn instead of stopping itpermissionMode to Claude Code, so a settings defaultMode now applies and, on third-party providers or with telemetry off, the session starts in auto mode like claude -p; pass permissionMode: 'default' for manual approvalsnpm install @anthropic-ai/claude-agent-sdk@0.3.286
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.286
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.286
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.286Added an optional read.title (the artifact's stored title) to the Artifact tool's structured read result
read.title (the artifact's stored title) to the Artifact tool's structured read resultprovider_not_allowed to startup_failure_reason and allowedProviders to the Settings typeCLAUDE_CODE_FORK_SUBAGENT=1: a subagent's own Agent call now runs in the foreground, so the subagent gets the child's resultgetSessionMessages() leaving out a message sent while Claude was working when the process stopped before the reply, or when another prompt followed it with no reply in betweentoggleMcpServer(name, false) leaving the connection open for a server that had not yet connected when the session started, or whose config was edited after it connectedrewind_conversation leaving a backgrounded MCP tool call running after the message that started it was removedtimeout to bound a run_in_background command (was ignored; default 30 min, max 2 h); the stopped task notification for a stop at that limit says whygetSubagentMessages() to also return the messages a subagent read while it ran, such as a message sent to it; offset and limit count these rowsnpm install @anthropic-ai/claude-agent-sdk@0.3.285
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.285
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.285
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.285Added a renamed skill's directory name to its SlashCommand aliases when the name is plain and Claude Code ships no command by that name
SlashCommand aliases when the name is plain and Claude Code ships no command by that nameapplied.ultracodeAvailable and applied.ultracodeRequested to getSettings(): whether this session can run Ultracode, and whether it is requested, independent of whether it is in effectforkSession() copies reading back the wrong history when cut at a progress row or fork briefing after a rewind, or when the session was compacted with some messages keptgetSessionMessages() leaving out messages from other agents, sessions and channels that the CLI transcript shows{ decision: 'block' } returned by Elicitation and ElicitationResult hook callbacks being ignored; it now declines the MCP elicitationquery() closing stdin before a follow-up turn woken by a finished background agent, which failed that turn's hooks, canUseTool and SDK MCP calls with "Stream closed"allowedTools or by an mcp_tool hook, even with CLAUDE_CODE_MCP_STARTUP_WAIT_MS set to 0applyFlagSettings({ ultracode: true }) to keep the current effort level instead of switching to xhigh; an effortLevel that changes the level without ultracode turns Ultracode offnpm install @anthropic-ai/claude-agent-sdk@0.3.284
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.284
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.284
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.284Added plugin_errors to the SDKSystemMessage type ( system/init ), including path for a --plugin-dir entry that did not load
plugin_errors to the SDKSystemMessage type (system/init), including path for a --plugin-dir entry that did not loadgetSessionMessages() returning, and forkSession() copying, a rewound-away branch when the newest branch ends at a meta row or a local command's rowssystem/informational messages; it previously dropped themset_max_thinking_tokens control request: omitting max_thinking_tokens now leaves the session's thinking budget unchanged; send null to reset it to the session defaultnpm install @anthropic-ai/claude-agent-sdk@0.3.283
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.283
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.283
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.283Added support for strictKnownMarketplaces and blockedMarketplaces in host-supplied managedSettings : the allowlist applies only where admin policy set
strictKnownMarketplaces and blockedMarketplaces in host-supplied managedSettings: the allowlist applies only where admin policy sets none; the blocklist adds to the admin's@anthropic-ai/claude-agent-sdk/core, a smaller entry point for apps that bundle the SDK (query, MCP tool helpers, session mutations, resolveSettings); it uses your installed zod and MCP SDKprewarm() and SpareProcess.claim() (alpha): start a Claude Code process before its session is known and bind it to a folder and its per-session options laterreadMcpResource() relaying content _meta keys under the CLI-reserved com.anthropic/ prefix; they are now dropped, as for tool resultsnpm install @anthropic-ai/claude-agent-sdk@0.3.282
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.282
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.282
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.282Added optional trigger , user_message_uuid and timestamp fields to the conversation_reset message so clients can tell what reset the conversation, mat
trigger, user_message_uuid and timestamp fields to the conversation_reset message so clients can tell what reset the conversation, match a /clear to its message, and show when the reset happenedclose()session_state_changed staying at requires_action after an overlapping permission prompt and sandbox network-access prompt were both answeredsdk.mjs no longer bundles unused dependencies (1.47 MB → 0.97 MB)query() sessions with in-process MCP servers (createSdkMcpServer) by running their handshake inside the SDK; initialize may now wait up to 250 ms for themSettings type's attribution field to boolean | {...}; TypeScript code that reads attribution.commit from returned settings needs a type narrownpm install @anthropic-ai/claude-agent-sdk@0.3.281
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.281
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.281
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.281Added optional fireReason to the task-notification SDKMessageOrigin ; a local host's declared scheduled-task fire is honored only in a process it star
fireReason to the task-notification SDKMessageOrigin; a local host's declared scheduled-task fire is honored only in a process it started with CLAUDE_CODE_HOST_SCHEDULED_RUN=1verbatimPrompts option: prompts are delivered as written — no @path expansion, no slash-command dispatch and, on current CLIs, no ambient attachments with the prompt (Claude Code 2.1.248+)_meta to mcpServerStatus() tool entries, carrying a tool's MCP Apps ui metadata so a host can find its ui:// resourcereadMcpResource() (alpha) to read an MCP Apps ui:// resource from an MCP server that Claude Code connectedaskSideQuestion(): asked while a turn is running, it now sees that turn (its prompt, replies and finished tool results so far) instead of only the last completed turnCLAUDE_CODE_RETRY_WATCHDOG): a usage-limit wait emits rate_limit_event (rejected, resetsAt) as it begins; api_retry heartbeats continue while sub-agent work waitssession_state_changed events (CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS=1) to report requires_action while an MCP elicitation waits on the user, as for permission promptsnpm install @anthropic-ai/claude-agent-sdk@0.3.280
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.280
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.280
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.280Updated to parity with Claude Code v2.1.278
npm install @anthropic-ai/claude-agent-sdk@0.3.278
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.278
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.278
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.278Added an optional builtin field to SlashCommand , set when a command is built into Claude Code
builtin field to SlashCommand, set when a command is built into Claude Codepasted_content to SDKUserMessage: text the user pasted rather than typed, appended after the typed promptfirst_text_post_ms, first_text_post_wall_ms, first_stream_post_queue_wait_ms, first_stream_post_queued_behind) to the success result message'userSettings' as an updateSettings() source, accepting only effortLevel, which is saved for the session's current model as /effort saves ittotal_cost_usd, modelUsage and get_usage totals starting at zero instead of continuing from the earlier turns (maxBudgetUsd is unchanged)SDKUsageReport usage rows to always carry severity and is_active: the report relays only rows from a live server reply, and none while the usage fetch is failingnpm install @anthropic-ai/claude-agent-sdk@0.3.277
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.277
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.277
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.277Updated to parity with Claude Code v2.1.276
npm install @anthropic-ai/claude-agent-sdk@0.3.276
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.276
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.276
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.276Fixed a deferred tool call's result being emitted with internal keys such as toolUseResult instead of tool_use_result when the tool re-runs at the sta
toolUseResult instead of tool_use_result when the tool re-runs at the start of a resumed turngetSessionMessages() and forkSession() sometimes missing a turn's assistant message when called right after the turn's result messageforkSession({ upToMessageId }) rejecting a client-supplied SDKUserMessage.uuid that is not in UUID formatforkSession rejecting the id that getSessionMessages returns for a message sent while Claude was working, and a fork showing a re-run prompt twicegetSessionMessages() omitting a task notification or other queued message that Claude read while running a tool; it now comes back where Claude read itnpm 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.275Added startup_failure_reason to the error result a stream-json run writes before exiting on a known startup failure
startup_failure_reason to the error result a stream-json run writes before exiting on a known startup failuremcpServer: {name, source} to canUseTool options, mcp_server to tool hook inputs, and source to MCP server status rows, so hosts can key trust on source === "sdk"CLAUDE_CODE_MCP_STARTUP_WAIT_MS (pass via env) to bound or disable (0) the first-turn wait for connecting MCP serversCLAUDE_CODE_EMIT_STARTUP_TIMING=1 for stream-json hosts: the session's first system/init then carries the per-phase startup_timing breakdown that cloud sessions already emitgetSessionMessages() omitting a message the user sent while Claude was running a tool; it now comes back as a user message where Claude read itorigin: {kind: 'task-notification'} on the replayed user message when a background task finishes during a running turn (--replay-user-messages)options.mcpServers servers are still awaitedresult, all but the last empty with num_turns: 0npm 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.274Added a usage_report sibling ( SDKUsageReport : session totals, the plan's usage rows as the server sends them, extra usage) on the assistant message
usage_report sibling (SDKUsageReport: session totals, the plan's usage rows as the server sends them, extra usage) on the assistant message that delivers a headless /usage resultreason: "worker_restart" to task_notification messages when a background task was stopped by a worker process restartStop or SessionStart hook callback times out, shown once until the host answers againStop, SubagentStop or SessionStart hook callback that exceeds its timeout being reported as a hook failure and discarding other hooks' decisions; it now counts as no decisionsystem/commands_changed)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.273Updated to parity with Claude Code v2.1.272
npm install @anthropic-ai/claude-agent-sdk@0.3.272
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.272
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.272
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.272Added optional omitClaudeMd to AgentDefinition in the agents option, so a subagent can run without user, project and local CLAUDE.md files; managed po
omitClaudeMd to AgentDefinition in the agents option, so a subagent can run without user, project and local CLAUDE.md files; managed policy files still loadlistSessions, getSessionMessages and getSessionInfo with dir on Windows not finding sessions for a directory on a mapped network drive or SUBST drivesessionStore resume losing the global config when it is stored under the legacy .config.json name or an OAuth-suffixed file namepersistent from the MonitorInput tool typenpm 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.271Updated to parity with Claude Code v2.1.270
npm install @anthropic-ai/claude-agent-sdk@0.3.270
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.270
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.270
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.270Changed user_message_uuid , user_message_uuids and resume_reason to be stamped on a turn's first complete assistant message as well as its first strea
user_message_uuid, user_message_uuids and resume_reason to be stamped on a turn's first complete assistant message as well as its first stream event when partial messages are onresult.permission_denials omitting Read, Edit and Write calls blocked by a path-scoped deny ruletool_use_id on task_started / task_notification when the CLI resumes a background subagent on its own; they now carry the agent's last call idcanUseTool even when allowDangerouslySkipPermissions is set; the flag now only enables switching to bypassPermissions laternpm 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.269Added result_index to result messages: the result's position in delivery order within the run, from 0
result_index to result messages: the result's position in delivery order within the run, from 0local_command to the result message of a turn that ran a slash command without entering the model loop, carrying the command's namehold_on_cache_impact to the reload_plugins control request (Query.reloadPlugins({ holdOnCacheImpact: true })): holds a reload that would invalidate the session's prompt cacheresume_reason to assistant, stream-event and result messages, set only on the automatic re-run of a turn a host restart interruptedkind (used, free, buffer, deferred) to each category in the get_context_usage control response, matching the /context result's context_usage rowsdefaultToNo and suppressAlwaysAllowRule hints to canUseTool options: the prompt should open on its decline option, or offer no persistent "always allow" choicesetModel() 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 unrecognizeduser_message_uuid on the automatic re-run of an interrupted turn to name that turn's last user promptinitialize success response to always include pending_permission_requests (empty when nothing is pending), so clients can tell that apart from an older CLItools/allowedToolsnpm 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.268Added getCcrEvent(query, message) and getSseLastSequenceNum(query) to the browser SDK's SSE transport, plus fromSequenceNum , onCatchUpTruncated and o
getCcrEvent(query, message) and getSseLastSequenceNum(query) to the browser SDK's SSE transport, plus fromSequenceNum, onCatchUpTruncated and onDeliveryUpdate SSE optionssystemPrompt recording to default on for custom prompts and appends (a mid-session prompt change takes effect at the next compaction); pass snapshot: false to keep per-request renderingnpm install @anthropic-ai/claude-agent-sdk@0.3.267
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.267
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.267
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.267Updated to parity with Claude Code v2.1.266
npm install @anthropic-ai/claude-agent-sdk@0.3.266
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.266
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.266
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.266Added user_message_uuid and user_message_uuids to a synthetic turn's first reply and result for a message sent with isSynthetic: true and a uuid , nam
user_message_uuid and user_message_uuids to a synthetic turn's first reply and result for a message sent with isSynthetic: true and a uuid, naming the message that started ituser_message_uuid and user_message_uuids to 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-turnuser_message_uuid missing from the success result of a turn that sent no API request, such as a slash commandcwd option at each new user message; a cd made by the agent now persists across turns, as in the interactive appuser_message_uuid to be set on the first reply after each change of the message a turn is answering, instead of on one reply frame per turnnpm 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.265Updated to parity with Claude Code v2.1.263
npm install @anthropic-ai/claude-agent-sdk@0.3.263
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.263
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.263
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.263Added pluginDelivery: 'initialize' to send plugins over stdin so the launch command line no longer grows with the plugin count (fixes Windows start fa
pluginDelivery: 'initialize' to send plugins over stdin so the launch command line no longer grows with the plugin count (fixes Windows start failures with many plugins)query() throwing "Object not disposable" in runtimes without a native Symbol.dispose, such as Node ≤22 vm contexts (Jest's node environment, vitest vmThreads/vmForks) and Node <18.18npm install @anthropic-ai/claude-agent-sdk@0.3.261
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.261
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.261
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.261Added optional user_message_uuid to thinking_tokens system messages, linking thinking progress to the user message that triggered the turn
user_message_uuid to thinking_tokens system messages, linking thinking progress to the user message that triggered the turnfirst_content_frame_ms, first_stream_post_ms, first_stream_post_ack_ms and first_stream_post_wall_ms fields to the success result message for remote-session latency breakdownsmanagedSettings disableAutoMode: "disable" (either spelling) being dropped by the restrictive-only filter instead of turning auto mode off for the spawned sessionrewindFiles() reporting success when no files could be restored (for example when checkpoint backups are missing); it now failserror_max_structured_output_retries results to append the last StructuredOutput tool error; validation errors now name the offending key, allowed values, and actual length or countrate_limit_event to 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 statenpm 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.260Added user_message_uuids beside user_message_uuid on a turn's first reply frame and result: every user message the turn answered, so a reply to severa
user_message_uuids beside user_message_uuid on 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 eachpermissionPrompts: 'none' option to auto-deny permission prompts in sessions with nobody to answer them, without disabling auto mode's classifiernpm install @anthropic-ai/claude-agent-sdk@0.3.259
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.259
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.259
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.259Updated to parity with Claude Code v2.1.258
npm install @anthropic-ai/claude-agent-sdk@0.3.258
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.258
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.258
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.258Added thinkingTokens to ModelUsage (a subset of outputTokens ), and fixed result-message usage.output_tokens_details.thinking_tokens reporting 0 inste
thinkingTokens to ModelUsage (a subset of outputTokens), and fixed result-message usage.output_tokens_details.thinking_tokens reporting 0 instead of the session's real counttool_use_result.resourceLinks on user messages carrying MCP tool results: the resource_link blocks the tool returned, so hosts can render returned files without parsing the result textresource_links to task_notification for an auto-backgrounded MCP tool call that completed, listing the files it returned by reference; join to the call via tool_use_idmcp_reconnect and mcp_toggle acting on a same-named .mcp.json / ~/.claude.json server instead of the --mcp-config or mcp_set_servers onemcp_toggle disable also removing the tools of a sibling MCP server whose name extends the disabled one's (disabling foo dropped foo__bar's tools)mcp_set_servers to also list a server whose connection attempt throws under added (with a failed row in mcp_status), not only under errorstool_progress heartbeat (heartbeat: true) like other long tools; heartbeat frames never clear a subagent_retry indicator@anthropic-ai/claude-agent-sdk/browser) never streaming any messages on engines without native Symbol.dispose (Safari/iOS, Firefox ESR, older Chromium)task_notification-p giving up on a long-running background subagent without actually stopping it, so background_tasks_changed kept listing it and events for it arrived after its stopped notificationdetail option to Query.getContextUsage(): 'summary' answers from the last response's usage and local estimates without per-category token-count API calls (default 'full')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.257Updated to parity with Claude Code v2.1.252
npm install @anthropic-ai/claude-agent-sdk@0.3.252
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.252
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.252
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.252Updated to parity with Claude Code v2.1.251
npm install @anthropic-ai/claude-agent-sdk@0.3.251
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.251
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.251
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.251Updated to parity with Claude Code v2.1.250
npm install @anthropic-ai/claude-agent-sdk@0.3.250
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.250
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.250
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.250Added a per-server timeout for SDK-hosted MCP servers ( createSdkMcpServer({ timeout }) ), overriding MCP_TOOL_TIMEOUT for that server's tool calls
timeout for SDK-hosted MCP servers (createSdkMcpServer({ timeout })), overriding MCP_TOOL_TIMEOUT for that server's tool callsnpm install @anthropic-ai/claude-agent-sdk@0.3.248
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.248
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.248
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.248Added an optional ambient flag to task_started , task_notification and background_tasks_changed task entries so hosts can exclude housekeeping tasks f
ambient flag to task_started, task_notification and background_tasks_changed task entries so hosts can exclude housekeeping tasks from activity indicatorspermissionMode on per-turn system/init frames reporting the mode at turn start instead of the live mode, so a mode switch right after submitting no longer sends a stale valuenpm install @anthropic-ai/claude-agent-sdk@0.3.247
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.247
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.247
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.247Added optional user_message_uuid to error result messages and to the first assistant message or stream_event of each turn, linking a reply or failure
user_message_uuid to error result messages and to the first assistant message or stream_event of each turn, linking a reply or failure to the user message that triggered itmodelUsage[*].costBasis ('list' | 'managed' | 'unknown') reporting which price table each model's costUSD was computed frommodelPricing support in the managedSettings option for hosts that set CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST; an admin-managed settings source that sets modelPricing still winsperTaskStopAffordance option: when set, interrupt() aborts only the current turn and keeps background agents and workflows running; otherwise (and for one-shot string prompts) they stopnpm 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.246Updated to parity with Claude Code v2.1.245
npm install @anthropic-ai/claude-agent-sdk@0.3.245
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.245
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.245
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.245chore: Update CHANGELOG.md
chore: Update CHANGELOG.md
queued_turn_count to result messages: the number of queued user sends still pending when the result was produced, so hosts know whether another turn and result will followmcp_status reporting a remote MCP server as connected after its connection dropped; it now reports pending while reconnecting, then connected or faileddisableAllHooks also disabling hook callbacks registered through the hooks option; they now keep running, matching allowManagedHooksOnlydocument block (or page image blocks for pages reads) now arrives inside the tool_result content instead of as a separate user message after itUpdated to parity with Claude Code v2.1.242
Updated to parity with Claude Code v2.1.241
npm install @anthropic-ai/claude-agent-sdk@0.3.241
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.241
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.241
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.241Updated to parity with Claude Code v2.1.240
npm install @anthropic-ai/claude-agent-sdk@0.3.240
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.240
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.240
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.240total_cost_usd / modelUsage.costUSD now include the 1.1× US-only-inference (data residency) multiplier when the response reports inference_geo: "us"
total_cost_usd / modelUsage.costUSD now include the 1.1× US-only-inference (data residency) multiplier when the response reports inference_geo: "us"total_cost_usd, duration_api_ms and modelUsage as of its release, not the turn-end snapshotSYSTEM_PROMPT_DYNAMIC_BOUNDARY in an array systemPrompt being sent to the model as literal text on Bedrock, Vertex, Foundry, and gateway providersinitialize on a running process is now followed by a background_tasks_changed snapshot of the live background tasks, so reconnecting hosts see work that is still runningnpm 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.239Added is_backgrounded and spawn_depth to task_started events for subagent tasks ( is_backgrounded also on background Bash tasks)
is_backgrounded and spawn_depth to task_started events for subagent tasks (is_backgrounded also on background Bash tasks)suppressOriginalPrompt to UserPromptExpansion hook output, matching UserPromptSubmitcommand_lifecycle state refused: a cross-session peer message the session's receive-side policy declines now reports this terminal state instead of producing no lifecycle framesinitialize to an already-running CLI; the response now reports hooks_appliedCLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true not keeping prompt_suggestion messages on when the account is near, but not over, its usage limitvcs_state_changed push events to emit one event per pushed branchnpm 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.238Updated to parity with Claude Code v2.1.237
npm install @anthropic-ai/claude-agent-sdk@0.3.237
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.237
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.237
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.237PostToolUse hooks can return hookSpecificOutput.classifierContext , a short host-asserted note about a tool call's result that the auto mode permissio
PostToolUse hooks can return hookSpecificOutput.classifierContext, a short host-asserted note about a tool call's result that the auto mode permission classifier reads alongside that resultnpm install @anthropic-ai/claude-agent-sdk@0.3.236
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.236
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.236
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.236Updated to parity with Claude Code v2.1.235
npm install @anthropic-ai/claude-agent-sdk@0.3.235
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.235
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.235
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.235Removed unused bypass_permissions_disabled from ExitReason type; the value was never emitted — TypeScript consumers with an explicit case branch get a
bypass_permissions_disabled from ExitReason type; the value was never emitted — TypeScript consumers with an explicit case branch get a compile error on upgrade (runtime unaffected)ApiKeySource type to include the values system/init actually reports (ANTHROPIC_API_KEY, apiKeyHelper, /login managed key, none)vcs_state_changed events report the directory the shell finished in (an inner cd is reflected)origin injected by the host may declare the sending session's permission class (fromMode) so a same-class message is delivered to a recipient that runs without askingSDKSystemMessage (system/init) gains an optional effort field: the session's applied effort level, or null when none is sent. Set on Remote Control bridge init framesnpm install @anthropic-ai/claude-agent-sdk@0.3.234
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.234
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.234
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.234Notification hooks now fire for pending permission prompts on the SDK path, matching the interactive REPL behavior
TaskCreate/TaskGet/TaskUpdate/TaskList, TodoWrite) are no longer in the default tool surface on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and newer models; name them in the tools option or reference them in allowedTools (or set CLAUDE_CODE_ENABLE_TODO_TOOLS=1) to keep themnpm install @anthropic-ai/claude-agent-sdk@0.3.233
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.233
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.233
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.233Subagent MCP tool_result frames whose result carries _meta now emit tool_use_result as { content, _meta } (matching main-loop frames) instead of a bar
tool_result frames whose result carries _meta now emit tool_use_result as { content, _meta } (matching main-loop frames) instead of a bare value/context result messages now carry a structured context_usage payload (new SDKContextUsage type), so consumers can render the context-usage card without parsing the markdown tablevcs_state_changed events now populate the branch field for push operations, sourced from the pushed refnpm install @anthropic-ai/claude-agent-sdk@0.3.232
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.232
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.232
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.232Updated to parity with Claude Code v2.1.231
npm install @anthropic-ai/claude-agent-sdk@0.3.231
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.231
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.231
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.231
Added terminal_slash_commands to the system init message so Remote Control clients can hide terminal-oriented commands
terminal_slash_commands to the system init message so Remote Control clients can hide terminal-oriented commandsterminal_reason "api_error" instead of "image_error"; StopFailure error_details is "request_body_over_limit: …"npm install @anthropic-ai/claude-agent-sdk@0.3.229
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.229
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.229
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.229
Agent tool results (AgentOutput): usage.output_tokens_details is now carried through
AgentOutput): usage.output_tokens_details is now carried throughnpm install @anthropic-ai/claude-agent-sdk@0.3.228
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.228
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.228
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.228
Updated to parity with Claude Code v2.1.227
npm install @anthropic-ai/claude-agent-sdk@0.3.227
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.227
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.227
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.227
Updated to parity with Claude Code v2.1.226
npm install @anthropic-ai/claude-agent-sdk@0.3.226
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.226
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.226
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.226
Fixed background subagents in headless/SDK sessions never resuming when a background shell command or Monitor they left running completed, so the suba
npm install @anthropic-ai/claude-agent-sdk@0.3.225
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.225
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.225
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.225
Added crossSessionInbound and dialogExpiry settings: cross-session messages sent to a session running with bypassed permissions are held for your appr
crossSessionInbound and dialogExpiry settings: cross-session messages sent to a session running with bypassed permissions are held for your approval, and messages to other sessions auto-deliversubkind: 'peer-send-message' to the task-notification member of SDKMessageOrigin, marking a notification raised by a cross-session SendMessagesource: 'archive' plugin config variant to Settings, with url and optional sha256, for installing plugins from a zip over HTTPSSettings: decode: 'jwt' with maskClaims, extract/onExtractNoMatch on envVars, and awsPairs/sigv4 for AWS SigV4 re-signing/resume no longer cross projectsnpm install @anthropic-ai/claude-agent-sdk@0.3.224
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.224
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.224
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.224
Added resumeDropsTurn option: with resumeSessionAt, declares the turn a truncating resume intends to drop; the CLI refuses the resume if anything else
resumeDropsTurn option: with resumeSessionAt, declares the turn a truncating resume intends to drop; the CLI refuses the resume if anything else would be discardedapi_error_status: 529, so SDK consumers can detect overload terminations structurally instead of matching message text-p / SDK query() without canUseTool) now emits system/permission_denied stream events when a tool call is auto-deniedusage vs modelUsage on stream-json results: usage is main-loop-only and per-turn; modelUsage is cumulative, covers all query-pipeline calls, and is the field for cost accountingnpm install @anthropic-ai/claude-agent-sdk@0.3.223
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.223
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.223
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.223
Fixed query({ sessionStore, resume }) not carrying user settings.json (apiKeyHelper, env, hooks, permissions) into the resumed subprocess
query({ sessionStore, resume }) not carrying user settings.json (apiKeyHelper, env, hooks, permissions) into the resumed subprocessnpm install @anthropic-ai/claude-agent-sdk@0.3.222
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.222
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.222
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.222
Improved skills option validation: malformed names (delimiters or control characters) and wildcard-form names are rejected with a clear error; use ski
skills option validation: malformed names (delimiters or control characters) and wildcard-form names are rejected with a clear error; use skills: 'all' to enable every skillmcpServers option not being connected before the first turn, which caused the model to emit tool calls as literal textnpm install @anthropic-ai/claude-agent-sdk@0.3.221
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.221
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.221
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.221
Updated to parity with Claude Code v2.1.220
npm install @anthropic-ai/claude-agent-sdk@0.3.220
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.220
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.220
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.220
Your coding agent can read these notes before it upgrades. Set up the MCP server →