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.
Latest stable
0.3.325
Last release 6 days ago
13 Nov 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
345 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
Updated 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.258
Added thinkingTokens to ModelUsage (a subset of outputTokens), and fixed result-message usage.output_tokens_details.thinking_tokens reporting 0 instea
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.257
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Updated 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.252
Updated 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.251
Updated 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.250
Added 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.248
Added an optional ambient flag to task_started, task_notification and background_tasks_changed task entries so hosts can exclude housekeeping tasks fr
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.247
Added 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.246
Updated 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.245
chore: 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.241
Updated 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.240
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 / 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.239
Added 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.238
Updated 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.237
PostToolUse hooks can return hookSpecificOutput.classifierContext, a short host-asserted note about a tool call's result that the auto mode permission
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.236
Updated 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.235
Removed 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.234
Notification 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.233
Subagent 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.232
Updated 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
Added opt-in cancel_queued to the interrupt control request (capability interrupt_cancel_queued_v1): cancels queued and pending-dispatch messages alon
cancel_queued to the interrupt control request (capability interrupt_cancel_queued_v1): cancels queued and pending-dispatch messages alongside the abortfast_mode_disabled_reason to result and init messages so SDK hosts can explain why fast mode is offDirectoryAdded lifecycle hook event to the control protocol, fired when a new working directory is registered mid-sessionfast_mode_state from the spawn-time model after a model switchsandbox.network.strictAllowlist to SDK settings types for deterministically denying non-allowlisted hosts in sandboxed commandsworkflowSizeGuideline to SDK settings types for setting the advisory dynamic-workflow size guidelinenpm install @anthropic-ai/claude-agent-sdk@0.3.219
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.219
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.219
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.219
SkillToolOutput now reports background: true when a forked skill was dispatched as a detached background agent
SkillToolOutput now reports background: true when a forked skill was dispatched as a detached background agentapi_error_status reporting null for rate-limit and overloaded errors delivered mid-stream; it now reports 429/529canonicalModel and provider to each modelUsage entry in result messages so downstream billing can look up the correct rate table for costUSDnpm install @anthropic-ai/claude-agent-sdk@0.3.218
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.218
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.218
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.218
Changed subagents to no longer spawn nested subagents by default (depth cap lowered from 5 to 1); set CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH to allow de
CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH to allow deeper nestingCLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS)npm install @anthropic-ai/claude-agent-sdk@0.3.217
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.217
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.217
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.217
Added optional skippedLinks count to rewindFiles responses for paths the rewind safety guards refused to restore or delete
skippedLinks count to rewindFiles responses for paths the rewind safety guards refused to restore or deletetool_result_meta sidecar to user messages (non_execution_kind, user_feedback) so consumers can classify denied, interrupted, or cancelled tool calls without string-matching result proseuser_message_uuid and request_sent_wall_ms fields to the success result message for cross-host request-latency correlationnpm install @anthropic-ai/claude-agent-sdk@0.3.216
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.216
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.216
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.216
Updated to parity with Claude Code v2.1.215
npm install @anthropic-ai/claude-agent-sdk@0.3.215
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.215
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.215
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.215
set_permission_mode now rejects unrecognized permission modes with an error instead of silently adopting them; the 'manual' alias is accepted at every
set_permission_mode now rejects unrecognized permission modes with an error instead of silently adopting them; the 'manual' alias is accepted at every ingresssubkind: 'scheduled-trigger' to the task-notification member of SDKMessageOrigin, marking deliveries that are the fired prompt of a user-configured scheduled taskapplyFlagSettings({effortLevel}) now accepts 'max' in its TypeScript type (runtime already supported it)interrupt() now carry aborted: true, so consumers can distinguish a mid-stream partial from a completed messagesubagent_type and subagent_retry fields to tool_progress messages so clients can show a subagent waiting out an API rate-limit retrysystem/init message's plugins entries and the reload_plugins response now include each plugin's manifest version"fork" instead of "resume" when the session begins as a forknpm install @anthropic-ai/claude-agent-sdk@0.3.214
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.214
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.214
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.214
Updated to parity with Claude Code v2.1.213
Fixed dash-leading resumeSessionAt and sessionId values being passed to the CLI as separate argv tokens; both now use equals-form (--flag=value)
resumeSessionAt and sessionId values being passed to the CLI as separate argv tokens; both now use equals-form (--flag=value)npm install @anthropic-ai/claude-agent-sdk@0.3.212
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.212
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.212
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.212
Fixed --replay-user-messages with --include-partial-messages emitting the turn-start user replay after the first content block instead of before the t
--replay-user-messages with --include-partial-messages emitting the turn-start user replay after the first content block instead of before the turn's content eventsSDKAssistantMessage.timestamp (ISO-8601) to the live stream, matching SDKUserMessage; older emitters omit it, consumers should fall back to receive timeUSAGE_LIMIT_ERROR_PREFIXES and siblings) as @alpha exports for classifying rate-limit messages without hand-mirrored listsnpm install @anthropic-ai/claude-agent-sdk@0.3.211
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.211
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.211
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.211
Added timedOutAfterMs to BashToolOutput, set when a command is auto-backgrounded on timeout
timedOutAfterMs to BashToolOutput, set when a command is auto-backgrounded on timeoutnpm install @anthropic-ai/claude-agent-sdk@0.3.210
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.210
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.210
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.210
Updated to parity with Claude Code v2.1.209
npm install @anthropic-ai/claude-agent-sdk@0.3.209
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.209
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.209
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.209
Fixed a caller abort during a pending SDK hook callback being converted into hook success, which let PreToolUse-gated tools execute after the abort
UserPromptSubmit hook callback exceeding its timeout killing the entire query with an empty error; it now blocks the prompt with a clear timeout message and the session continuesextraArgs values that look like flags (e.g. resume: '--version') being parsed as their own CLI flags; dash-leading values are now bound with equals-form argvAbortController no longer accumulate abort listeners on its signal after each completed querycreateSdkMcpServer docs pointing at a nonexistent env var; the MCP tool-call timeout knob is MCP_TOOL_TIMEOUTnpm install @anthropic-ai/claude-agent-sdk@0.3.208
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.208
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.208
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.208
Fixed canUseTool returning {behavior: 'allow'} without updatedInput being rejected as a deny with a raw ZodError message; the tool now runs with the o
canUseTool returning {behavior: 'allow'} without updatedInput being rejected as a deny with a raw ZodError message; the tool now runs with the original input per the documented contractAgentToolCompletedOutput) that matches the emitted object exactlynpm install @anthropic-ai/claude-agent-sdk@0.3.207
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.207
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.207
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.207
Added command_lifecycle frames to stream-json and SDK sessions, reporting each uuid-stamped message's terminal state (queued/started/completed/cancell
command_lifecycle frames to stream-json and SDK sessions, reporting each uuid-stamped message's terminal state (queued/started/completed/cancelled/discarded); zero-API results no longer report stale duration_api_msnpm install @anthropic-ai/claude-agent-sdk@0.3.206
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.206
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.206
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.206
Interrupt control responses now include still_queued (UUIDs of queued async messages that will still run), Query.interrupt() returns the typed receipt
still_queued (UUIDs of queued async messages that will still run), Query.interrupt() returns the typed receipt, and system/init advertises an interrupt_receipt_v1 capability for feature detectionname and body fields to peer-message session events, exposing the sender display name and decoded message bodynpm install @anthropic-ai/claude-agent-sdk@0.3.205
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.205
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.205
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.205
Updated to parity with Claude Code v2.1.204
npm install @anthropic-ai/claude-agent-sdk@0.3.204
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.204
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.204
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.204
terminal_reason values tool_deferred_unavailable (deferred tool resume found the tool gone — previously an is_error result with no reason, read as a clean completion by lifecycle sweeps) and turn_setup_failed (the turn-input builder threw before the turn started). Both classify as dead turns, so commands consumed by them report command_lifecycle state cancelledcancelled — on remote transports that acknowledged them as processed, silently dropping messages nobody cancelled)terminal_reason values api_error, malformed_tool_use_exhausted, budget_exhausted, and structured_output_retry_exhausted. Turns that die on an exhausted-API-retry or malformed-tool-use give-up previously reported completed; budget and structured-output exhaustion results previously omitted terminal_reason. Commands consumed by such turns now report command_lifecycle state cancelled instead of completed (dup-over-loss)Added a background_tasks_changed system message with the full set of live background tasks on every membership change, so consumers can track backgrou
background_tasks_changed system message with the full set of live background tasks on every membership change, so consumers can track background activity as a level instead of pairing task_started/task_notification edgessdk.d.ts with unresolved type references that broke consumer typechecking with skipLibCheck disablednpm install @anthropic-ai/claude-agent-sdk@0.3.203
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.203
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.203
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.203
Added parent_agent_id field to subagent session messages for building depth-2+ agent trees from disk-persisted metadata
parent_agent_id field to subagent session messages for building depth-2+ agent trees from disk-persisted metadataapply_flag_settings with a non-object settings value crashing the session instead of returning a control errornpm install @anthropic-ai/claude-agent-sdk@0.3.202
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.202
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.202
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.202
Updated to parity with Claude Code v2.1.201
npm install @anthropic-ai/claude-agent-sdk@0.3.201
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.201
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.201
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.201
Added 'manual' as an accepted alias for the 'default' permission mode in SDK inputs
'manual' as an accepted alias for the 'default' permission mode in SDK inputsonSetPermissionMode callback not firing for SDK-hosted Remote Control sessionsset_model control request accepting unrecognized model strings; invalid models are now rejected before latchingnpm install @anthropic-ai/claude-agent-sdk@0.3.200
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.200
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.200
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.200
Added requestId to canUseTool callback options for correlating out-of-band permission responses, and support for returning null to suppress the SDK's
requestId to canUseTool callback options for correlating out-of-band permission responses, and support for returning null to suppress the SDK's automatic control responseblocked field to workflow_agent progress events indicating when an agent was blocked by the auto-mode safety classifiermode:"mask" and per-credential injectHosts to sandbox.credentials settings types for injecting masked credentials into sandboxed commandsnpm install @anthropic-ai/claude-agent-sdk@0.3.199
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.199
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.199
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.199
Added a runtime warning when canUseTool is configured alongside allowedTools or bypassPermissions, which shadow the callback
canUseTool is configured alongside allowedTools or bypassPermissions, which shadow the callbackrequest_timeout_ms option to mcp_set_servers control requestSDKUserMessage.isSynthetic not being mapped to isMeta on ingestion, which could cause synthetic messages to be treated as real user messagesnpm install @anthropic-ai/claude-agent-sdk@0.3.198
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.198
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.198
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.198
Updated to parity with Claude Code v2.1.197
npm install @anthropic-ai/claude-agent-sdk@0.3.197
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.197
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.197
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.197
Added prompt_id field to hook input payloads for correlating hook events with OpenTelemetry prompt-level events
prompt_id field to hook input payloads for correlating hook events with OpenTelemetry prompt-level eventstool_result deliveries in long-running sessionsnpm install @anthropic-ai/claude-agent-sdk@0.3.196
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.196
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.196
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.196
Added Query.reinitialize() to re-send the initialize control request and redeliver pending permission/dialog prompts after a transport gap
Query.reinitialize() to re-send the initialize control request and redeliver pending permission/dialog prompts after a transport gapcommands_changed event not being emitted for synced skills when the skill list resolves before the change-detector subscribesnpm install @anthropic-ai/claude-agent-sdk@0.3.195
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.195
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.195
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.195
Added promptSuggestions option to Browser SDK query() to opt the remote CLI into emitting follow-up suggestions
promptSuggestions option to Browser SDK query() to opt the remote CLI into emitting follow-up suggestionsnpm install @anthropic-ai/claude-agent-sdk@0.3.193
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.193
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.193
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.193
Added old_source field to NotebookEdit tool results for replace and delete operations, enabling inline diffs
old_source field to NotebookEdit tool results for replace and delete operations, enabling inline diffsseven_day_overage_included to SDKRateLimitInfo.rateLimitType for per-model weekly usage limitsmodel_scoped array to usage response for per-model weekly limit windows with utilization and reset timessettingSources includes user/project settingsnpm install @anthropic-ai/claude-agent-sdk@0.3.191
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.191
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.191
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.191
Updated to parity with Claude Code v2.1.190
npm install @anthropic-ai/claude-agent-sdk@0.3.190
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.190
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.190
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.190
One column per month.