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.75
npm install @anthropic-ai/claude-agent-sdk@0.2.75
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.75
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.75
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.75
tag and createdAt fields to SDKSessionInfogetSessionInfo(sessionId, opts?) for single-session metadata lookupoffset option to listSessions for paginationtagSession(sessionId, tag, opts?) for tagging session filesqueued_to_running status to AgentToolOutput — returned when Agent({resume}) targets a still-running agentOne column per month.
Added renameSession(sessionId, title, opts?) for renaming session files
renameSession(sessionId, title, opts?) for renaming session filesimport type from @anthropic-ai/claude-agent-sdk/sdk-tools failing under NodeNext/Bundler module resolution (missing exports map entry since v0.2.69)user-invocable: false being included in supportedCommands() and the system:init message's slash_commands / skills listsnpm install @anthropic-ai/claude-agent-sdk@0.2.74
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.74
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.74
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.74
Fixed options.env being overridden by the ~/.claude/settings.json env block when not using user as a settingSources option
options.env being overridden by the ~/.claude/settings.json env block when not using user as a settingSources optionnpm install @anthropic-ai/claude-agent-sdk@0.2.73
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.73
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.73
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.73
Added agentProgressSummaries option to enable periodic AI-generated progress summaries for running subagents (foreground and background), emitted on t
agentProgressSummaries option to enable periodic AI-generated progress summaries for running subagents (foreground and background), emitted on task_progress events via the new summary fieldgetSettings() applied section with runtime-resolved model and effort valuestoggleMcpServer and reconnectMcpServer failing with "Server not found" for servers passed via query({mcpServers})npm install @anthropic-ai/claude-agent-sdk@0.2.72
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.72
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.72
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.72
Updated to parity with Claude Code v2.1.71
npm install @anthropic-ai/claude-agent-sdk@0.2.71
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.71
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.71
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.71
Fixed type: "http" MCP servers failing with HTTP 406 "Not Acceptable" on Streamable HTTP servers that strictly enforce the Accept: application/json, t
type: "http" MCP servers failing with HTTP 406 "Not Acceptable" on Streamable HTTP servers that strictly enforce the Accept: application/json, text/event-stream headerAgentToolInput.subagent_type to optional — defaults to the general-purpose agent when omittednpm install @anthropic-ai/claude-agent-sdk@0.2.70
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.70
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.70
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.70
Fixed breaking change: system:init and result events now emit 'Task' as the Agent tool name again (reverted from 'Agent', which was an unintentional b…
toolConfig.askUserQuestion.previewFormat option to configure the content format ('markdown' or 'html') for the preview field on AskUserQuestion tool options. The preview field and annotations output are now exposed in the public SDK types.supportsFastMode field to ModelInfo indicating whether a model supports fast modeagent_id (for subagents) and agent_type (for subagents and --agent) fields to hook eventssdkMcpServers in the initialize control request) getting disconnected when background plugin installation refreshes project MCP configsystem:init and result events now emit 'Task' as the Agent tool name again (reverted from 'Agent', which was an unintentional breaking change in a patch release). The wire name will migrate to 'Agent' in the next minor release.updatedPermissions from SDK hosts blocking tool calls with a ZodError; the invalid field is now stripped and a warning is logged instead.getSessionMessages() for large sessions with compacted historynpm install @anthropic-ai/claude-agent-sdk@0.2.69
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.69
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.69
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.69
Updated to parity with Claude Code v2.1.68
npm install @anthropic-ai/claude-agent-sdk@0.2.68
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.68
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.68
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.68
Updated to parity with Claude Code v2.1.66
npm install @anthropic-ai/claude-agent-sdk@0.2.66
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.66
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.66
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.66
Nothing published for this version
SDK: Fixed pathToClaudeCodeExecutable failing when set to a bare command name (e.g., "claude") that should resolve via PATH
pathToClaudeCodeExecutable failing when set to a bare command name (e.g., "claude") that should resolve via PATHsupportedAgents() method to the Query interface to view available subagentsnpm install @anthropic-ai/claude-agent-sdk@0.2.63
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.63
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.63
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.63
Nothing published for this version
Updated to parity with Claude Code v2.1.61
npm install @anthropic-ai/claude-agent-sdk@0.2.61
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.61
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.61
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.61
Added getSessionMessages() function for reading a session's conversation history from its transcript file, with support for pagination via limit and o
getSessionMessages() function for reading a session's conversation history from its transcript file, with support for pagination via limit and offset optionsnpm install @anthropic-ai/claude-agent-sdk@0.2.59
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.59
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.59
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.59
Updated to parity with Claude Code v2.1.58
npm install @anthropic-ai/claude-agent-sdk@0.2.58
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.58
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.58
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.58
Updated to parity with Claude Code v2.1.56
npm install @anthropic-ai/claude-agent-sdk@0.2.56
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.56
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.56
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.56
Updated to parity with Claude Code v2.1.55
npm install @anthropic-ai/claude-agent-sdk@0.2.55
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.55
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.55
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.55
Updated to parity with Claude Code v2.1.54
Added listSessions() for discovering and listing past sessions with light metadata
listSessions() for discovering and listing past sessions with light metadatanpm install @anthropic-ai/claude-agent-sdk@0.2.53
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.53
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.53
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.53
Updated to parity with Claude Code v2.1.52
npm install @anthropic-ai/claude-agent-sdk@0.2.52
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.52
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.52
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.52
Updated to parity with Claude Code v2.1.51
ReferenceError when used inside compiled Bun binaries (bun build --compile)task_progress events for real-time background agent progress reporting with cumulative usage metrics, tool counts, and durationsession.close() in the v2 session API killing the subprocess before it could persist session data, which broke resumeSession()npm install @anthropic-ai/claude-agent-sdk@0.2.51
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.51
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.51
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.51
Updated to parity with Claude Code v2.1.50
npm install @anthropic-ai/claude-agent-sdk@0.2.50
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.50
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.50
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.50
Updated to parity with Claude Code v2.1.49
supportsEffort, supportedEffortLevels, and supportsAdaptiveThinking fields so consumers can discover model capabilities.ConfigChange hook event that fires when configuration files change during a session, enabling enterprise security auditing and optional blocking of settings changes.npm install @anthropic-ai/claude-agent-sdk@0.2.49
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.49
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.49
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.49
Nothing published for this version
Updated to parity with Claude Code v2.1.47
promptSuggestion() method on Query to request prompt suggestions based on the current conversation contexttool_use_id field to task_notification events for correlating task completions with originating tool callsnpm install @anthropic-ai/claude-agent-sdk@0.2.47
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.47
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.47
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.47
Added support for Claude Sonnet 4.6
task_started system message to the SDK stream, emitted when subagent tasks are registeredSession.stream() returning prematurely when background subagents are still running, by holding back intermediate result messages until all tasks completenpm install @anthropic-ai/claude-agent-sdk@0.2.45
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.45
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.45
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.45
Updated to parity with Claude Code v2.1.44
npm install @anthropic-ai/claude-agent-sdk@0.2.44
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.44
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.44
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.44
Updated to parity with Claude Code v2.1.42
npm install @anthropic-ai/claude-agent-sdk@0.2.42
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.42
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.42
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.42
Updated to parity with Claude Code v2.1.41
npm install @anthropic-ai/claude-agent-sdk@0.2.41
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.41
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.41
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.41
Updated to parity with Claude Code v2.1.40
Updated to parity with Claude Code v2.1.39
npm install @anthropic-ai/claude-agent-sdk@0.2.39
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.39
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.39
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.39
Updated to parity with Claude Code v2.1.38
npm install @anthropic-ai/claude-agent-sdk@0.2.38
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.38
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.38
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.38
Updated to parity with Claude Code v2.1.37
npm install @anthropic-ai/claude-agent-sdk@0.2.37
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.37
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.37
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.37
Updated to parity with Claude Code v2.1.36
npm install @anthropic-ai/claude-agent-sdk@0.2.36
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.36
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.36
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.36
Updated to parity with Claude Code v2.1.34
npm install @anthropic-ai/claude-agent-sdk@0.2.34
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.34
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.34
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.34
Added TeammateIdle and TaskCompleted hook events with corresponding TeammateIdleHookInput and TaskCompletedHookInput types
TeammateIdle and TaskCompleted hook events with corresponding TeammateIdleHookInput and TaskCompletedHookInput typessessionId option to specify a custom UUID for conversations instead of auto-generated onesnpm install @anthropic-ai/claude-agent-sdk@0.2.33
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.33
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.33
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.33
Updated to parity with Claude Code v2.1.32
npm install @anthropic-ai/claude-agent-sdk@0.2.32
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.32
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.32
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.32
Added stop_reason field to SDKResultSuccess and SDKResultError to indicate why the model stopped generating
stop_reason field to SDKResultSuccess and SDKResultError to indicate why the model stopped generatingnpm install @anthropic-ai/claude-agent-sdk@0.2.31
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.31
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.31
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.31
Added debug and debugFile options for programmatic control of debug logging
debug and debugFile options for programmatic control of debug loggingpages field to FileReadToolInput for reading specific PDF page rangesparts output type to FileReadToolOutput for page-extracted PDF resultsnpm install @anthropic-ai/claude-agent-sdk@0.2.30
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.30
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.30
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.30
Updated to parity with Claude Code v2.1.29
npm install @anthropic-ai/claude-agent-sdk@0.2.29
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.29
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.29
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.29
Added listSessions function to discover resumable sessions by project, repo, or globally
listSessions function to discover resumable sessions by project, repo, or globallyannotations support to the tool() helper function for specifying MCP tool hints (readOnlyHint, destructiveHint, openWorldHint, idempotentHint)mcpServerStatus() to include tools from SDK and dynamically-added MCP serversnpm install @anthropic-ai/claude-agent-sdk@0.2.27
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.27
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.27
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.27
Nothing published for this version
Updated to parity with Claude Code v2.1.25
npm install @anthropic-ai/claude-agent-sdk@0.2.25
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.25
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.25
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.25
Fixed structured output validation errors not being reported correctly
npm install @anthropic-ai/claude-agent-sdk@0.2.23
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.23
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.23
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.23
Fixed structured outputs to handle empty assistant messsages
npm install @anthropic-ai/claude-agent-sdk@0.2.22
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.22
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.22
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.22
Added config, scope, and tools fields to McpServerStatus for richer server introspection
config, scope, and tools fields to McpServerStatus for richer server introspectionreconnectMcpServer() and toggleMcpServer() methods for managing MCP server connectionsdisabled status to McpServerStatusnpm install @anthropic-ai/claude-agent-sdk@0.2.21
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.21
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.21
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.21
Added support for loading CLAUDE.md files from directories specified via additionalDirectories option (requires setting CLAUDE_CODE_ADDITIONAL_DIRECTO
additionalDirectories option (requires setting CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 in the env option)CLAUDE_CODE_ENABLE_TASKS env var, set to true to opt into the new task systemnpm install @anthropic-ai/claude-agent-sdk@0.2.20
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.20
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.20
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.20
Added CLAUDE_CODE_ENABLE_TASKS env var, set to true to opt into the new task system
CLAUDE_CODE_ENABLE_TASKS env var, set to true to opt into the new task systemnpm install @anthropic-ai/claude-agent-sdk@0.2.19
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.19
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.19
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.19
Nothing published for this version
Updated to parity with Claude Code v2.1.17
npm install @anthropic-ai/claude-agent-sdk@0.2.17
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.17
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.17
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.17
Updated to parity with Claude Code v2.1.16
npm install @anthropic-ai/claude-agent-sdk@0.2.16
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.16
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.16
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.16
Added notification hook support
close() method to Query interface for forcefully terminating running queriesnpm install @anthropic-ai/claude-agent-sdk@0.2.15
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.15
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.15
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.15
Updated to parity with Claude Code v2.1.14
npm install @anthropic-ai/claude-agent-sdk@0.2.14
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.14
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.14
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.14
Updated to parity with Claude Code v2.1.12
npm install @anthropic-ai/claude-agent-sdk@0.2.12
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.12
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.12
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.12
Updated to parity with Claude Code v2.1.11
npm install @anthropic-ai/claude-agent-sdk@0.2.11
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.11
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.11
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.11
Added skills and maxTurns configuration options to custom agent definitions.
skills and maxTurns configuration options to custom agent definitions.Updated to parity with Claude Code v2.1.9
npm install @anthropic-ai/claude-agent-sdk@0.2.9
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.9
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.9
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.9
Updated to parity with Claude Code v2.1.8
Updated to parity with Claude Code v2.1.7
npm install @anthropic-ai/claude-agent-sdk@0.2.7
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.7
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.7
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.7
Updated to parity with Claude Code v2.1.6
claudeCodeVersion field to package.json for programmatically determining compatible CLI versionnpm install @anthropic-ai/claude-agent-sdk@0.2.6
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.6
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.6
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.6
Your coding agent can read these notes before it upgrades. Set up the MCP server →