PackageTrack

npm · #3768

@anthropic-ai/claude-agent-sdk

0.3.247anthropics/claude-agent-sdk-typescript

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.

Release timeline

279 releases since 2025
2026

Releases

  1. 0.2.10915 Apr 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.109

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.109
    Open source →
  2. 0.2.10814 Apr 2026
    Release notes

    What's changed

    • SDKStatus now includes 'requesting'; when includePartialMessages is enabled, a {type:'system', subtype:'status', status:'requesting'} message is emitted before each API request in the stream

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • SDKStatus now includes 'requesting'; when includePartialMessages is enabled, a {type:'system', subtype:'status', status:'requesting'} message is emitted before each API request in the stream
    Open source →
  3. 0.2.10714 Apr 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.107

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.107
    Open source →
  4. 0.2.10513 Apr 2026
    Release notes

    What's changed

    • Added system/memory_recall event and memory_paths on system/init for SDK renderers to surface memory operations
    • Fixed error_max_structured_output_retries being emitted when the final retry attempt succeeded, discarding valid structured output

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added system/memory_recall event and memory_paths on system/init for SDK renderers to surface memory operations
    • Fixed error_max_structured_output_retries being emitted when the final retry attempt succeeded, discarding valid structured output
    Open source →
  5. 0.2.10412 Apr 2026

    Nothing published for this version

  6. 0.2.10110 Apr 2026
    Release notes

    What's changed

    • 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
    • Fixed resume-session temp directory leaking on Windows when subprocess file handles weren't released before cleanup, and on macOS/APFS when await using disposal raced its own cleanup callback
    • Fixed MaxListenersExceededWarning when running 11+ concurrent query() calls

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • 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
    • Fixed resume-session temp directory leaking on Windows when subprocess file handles weren't released before cleanup, and on macOS/APFS when await using disposal raced its own cleanup callback
    • Fixed MaxListenersExceededWarning when running 11+ concurrent query() calls
    Open source →
  7. 0.2.10010 Apr 2026
    Release notes
    • Updated to parity with Claude Code v2.1.100
    Open source →
  8. 0.2.989 Apr 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.98

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.98
    Open source →
  9. 0.2.978 Apr 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.97

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.97
    Open source →
  10. 0.2.968 Apr 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.96

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.96
    Open source →
  11. 0.2.947 Apr 2026
    Release notes

    What's changed

    • Fixed getContextUsage() to include agents passed via options.agents in the agents breakdown
    • Fixed CJK and other multibyte text being corrupted with U+FFFD in stream-json input/output when chunk boundaries split a UTF-8 sequence
    • Fixed MCP server child processes not being cleaned up when an SDK query() session ends
    • Fixed a failed error-report write crashing the SDK process with unhandledRejection
    • Updated to parity with Claude Code v2.1.94

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Fixed getContextUsage() to include agents passed via options.agents in the agents breakdown
    • Fixed CJK and other multibyte text being corrupted with U+FFFD in stream-json input/output when chunk boundaries split a UTF-8 sequence
    • Fixed MCP server child processes not being cleaned up when an SDK query() session ends
    • Fixed a failed error-report write crashing the SDK process with unhandledRejection
    • Updated to parity with Claude Code v2.1.94
    Open source →
  12. 0.2.924 Apr 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.92

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.92
    Open source →
  13. 0.2.912 Apr 2026
    Release notes

    What's changed

    • Added optional terminal_reason field to result messages, exposing why the query loop terminated (completed, aborted_tools, max_turns, blocking_limit, etc.)
    • Added 'auto' to the public PermissionMode type
    • Changed sandbox 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.
    • Updated to parity with Claude Code v2.1.91

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added optional terminal_reason field to result messages, exposing why the query loop terminated (completed, aborted_tools, max_turns, blocking_limit, etc.)
    • Added 'auto' to the public PermissionMode type
    • Changed sandbox 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.
    • Updated to parity with Claude Code v2.1.91
    Open source →
  14. 0.2.901 Apr 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.90

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.90
    Open source →
  15. 0.2.8931 Mar 2026
    Release notes

    What's changed

    • Added startup() to pre-warm the CLI subprocess before query(), making the first query ~20x faster when startup cost can be paid upfront
    • Added includeSystemMessages option to getSessionMessages() to optionally include system messages in session history
    • Added listSubagents() and getSubagentMessages() functions to retrieve subagent conversation history from sessions
    • Added includeHookEvents option to enable hook lifecycle messages (hook_started, hook_progress, hook_response) for all hook event types
    • Fixed ERR_STREAM_WRITE_AFTER_END errors when single-turn queries with SDK MCP servers or hooks have control responses arriving after the result message
    • Fixed Zod v4 field .describe() metadata being dropped from createSdkMcpServer tool schemas
    • Fixed side_question returning null on resume before the first turn completes
    • Fixed settingSources empty array causing --setting-sources "" to consume the next CLI flag
    • Fixed error result messages (error_during_execution, error_max_turns, error_max_budget_usd) to correctly set is_error: true with descriptive messages
    • Fixed MCP servers getting permanently stuck in a failed state after a connection race — they now retry on the next message

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added startup() to pre-warm the CLI subprocess before query(), making the first query ~20x faster when startup cost can be paid upfront
    • Added includeSystemMessages option to getSessionMessages() to optionally include system messages in session history
    • Added listSubagents() and getSubagentMessages() functions to retrieve subagent conversation history from sessions
    • Added includeHookEvents option to enable hook lifecycle messages (hook_started, hook_progress, hook_response) for all hook event types
    • Fixed ERR_STREAM_WRITE_AFTER_END errors when single-turn queries with SDK MCP servers or hooks have control responses arriving after the result message
    • Fixed Zod v4 field .describe() metadata being dropped from createSdkMcpServer tool schemas
    • Fixed side_question returning null on resume before the first turn completes
    • Fixed settingSources empty array causing --setting-sources "" to consume the next CLI flag
    • Fixed error result messages (error_during_execution, error_max_turns, error_max_budget_usd) to correctly set is_error: true with descriptive messages
    • Fixed MCP servers getting permanently stuck in a failed state after a connection race — they now retry on the next message
    Open source →
  16. 0.2.8729 Mar 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.87

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.87
    Open source →
  17. 0.2.8627 Mar 2026
    Release notes

    What's changed

    • Added getContextUsage() control method to retrieve a breakdown of context window usage by category
    • Made session_id optional in SDKUserMessage type — callers no longer need to provide a session ID when sending user messages, as the SDK assigns one automatically
    • Fixed TypeScript types resolving to any by adding @anthropic-ai/sdk and @modelcontextprotocol/sdk as dependencies
    • Updated to parity with Claude Code v2.1.86

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added getContextUsage() control method to retrieve a breakdown of context window usage by category
    • Made session_id optional in SDKUserMessage type — callers no longer need to provide a session ID when sending user messages, as the SDK assigns one automatically
    • Fixed TypeScript types resolving to any by adding @anthropic-ai/sdk and @modelcontextprotocol/sdk as dependencies
    • Updated to parity with Claude Code v2.1.86
    Open source →
  18. 0.2.8526 Mar 2026
    Release notes

    What's changed

    • Added reloadPlugins() SDK method to reload plugins and receive refreshed commands, agents, and MCP server status
    • Fixed PreToolUse hooks with permissionDecision: "ask" being ignored in SDK mode
    • Updated to parity with Claude Code v2.1.85

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added reloadPlugins() SDK method to reload plugins and receive refreshed commands, agents, and MCP server status
    • Fixed PreToolUse hooks with permissionDecision: "ask" being ignored in SDK mode
    • Updated to parity with Claude Code v2.1.85
    Open source →
  19. 0.2.8426 Mar 2026
    Release notes

    What's changed

    • Added taskBudget option for API-side token budget awareness, allowing the model to pace tool use within a token limit
    • Added enableChannel() method and capabilities field on McpServerStatus for SDK-driven MCP channel activation
    • Exported EffortLevel type ('low' | 'medium' | 'high' | 'max') for consumers to reference effort values directly
    • Fixed showing "[Request interrupted by user]" for errors that were not caused by user interruption
    • Updated to parity with Claude Code v2.1.84

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added taskBudget option for API-side token budget awareness, allowing the model to pace tool use within a token limit
    • Added enableChannel() method and capabilities field on McpServerStatus for SDK-driven MCP channel activation
    • Exported EffortLevel type ('low' | 'medium' | 'high' | 'max') for consumers to reference effort values directly
    • Fixed showing "[Request interrupted by user]" for errors that were not caused by user interruption
    • Updated to parity with Claude Code v2.1.84
    Open source →
  20. 0.2.8325 Mar 2026
    Release notes

    What's changed

    • Added seed_read_state control subtype to seed readFileState with {path, mtime} so Edit works after the originating Read was removed from context
    • Changed session_state_changed events to opt-in: set CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS=1 to receive them
    • Updated to parity with Claude Code v2.1.83

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added seed_read_state control subtype to seed readFileState with {path, mtime} so Edit works after the originating Read was removed from context
    • Changed session_state_changed events to opt-in: set CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS=1 to receive them
    • Updated to parity with Claude Code v2.1.83
    Open source →
  21. 0.2.8120 Mar 2026
    Release notes

    What's changed

    • Fixed canUseTool not providing a working addRules suggestion when a write under .claude/skills/{name}/ hits the bypass-immune safety check
    • Updated to parity with Claude Code v2.1.81

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Fixed canUseTool not providing a working addRules suggestion when a write under .claude/skills/{name}/ hits the bypass-immune safety check
    • Updated to parity with Claude Code v2.1.81
    Open source →
  22. 0.2.8019 Mar 2026
    Release notes

    What's changed

    • Fixed getSessionMessages() dropping parallel tool results — sessions with parallel tool calls now return all tool_use/tool_result pairs
    • Updated to parity with Claude Code v2.1.80

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Fixed getSessionMessages() dropping parallel tool results — sessions with parallel tool calls now return all tool_use/tool_result pairs
    • Updated to parity with Claude Code v2.1.80
    Open source →
  23. 0.2.7918 Mar 2026
    Release notes

    What's changed

    • Added 'resume' to the ExitReason type for distinguishing resume-triggered session ends in hooks
    • Updated to parity with Claude Code v2.1.79

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added 'resume' to the ExitReason type for distinguishing resume-triggered session ends in hooks
    • Updated to parity with Claude Code v2.1.79
    Open source →
  24. 0.2.7817 Mar 2026
    Release notes
    • Updated to parity with Claude Code v2.1.78
    Open source →
  25. 0.2.7716 Mar 2026
    Release notes

    What's changed

    • Added api_retry system messages when retrying transient API errors, exposing attempt count, max retries, delay, and error status
    • Updated to parity with Claude Code v2.1.77

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added api_retry system messages when retrying transient API errors, exposing attempt count, max retries, delay, and error status
    • Updated to parity with Claude Code v2.1.77
    Open source →
  26. 0.2.7614 Mar 2026
    Release notes

    What's changed

    • Added forkSession(sessionId, opts?) for branching conversations from a point
    • Added cancel_async_message control subtype to drop a queued user message by UUID before execution
    • Added planFilePath field to ExitPlanMode tool input for hooks and SDK consumers
    • Added MCP elicitation hook types and SDKElicitationCompleteMessage system message for handling MCP server input requests programmatically
    • Updated to parity with Claude Code v2.1.76

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added forkSession(sessionId, opts?) for branching conversations from a point
    • Added cancel_async_message control subtype to drop a queued user message by UUID before execution
    • Added planFilePath field to ExitPlanMode tool input for hooks and SDK consumers
    • Added MCP elicitation hook types and SDKElicitationCompleteMessage system message for handling MCP server input requests programmatically
    • Updated to parity with Claude Code v2.1.76
    Open source →
  27. 0.2.7513 Mar 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.75

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added tag and createdAt fields to SDKSessionInfo
    • Added getSessionInfo(sessionId, opts?) for single-session metadata lookup
    • Added offset option to listSessions for pagination
    • Added tagSession(sessionId, tag, opts?) for tagging session files
    • Added queued_to_running status to AgentToolOutput — returned when Agent({resume}) targets a still-running agent
    • Improved error messages when the Claude Code subprocess returns an error result — the SDK now surfaces the actual error text instead of a generic "process exited with code 1"
    • Updated to parity with Claude Code v2.1.75
    Open source →
  28. 0.2.7412 Mar 2026
    Release notes

    What's changed

    • Added renameSession(sessionId, title, opts?) for renaming session files
    • Fixed import type from @anthropic-ai/claude-agent-sdk/sdk-tools failing under NodeNext/Bundler module resolution (missing exports map entry since v0.2.69)
    • Fixed skills with user-invocable: false being included in supportedCommands() and the system:init message's slash_commands / skills lists
    • Updated to parity with Claude Code v2.1.74

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added renameSession(sessionId, title, opts?) for renaming session files
    • Fixed import type from @anthropic-ai/claude-agent-sdk/sdk-tools failing under NodeNext/Bundler module resolution (missing exports map entry since v0.2.69)
    • Fixed skills with user-invocable: false being included in supportedCommands() and the system:init message's slash_commands / skills lists
    • Updated to parity with Claude Code v2.1.74
    Open source →
  29. 0.2.7311 Mar 2026
    Release notes

    What's changed

    • Fixed options.env being overridden by the ~/.claude/settings.json env block when not using user as a settingSources option
    • Updated to parity with Claude Code v2.1.73

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Fixed options.env being overridden by the ~/.claude/settings.json env block when not using user as a settingSources option
    • Updated to parity with Claude Code v2.1.73
    Open source →
  30. 0.2.7210 Mar 2026
    Release notes

    What's changed

    • Added agentProgressSummaries option to enable periodic AI-generated progress summaries for running subagents (foreground and background), emitted on task_progress events via the new summary field
    • Added getSettings() applied section with runtime-resolved model and effort values
    • Fixed toggleMcpServer and reconnectMcpServer failing with "Server not found" for servers passed via query({mcpServers})
    • Updated to parity with Claude Code v2.1.72

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added agentProgressSummaries option to enable periodic AI-generated progress summaries for running subagents (foreground and background), emitted on task_progress events via the new summary field
    • Added getSettings() applied section with runtime-resolved model and effort values
    • Fixed toggleMcpServer and reconnectMcpServer failing with "Server not found" for servers passed via query({mcpServers})
    • Updated to parity with Claude Code v2.1.72
    Open source →
  31. 0.2.716 Mar 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.71

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.71
    Open source →
  32. 0.2.706 Mar 2026
    Release notes

    What's changed

    • Fixed type: "http" MCP servers failing with HTTP 406 "Not Acceptable" on Streamable HTTP servers that strictly enforce the Accept: application/json, text/event-stream header
    • Changed AgentToolInput.subagent_type to optional — defaults to the general-purpose agent when omitted
    • Updated to parity with Claude Code v2.1.70

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Fixed type: "http" MCP servers failing with HTTP 406 "Not Acceptable" on Streamable HTTP servers that strictly enforce the Accept: application/json, text/event-stream header
    • Changed AgentToolInput.subagent_type to optional — defaults to the general-purpose agent when omitted
    • Updated to parity with Claude Code v2.1.70
    Open source →
  33. 0.2.695 Mar 2026
    Release notes

    What's changed

    • Added 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.
    • Added supportsFastMode field to ModelInfo indicating whether a model supports fast mode
    • Added agent_id (for subagents) and agent_type (for subagents and --agent) fields to hook events
    • Fixed SDK-mode MCP servers (registered via sdkMcpServers in the initialize control request) getting disconnected when background plugin installation refreshes project MCP config
    • Fixed breaking change: system: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.
    • Fixed control responses with malformed updatedPermissions from SDK hosts blocking tool calls with a ZodError; the invalid field is now stripped and a warning is logged instead.
    • Improved memory usage of getSessionMessages() for large sessions with compacted history

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added 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.
    • Added supportsFastMode field to ModelInfo indicating whether a model supports fast mode
    • Added agent_id (for subagents) and agent_type (for subagents and --agent) fields to hook events
    • Fixed SDK-mode MCP servers (registered via sdkMcpServers in the initialize control request) getting disconnected when background plugin installation refreshes project MCP config
    • Fixed breaking change: system: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.
    • Fixed control responses with malformed updatedPermissions from SDK hosts blocking tool calls with a ZodError; the invalid field is now stripped and a warning is logged instead.
    • Improved memory usage of getSessionMessages() for large sessions with compacted history
    Open source →
  34. 0.2.684 Mar 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.68

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.68
    Open source →
  35. 0.2.664 Mar 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.66

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.66
    Open source →
  36. 0.2.643 Mar 2026

    Nothing published for this version

  37. 0.2.6328 Feb 2026
    Release notes

    What's changed

    • SDK: Fixed pathToClaudeCodeExecutable failing when set to a bare command name (e.g., "claude") that should resolve via PATH
    • Added supportedAgents() method to the Query interface to view available subagents
    • Fixed MCP replacement tools being incorrectly denied in subagents when using unprefixed MCP tool names

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • SDK: Fixed pathToClaudeCodeExecutable failing when set to a bare command name (e.g., "claude") that should resolve via PATH
    • Added supportedAgents() method to the Query interface to view available subagents
    • Fixed MCP replacement tools being incorrectly denied in subagents when using unprefixed MCP tool names
    Open source →
  38. 0.2.6227 Feb 2026

    Nothing published for this version

  39. 0.2.6126 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.61

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.61
    Open source →
  40. 0.2.5926 Feb 2026
    Release notes

    What's changed

    • Added getSessionMessages() function for reading a session's conversation history from its transcript file, with support for pagination via limit and offset options

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added getSessionMessages() function for reading a session's conversation history from its transcript file, with support for pagination via limit and offset options
    Open source →
  41. 0.2.5825 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.58

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.58
    Open source →
  42. 0.2.5625 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.56

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.56
    Open source →
  43. 0.2.5525 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.55

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.55
    Open source →
  44. 0.2.5425 Feb 2026
    Release notes
    • Updated to parity with Claude Code v2.1.54
    Open source →
  45. 0.2.5324 Feb 2026
    Release notes

    What's changed

    • Added listSessions() for discovering and listing past sessions with light metadata

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added listSessions() for discovering and listing past sessions with light metadata
    Open source →
  46. 0.2.5224 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.52

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.52
    Open source →
  47. 0.2.5124 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.51
    • Fixed SDK crashing with ReferenceError when used inside compiled Bun binaries (bun build --compile)
    • Fixed unbounded memory growth in long-running SDK sessions caused by message UUID tracking never evicting old entries
    • Fixed local slash command output not being returned to SDK clients
    • Added task_progress events for real-time background agent progress reporting with cumulative usage metrics, tool counts, and duration
    • Fixed session.close() in the v2 session API killing the subprocess before it could persist session data, which broke resumeSession()

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.51
    • Fixed SDK crashing with ReferenceError when used inside compiled Bun binaries (bun build --compile)
    • Fixed unbounded memory growth in long-running SDK sessions caused by message UUID tracking never evicting old entries
    • Fixed local slash command output not being returned to SDK clients
    • Added task_progress events for real-time background agent progress reporting with cumulative usage metrics, tool counts, and duration
    • Fixed session.close() in the v2 session API killing the subprocess before it could persist session data, which broke resumeSession()
    Open source →
  48. 0.2.5020 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.50

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.50
    Open source →
  49. 0.2.4919 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.49
    • SDK model info now includes supportsEffort, supportedEffortLevels, and supportsAdaptiveThinking fields so consumers can discover model capabilities.
    • Permission suggestions are now populated when safety checks trigger an ask response, enabling SDK consumers to display permission options.
    • Added ConfigChange hook event that fires when configuration files change during a session, enabling enterprise security auditing and optional blocking of settings changes.

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.49
    • SDK model info now includes supportsEffort, supportedEffortLevels, and supportsAdaptiveThinking fields so consumers can discover model capabilities.
    • Permission suggestions are now populated when safety checks trigger an ask response, enabling SDK consumers to display permission options.
    • Added ConfigChange hook event that fires when configuration files change during a session, enabling enterprise security auditing and optional blocking of settings changes.
    Open source →
  50. 0.2.4819 Feb 2026

    Nothing published for this version

  51. 0.2.4718 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.47
    • Added promptSuggestion() method on Query to request prompt suggestions based on the current conversation context
    • Added tool_use_id field to task_notification events for correlating task completions with originating tool calls

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.47
    • Added promptSuggestion() method on Query to request prompt suggestions based on the current conversation context
    • Added tool_use_id field to task_notification events for correlating task completions with originating tool calls
    Open source →
  52. 0.2.4517 Feb 2026
    Release notes

    What's changed

    • Added support for Claude Sonnet 4.6
    • Added task_started system message to the SDK stream, emitted when subagent tasks are registered
    • Fixed Session.stream() returning prematurely when background subagents are still running, by holding back intermediate result messages until all tasks complete
    • Improved memory usage for shell commands that produce large output — RSS no longer grows unboundedly with command output size

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Added support for Claude Sonnet 4.6
    • Added task_started system message to the SDK stream, emitted when subagent tasks are registered
    • Fixed Session.stream() returning prematurely when background subagents are still running, by holding back intermediate result messages until all tasks complete
    • Improved memory usage for shell commands that produce large output — RSS no longer grows unboundedly with command output size
    Open source →
  53. 0.2.4416 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.44

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.44
    Open source →
  54. 0.2.4213 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.42

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.42
    Open source →
  55. 0.2.4113 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.41

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.41
    Open source →
  56. 0.2.4012 Feb 2026
    Release notes
    • Updated to parity with Claude Code v2.1.40
    Open source →
  57. 0.2.3910 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.39

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.39
    Open source →
  58. 0.2.3810 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.38

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.38
    Open source →
  59. 0.2.377 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.37

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.37
    Open source →
  60. 0.2.367 Feb 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.36

    Update

    npm install @anthropic-ai/[email protected]
    # or
    yarn add @anthropic-ai/[email protected]
    # or
    pnpm add @anthropic-ai/[email protected]
    # or
    bun add @anthropic-ai/[email protected]
    
    Open source →
    Release notes
    • Updated to parity with Claude Code v2.1.36
    Open source →