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
Fixed options.env dropping CLAUDE_AGENT_SDK_VERSION (used for User-Agent and telemetry) when a custom environment is supplied, and corrected the Optio
options.env dropping CLAUDE_AGENT_SDK_VERSION (used for User-Agent and telemetry) when a custom environment is supplied, and corrected the Options.env docs to state that the value replaces the subprocess environment rather than merging with process.envnpm install @anthropic-ai/claude-agent-sdk@0.3.149
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.149
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.149
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.149
Updated to parity with Claude Code v2.1.148
npm install @anthropic-ai/claude-agent-sdk@0.3.148
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.148
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.148
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.148
One column per month.
Updated to parity with Claude Code v2.1.147
npm install @anthropic-ai/claude-agent-sdk@0.3.147
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.147
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.147
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.147
Updated to parity with Claude Code v2.1.146
npm install @anthropic-ai/claude-agent-sdk@0.3.146
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.146
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.146
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.146
Updated to parity with Claude Code v2.1.145
npm install @anthropic-ai/claude-agent-sdk@0.3.145
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.145
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.145
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.145
Assistant messages and StopFailure hooks now report error: 'model_not_found' when the selected model doesn't exist or isn't available, instead of the
StopFailure hooks now report error: 'model_not_found' when the selected model doesn't exist or isn't available, instead of the generic 'invalid_request'. The api_error_status field on result messages is now documented.@anthropic-ai/claude-agent-sdk/extract export for bun build --compile consumers: import the platform native binary with with { type: 'file' }, call extractFromBunfs(binPath) to copy it out of the compiled executable's virtual filesystem, and pass the result to options.pathToClaudeCodeExecutablenpm install @anthropic-ai/claude-agent-sdk@0.3.144
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.144
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.144
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.144
@anthropic-ai/sdk and @modelcontextprotocol/sdk are now peerDependencies instead of dependencies. Runtime is unaffected (both are bundled); npm/bun/pn
@anthropic-ai/sdk and @modelcontextprotocol/sdk are now peerDependencies instead of dependencies. Runtime is unaffected (both are bundled); npm/bun/pnpm auto-install them. yarn classic users should add them explicitly for full TypeScript type resolutionnpm install @anthropic-ai/claude-agent-sdk@0.3.143
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.143
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.143
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.143
…SDKSession, SDKSessionOptions), deprecated since 0.2.133. Use query() — pass an AsyncIterable for multi-turn, or options.resume to continue a session.
unstable_v2_createSession, unstable_v2_resumeSession, unstable_v2_prompt, SDKSession, SDKSessionOptions), deprecated since 0.2.133. Use query() — pass an AsyncIterable<SDKUserMessage> for multi-turn, or options.resume to continue a session.status: "pending" in init until ready. Set MCP_CONNECTION_NONBLOCKING=0 to restore the old behavior of waiting up to 5s before the first query, or mark a server alwaysLoad: true to require it in turn 1.TaskCreate / TaskUpdate / TaskGet / TaskList) instead of TodoWrite, deprecated since 0.2.136. Tool consumers should accumulate by task ID instead of replacing a snapshot list.request_id, subagent_type, and task_description on SDK message types and task system events--sdk-url sessions now exit non-zero with a stderr diagnostic when the remote transport closes permanently (401/403/404 or WS permanent close), instead of silently exiting 0npm install @anthropic-ai/claude-agent-sdk@0.3.142
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.142
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.142
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.142
TaskCreateInput, TaskCreateOutput, TaskGetInput, TaskGetOutput, TaskUpdateInput, TaskUpdateOutput, TaskListInput, and TaskListOutput types are now exp
TaskCreateInput, TaskCreateOutput, TaskGetInput, TaskGetOutput, TaskUpdateInput, TaskUpdateOutput, TaskListInput, and TaskListOutput types are now exported from @anthropic-ai/claude-agent-sdk/sdk-tools and included in the ToolInputSchemas/ToolOutputSchemas unions@anthropic-ai/sdk dependency to ^0.93.0npm install @anthropic-ai/claude-agent-sdk@0.2.141
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.141
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.141
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.141
Updated to parity with Claude Code v2.1.140
npm install @anthropic-ai/claude-agent-sdk@0.2.140
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.140
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.140
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.140
Updated to parity with Claude Code v2.1.139
npm install @anthropic-ai/claude-agent-sdk@0.2.139
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.139
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.139
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.139
Updated to parity with Claude Code v2.1.138
npm install @anthropic-ai/claude-agent-sdk@0.2.138
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.138
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.138
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.138
Updated to parity with Claude Code v2.1.137
npm install @anthropic-ai/claude-agent-sdk@0.2.137
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.137
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.137
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.137
Deprecated TodoWrite tool — future versions will switch to Task tools (TaskCreate, TaskGet, TaskUpdate, TaskList)
resolveSettings() (alpha) to inspect effective merged settings without spawning the Claude CLI; reads MDM (plist/HKLM/HKCU) for parity with CLI startupTodoWrite tool — future versions will switch to Task tools (TaskCreate, TaskGet, TaskUpdate, TaskList)npm install @anthropic-ai/claude-agent-sdk@0.2.136
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.136
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.136
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.136
Deprecated the unstable V2 session API (unstable_v2_createSession / unstable_v2_resumeSession / unstable_v2_prompt) — use query() instead
unstable_v2_createSession / unstable_v2_resumeSession / unstable_v2_prompt) — use query() instead'Skill' in allowedTools — use the skills option insteadnpm install @anthropic-ai/claude-agent-sdk@0.2.133
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.133
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.133
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.133
Documented applyFlagSettings() in the TypeScript Agent SDK reference and added support for null on top-level keys to clear flag-settings overrides
applyFlagSettings() in the TypeScript Agent SDK reference and added support for null on top-level keys to clear flag-settings overridesnpm install @anthropic-ai/claude-agent-sdk@0.2.132
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.132
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.132
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.132
Updated to parity with Claude Code v2.1.131
npm install @anthropic-ai/claude-agent-sdk@0.2.131
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.131
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.131
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.131
Updated to parity with Claude Code v2.1.129
npm install @anthropic-ai/claude-agent-sdk@0.2.129
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.129
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.129
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.129
Updated to parity with Claude Code v2.1.128
npm install @anthropic-ai/claude-agent-sdk@0.2.128
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.128
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.128
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.128
Added origin to result messages (SDKResultSuccess / SDKResultError) — forwards the triggering message's SDKMessageOrigin so consumers can distinguish
origin to result messages (SDKResultSuccess / SDKResultError) — forwards the triggering message's SDKMessageOrigin so consumers can distinguish user-prompted results from task-notification followupsnpm install @anthropic-ai/claude-agent-sdk@0.2.126
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.126
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.126
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.126
Updated to parity with Claude Code v2.1.124
Updated to parity with Claude Code v2.1.123
npm install @anthropic-ai/claude-agent-sdk@0.2.123
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.123
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.123
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.123
Updated to parity with Claude Code v2.1.122
npm install @anthropic-ai/claude-agent-sdk@0.2.122
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.122
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.122
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.122
Added updatedToolOutput to PostToolUseHookSpecificOutput for replacing tool output on all tools. updatedMCPToolOutput is deprecated.
updatedToolOutput to PostToolUseHookSpecificOutput for replacing tool output on all tools. updatedMCPToolOutput is deprecated.npm install @anthropic-ai/claude-agent-sdk@0.2.121
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.121
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.121
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.121
Added skills option (string[] | 'all') to control which Skills are loaded into the main session, matching the Python SDK
skills option (string[] | 'all') to control which Skills are loaded into the main session, matching the Python SDKexcludeDynamicSections now keeps static auto-memory instructions in the cacheable system-prompt block; only the per-user memory directory path and per
excludeDynamicSections now keeps static auto-memory instructions in the cacheable system-prompt block; only the per-user memory directory path and per-machine environment values are relocated to the first user messageSessionStore.append() failures are now retried up to 3 times with short backoff before the batch is dropped and mirror_error is emittednpm install @anthropic-ai/claude-agent-sdk@0.2.119
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.119
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.119
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.119
forwardSubagentText option to stream subagent text deltas to SDK consumersexcludeDynamicSections now keeps static auto-memory instructions in the cacheable system-prompt block; only the per-user memory directory path and per-machine environment values are relocated to the first user messageSessionStore.append() failures are now retried up to 3 times with short backoff before the batch is dropped and mirror_error is emittedAdded Options.managedSettings for embedders to pass policy-tier settings to the spawned CLI in-memory, honored below IT-controlled managed sources
Options.managedSettings for embedders to pass policy-tier settings to the spawned CLI in-memory, honored below IT-controlled managed sourcesnpm install @anthropic-ai/claude-agent-sdk@0.2.118
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.118
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.118
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.118
Updated to parity with Claude Code v2.1.117
npm install @anthropic-ai/claude-agent-sdk@0.2.117
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.117
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.117
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.117
Updated to parity with Claude Code v2.1.116
npm install @anthropic-ai/claude-agent-sdk@0.2.116
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.116
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.116
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.116
Updated to parity with Claude Code v2.1.114
npm install @anthropic-ai/claude-agent-sdk@0.2.114
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.114
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.114
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.114
Changed the SDK to spawn a native Claude Code binary (via a per-platform optional dependency) instead of bundled JavaScript
sessionStore option (alpha) to query() and session helpers for mirroring session transcripts to external storage, with SessionStore/SessionKey/SessionStoreEntry types, InMemorySessionStore reference implementation, and importSessionToStore() for migrating existing sessionsdeleteSession() for removing a session from disk or a SessionStoreSDKMirrorErrorMessage (subtype: 'mirror_error') to the SDKMessage union — emitted when a sessionStore.append() batch failsoptions.env once again replaces process.env for the CLI subprocess instead of overlaying it. To add or override individual variables, pass env: { ...process.env, MY_VAR: "x" }title option to query() — sets the session title and skips auto-generationnpm install @anthropic-ai/claude-agent-sdk@0.2.113
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.113
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.113
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.113
Updated to parity with Claude Code v2.1.112
npm install @anthropic-ai/claude-agent-sdk@0.2.112
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.112
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.112
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.112
Opus 4.7 is now available! This version of the SDK is required to use it.
mcp_set_servers control request: remote (http/sse) server entries can now carry per-tool permission_policy values, which are applied to the session's allow/deny rulesstartup() and WarmQuery are now part of the public TypeScript APIoptions.env to overlay the inherited process.env instead of replacing itnpm install @anthropic-ai/claude-agent-sdk@0.2.111
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.111
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.111
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.111
Fixed unstable_v2_createSession not respecting cwd, settingSources, and allowDangerouslySkipPermissions options
unstable_v2_createSession not respecting cwd, settingSources, and allowDangerouslySkipPermissions optionsshouldQuery field to SDKUserMessage — set to false to append a user message without triggering an assistant turn; fixed shouldQuery: false messages incorrectly triggering auto-title generation, prompt suggestions, and UserPromptSubmit hooksCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC and CLAUDE_CODE_DISABLE_TERMINAL_TITLEnpm install @anthropic-ai/claude-agent-sdk@0.2.110
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.110
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.110
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.110
Updated to parity with Claude Code v2.1.109
npm install @anthropic-ai/claude-agent-sdk@0.2.109
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.109
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.109
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.109
SDKStatus now includes 'requesting'; when includePartialMessages is enabled, a {type:'system', subtype:'status', status:'requesting'} message is emitt
SDKStatus now includes 'requesting'; when includePartialMessages is enabled, a {type:'system', subtype:'status', status:'requesting'} message is emitted before each API request in the streamnpm install @anthropic-ai/claude-agent-sdk@0.2.108
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.108
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.108
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.108
Updated to parity with Claude Code v2.1.107
npm install @anthropic-ai/claude-agent-sdk@0.2.107
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.107
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.107
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.107
Added system/memory_recall event and memory_paths on system/init for SDK renderers to surface memory operations
system/memory_recall event and memory_paths on system/init for SDK renderers to surface memory operationserror_max_structured_output_retries being emitted when the final retry attempt succeeded, discarding valid structured outputnpm install @anthropic-ai/claude-agent-sdk@0.2.105
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.105
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.105
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.105
Nothing published for this version
Security: bumped @anthropic-ai/sdk to ^0.81.0 and @modelcontextprotocol/sdk to ^1.29.0 to resolve GHSA-5474-4w2j-mq4c and transitive hono advisories
@anthropic-ai/sdk to ^0.81.0 and @modelcontextprotocol/sdk to ^1.29.0 to resolve GHSA-5474-4w2j-mq4c and transitive hono advisoriesawait using disposal raced its own cleanup callbackMaxListenersExceededWarning when running 11+ concurrent query() callsnpm install @anthropic-ai/claude-agent-sdk@0.2.101
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.101
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.101
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.101
Updated to parity with Claude Code v2.1.100
Updated to parity with Claude Code v2.1.98
npm install @anthropic-ai/claude-agent-sdk@0.2.98
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.98
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.98
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.98
Updated to parity with Claude Code v2.1.97
npm install @anthropic-ai/claude-agent-sdk@0.2.97
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.97
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.97
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.97
Updated to parity with Claude Code v2.1.96
npm install @anthropic-ai/claude-agent-sdk@0.2.96
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.96
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.96
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.96
Fixed getContextUsage() to include agents passed via options.agents in the agents breakdown
getContextUsage() to include agents passed via options.agents in the agents breakdownquery() session endsunhandledRejectionnpm install @anthropic-ai/claude-agent-sdk@0.2.94
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.94
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.94
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.94
Updated to parity with Claude Code v2.1.92
npm install @anthropic-ai/claude-agent-sdk@0.2.92
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.92
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.92
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.92
Added optional terminal_reason field to result messages, exposing why the query loop terminated (completed, aborted_tools, max_turns, blocking_limit,
terminal_reason field to result messages, exposing why the query loop terminated (completed, aborted_tools, max_turns, blocking_limit, etc.)'auto' to the public PermissionMode typesandbox option to default failIfUnavailable to true when enabled: true is passed — query() will emit an error result and exit if sandbox dependencies are missing, instead of silently running unsandboxed. Set failIfUnavailable: false to allow graceful degradation.npm install @anthropic-ai/claude-agent-sdk@0.2.91
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.91
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.91
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.91
Updated to parity with Claude Code v2.1.90
npm install @anthropic-ai/claude-agent-sdk@0.2.90
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.90
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.90
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.90
Added startup() to pre-warm the CLI subprocess before query(), making the first query ~20x faster when startup cost can be paid upfront
startup() to pre-warm the CLI subprocess before query(), making the first query ~20x faster when startup cost can be paid upfrontincludeSystemMessages option to getSessionMessages() to optionally include system messages in session historylistSubagents() and getSubagentMessages() functions to retrieve subagent conversation history from sessionsincludeHookEvents option to enable hook lifecycle messages (hook_started, hook_progress, hook_response) for all hook event typesERR_STREAM_WRITE_AFTER_END errors when single-turn queries with SDK MCP servers or hooks have control responses arriving after the result message.describe() metadata being dropped from createSdkMcpServer tool schemasside_question returning null on resume before the first turn completessettingSources empty array causing --setting-sources "" to consume the next CLI flagerror_during_execution, error_max_turns, error_max_budget_usd) to correctly set is_error: true with descriptive messagesnpm install @anthropic-ai/claude-agent-sdk@0.2.89
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.89
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.89
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.89
Updated to parity with Claude Code v2.1.87
npm install @anthropic-ai/claude-agent-sdk@0.2.87
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.87
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.87
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.87
Added getContextUsage() control method to retrieve a breakdown of context window usage by category
getContextUsage() control method to retrieve a breakdown of context window usage by categorysession_id optional in SDKUserMessage type — callers no longer need to provide a session ID when sending user messages, as the SDK assigns one automaticallyany by adding @anthropic-ai/sdk and @modelcontextprotocol/sdk as dependenciesnpm install @anthropic-ai/claude-agent-sdk@0.2.86
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.86
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.86
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.86
Added reloadPlugins() SDK method to reload plugins and receive refreshed commands, agents, and MCP server status
reloadPlugins() SDK method to reload plugins and receive refreshed commands, agents, and MCP server statuspermissionDecision: "ask" being ignored in SDK modenpm install @anthropic-ai/claude-agent-sdk@0.2.85
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.85
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.85
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.85
Added taskBudget option for API-side token budget awareness, allowing the model to pace tool use within a token limit
taskBudget option for API-side token budget awareness, allowing the model to pace tool use within a token limitenableChannel() method and capabilities field on McpServerStatus for SDK-driven MCP channel activationEffortLevel type ('low' | 'medium' | 'high' | 'max') for consumers to reference effort values directlynpm install @anthropic-ai/claude-agent-sdk@0.2.84
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.84
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.84
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.84
Added seed_read_state control subtype to seed readFileState with {path, mtime} so Edit works after the originating Read was removed from context
seed_read_state control subtype to seed readFileState with {path, mtime} so Edit works after the originating Read was removed from contextsession_state_changed events to opt-in: set CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS=1 to receive themnpm install @anthropic-ai/claude-agent-sdk@0.2.83
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.83
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.83
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.83
Fixed canUseTool not providing a working addRules suggestion when a write under .claude/skills/{name}/ hits the bypass-immune safety check
canUseTool not providing a working addRules suggestion when a write under .claude/skills/{name}/ hits the bypass-immune safety checknpm install @anthropic-ai/claude-agent-sdk@0.2.81
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.81
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.81
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.81
Fixed getSessionMessages() dropping parallel tool results — sessions with parallel tool calls now return all tool_use/tool_result pairs
getSessionMessages() dropping parallel tool results — sessions with parallel tool calls now return all tool_use/tool_result pairsnpm install @anthropic-ai/claude-agent-sdk@0.2.80
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.80
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.80
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.80
Added 'resume' to the ExitReason type for distinguishing resume-triggered session ends in hooks
'resume' to the ExitReason type for distinguishing resume-triggered session ends in hooksnpm install @anthropic-ai/claude-agent-sdk@0.2.79
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.79
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.79
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.79
Updated to parity with Claude Code v2.1.78
Added api_retry system messages when retrying transient API errors, exposing attempt count, max retries, delay, and error status
api_retry system messages when retrying transient API errors, exposing attempt count, max retries, delay, and error statusnpm install @anthropic-ai/claude-agent-sdk@0.2.77
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.77
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.77
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.77
Added forkSession(sessionId, opts?) for branching conversations from a point
forkSession(sessionId, opts?) for branching conversations from a pointcancel_async_message control subtype to drop a queued user message by UUID before executionplanFilePath field to ExitPlanMode tool input for hooks and SDK consumersSDKElicitationCompleteMessage system message for handling MCP server input requests programmaticallynpm install @anthropic-ai/claude-agent-sdk@0.2.76
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.76
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.76
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.76
Your coding agent can read these notes before it upgrades. Set up the MCP server →