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.3.24726 Aug 2026
    Release notes

    What's changed

    • Added an optional ambient flag to task_started, task_notification and background_tasks_changed task entries so hosts can exclude housekeeping tasks from activity indicators
    • Fixed the permissionMode 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 value

    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 an optional ambient flag to task_started, task_notification and background_tasks_changed task entries so hosts can exclude housekeeping tasks from activity indicators
    • Fixed the permissionMode 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 value
    Open source →
  2. 0.3.24625 Aug 2026
    Release notes

    What's changed

    • 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 to the user message that triggered it
    • Added modelUsage[*].costBasis ('list' | 'managed' | 'unknown') reporting which price table each model's costUSD was computed from
    • Added modelPricing support in the managedSettings option for hosts that set CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST; an admin-managed settings source that sets modelPricing still wins
    • Added perTaskStopAffordance option: when set, interrupt() aborts only the current turn and keeps background agents and workflows running; otherwise (and for one-shot string prompts) they stop

    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 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 it
    • Added modelUsage[*].costBasis ('list' | 'managed' | 'unknown') reporting which price table each model's costUSD was computed from
    • Added modelPricing support in the managedSettings option for hosts that set CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST; an admin-managed settings source that sets modelPricing still wins
    • Added perTaskStopAffordance option: when set, interrupt() aborts only the current turn and keeps background agents and workflows running; otherwise (and for one-shot string prompts) they stop
    Open source →
  3. 0.3.24525 Aug 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.245

    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.245
    Open source →
  4. 0.3.24324 Aug 2026
    Release notes

    chore: Update CHANGELOG.md

    Open source →
    Release notes
    • Added optional 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 follow
    • Fixed mcp_status reporting a remote MCP server as connected after its connection dropped; it now reports pending while reconnecting, then connected or failed
    • Fixed managed disableAllHooks also disabling hook callbacks registered through the hooks option; they now keep running, matching allowManagedHooksOnly
    • Changed Read tool PDF results: the document block (or page image blocks for pages reads) now arrives inside the tool_result content instead of as a separate user message after it
    • Updated to parity with Claude Code v2.1.243
    Open source →
  5. 0.3.24224 Aug 2026
    Release notes
    • Updated to parity with Claude Code v2.1.242
    Open source →
  6. 0.3.24122 Aug 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.241

    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.241
    Open source →
  7. 0.3.24022 Aug 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.240

    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.240
    Open source →
  8. 0.3.23921 Aug 2026
    Release notes

    What's changed

    • total_cost_usd / modelUsage.costUSD now include the 1.1× US-only-inference (data residency) multiplier when the response reports inference_geo: "us"
    • A result held back for background subagents in one-shot mode now reports total_cost_usd, duration_api_ms and modelUsage as of its release, not the turn-end snapshot
    • Fixed SYSTEM_PROMPT_DYNAMIC_BOUNDARY in an array systemPrompt being sent to the model as literal text on Bedrock, Vertex, Foundry, and gateway providers
    • A repeated initialize 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 running

    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
    • total_cost_usd / modelUsage.costUSD now include the 1.1× US-only-inference (data residency) multiplier when the response reports inference_geo: "us"
    • A result held back for background subagents in one-shot mode now reports total_cost_usd, duration_api_ms and modelUsage as of its release, not the turn-end snapshot
    • Fixed SYSTEM_PROMPT_DYNAMIC_BOUNDARY in an array systemPrompt being sent to the model as literal text on Bedrock, Vertex, Foundry, and gateway providers
    • A repeated initialize 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 running
    Open source →
  9. 0.3.23820 Aug 2026
    Release notes

    What's changed

    • Added is_backgrounded and spawn_depth to task_started events for subagent tasks (is_backgrounded also on background Bash tasks)
    • Added suppressOriginalPrompt to UserPromptExpansion hook output, matching UserPromptSubmit
    • Added command_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 frames
    • Fixed SDK hook callbacks silently not applying after a host re-sends initialize to an already-running CLI; the response now reports hooks_applied
    • Fixed CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true not keeping prompt_suggestion messages on when the account is near, but not over, its usage limit
    • Changed vcs_state_changed push events to emit one event per pushed branch

    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 is_backgrounded and spawn_depth to task_started events for subagent tasks (is_backgrounded also on background Bash tasks)
    • Added suppressOriginalPrompt to UserPromptExpansion hook output, matching UserPromptSubmit
    • Added command_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 frames
    • Fixed SDK hook callbacks silently not applying after a host re-sends initialize to an already-running CLI; the response now reports hooks_applied
    • Fixed CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true not keeping prompt_suggestion messages on when the account is near, but not over, its usage limit
    • Changed vcs_state_changed push events to emit one event per pushed branch
    Open source →
  10. 0.3.23719 Aug 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.237

    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.237
    Open source →
  11. 0.3.23619 Aug 2026
    Release notes

    What's changed

    • 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 result

    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
    • 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 result
    Open source →
  12. 0.3.23518 Aug 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.235

    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.235
    Open source →
  13. 0.3.23417 Aug 2026
    Release notes

    What's changed

    • Removed unused 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)
    • Updated the 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)
    • A peer 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 asking
    • SDKSystemMessage (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 frames

    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
    • Removed unused 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)
    • Updated the 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)
    • A peer 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 asking
    • SDKSystemMessage (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 frames
    Open source →
  14. 0.3.23314 Aug 2026
    Release notes

    What's changed

    • Notification hooks now fire for pending permission prompts on the SDK path, matching the interactive REPL behavior
    • Todo/task-tracking tools (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 them

    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
    • Notification hooks now fire for pending permission prompts on the SDK path, matching the interactive REPL behavior
    • Todo/task-tracking tools (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 them
    Open source →
  15. 0.3.23213 Aug 2026
    Release notes

    What's changed

    • Subagent MCP 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 table
    • vcs_state_changed events now populate the branch field for push operations, sourced from the pushed ref

    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
    • Subagent MCP 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 table
    • vcs_state_changed events now populate the branch field for push operations, sourced from the pushed ref
    Open source →
  16. 0.3.23113 Aug 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.231

    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.231
    Open source →
  17. 0.3.22912 Aug 2026
    Release notes

    What's changed

    • Added terminal_slash_commands to the system init message so Remote Control clients can hide terminal-oriented commands
    • Changed conversations whose messages alone exceed the API's 32 MB limit to end the turn with terminal_reason "api_error" instead of "image_error"; StopFailure error_details is "request_body_over_limit: …"

    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 terminal_slash_commands to the system init message so Remote Control clients can hide terminal-oriented commands
    • Changed conversations whose messages alone exceed the API's 32 MB limit to end the turn with terminal_reason "api_error" instead of "image_error"; StopFailure error_details is "request_body_over_limit: …"
    Open source →
  18. 0.3.22811 Aug 2026
    Release notes

    What's changed

    • Agent tool results (AgentOutput): usage.output_tokens_details is now carried through

    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
    • Agent tool results (AgentOutput): usage.output_tokens_details is now carried through
    Open source →
  19. 0.3.22710 Aug 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.227

    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.227
    Open source →
  20. 0.3.2268 Aug 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.226

    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.226
    Open source →
  21. 0.3.2257 Aug 2026
    Release notes

    What's changed

    • Fixed background subagents in headless/SDK sessions never resuming when a background shell command or Monitor they left running completed, so the subagent never saw the result

    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 background subagents in headless/SDK sessions never resuming when a background shell command or Monitor they left running completed, so the subagent never saw the result
    Open source →
  22. 0.3.2247 Aug 2026
    Release notes

    What's changed

    • Added 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-deliver
    • Added subkind: 'peer-send-message' to the task-notification member of SDKMessageOrigin, marking a notification raised by a cross-session SendMessage
    • Added source: 'archive' plugin config variant to Settings, with url and optional sha256, for installing plugins from a zip over HTTPS
    • Added sandbox credential-masking fields to Settings: decode: 'jwt' with maskClaims, extract/onExtractNoMatch on envVars, and awsPairs/sigv4 for AWS SigV4 re-signing
    • Fixed long (>200 char) project paths resolving to another project's session directory under a shared sanitized prefix; session list/get/rename/tag/fork/delete and /resume no longer cross projects

    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 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-deliver
    • Added subkind: 'peer-send-message' to the task-notification member of SDKMessageOrigin, marking a notification raised by a cross-session SendMessage
    • Added source: 'archive' plugin config variant to Settings, with url and optional sha256, for installing plugins from a zip over HTTPS
    • Added sandbox credential-masking fields to Settings: decode: 'jwt' with maskClaims, extract/onExtractNoMatch on envVars, and awsPairs/sigv4 for AWS SigV4 re-signing
    • Fixed long (>200 char) project paths resolving to another project's session directory under a shared sanitized prefix; session list/get/rename/tag/fork/delete and /resume no longer cross projects
    Open source →
  23. 0.3.2235 Aug 2026
    Release notes

    What's changed

    • Added resumeDropsTurn option: with resumeSessionAt, declares the turn a truncating resume intends to drop; the CLI refuses the resume if anything else would be discarded
    • Result messages for repeated 529 overload failures now include api_error_status: 529, so SDK consumers can detect overload terminations structurally instead of matching message text
    • Bare headless (-p / SDK query() without canUseTool) now emits system/permission_denied stream events when a tool call is auto-denied
    • Documented usage 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 accounting

    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 resumeDropsTurn option: with resumeSessionAt, declares the turn a truncating resume intends to drop; the CLI refuses the resume if anything else would be discarded
    • Result messages for repeated 529 overload failures now include api_error_status: 529, so SDK consumers can detect overload terminations structurally instead of matching message text
    • Bare headless (-p / SDK query() without canUseTool) now emits system/permission_denied stream events when a tool call is auto-denied
    • Documented usage 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 accounting
    Open source →
  24. 0.3.2224 Aug 2026
    Release notes

    What's changed

    • Fixed query({ sessionStore, resume }) not carrying user settings.json (apiKeyHelper, env, hooks, permissions) into the resumed subprocess

    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 query({ sessionStore, resume }) not carrying user settings.json (apiKeyHelper, env, hooks, permissions) into the resumed subprocess
    Open source →
  25. 0.3.2213 Aug 2026
    Release notes

    What's changed

    • Improved 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 skill
    • Fixed external MCP servers passed via the mcpServers option not being connected before the first turn, which caused the model to emit tool calls as literal text

    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
    • Improved 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 skill
    • Fixed external MCP servers passed via the mcpServers option not being connected before the first turn, which caused the model to emit tool calls as literal text
    Open source →
  26. 0.3.22024 Jul 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.220

    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.220
    Open source →
  27. 0.3.21924 Jul 2026
    Release notes

    What's changed

    • Added opt-in cancel_queued to the interrupt control request (capability interrupt_cancel_queued_v1): cancels queued and pending-dispatch messages alongside the abort
    • Added fast_mode_disabled_reason to result and init messages so SDK hosts can explain why fast mode is off
    • Added DirectoryAdded lifecycle hook event to the control protocol, fired when a new working directory is registered mid-session
    • Fixed the initialize response reporting fast_mode_state from the spawn-time model after a model switch
    • Added sandbox.network.strictAllowlist to SDK settings types for deterministically denying non-allowlisted hosts in sandboxed commands
    • Added workflowSizeGuideline to SDK settings types for setting the advisory dynamic-workflow size guideline

    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 opt-in cancel_queued to the interrupt control request (capability interrupt_cancel_queued_v1): cancels queued and pending-dispatch messages alongside the abort
    • Added fast_mode_disabled_reason to result and init messages so SDK hosts can explain why fast mode is off
    • Added DirectoryAdded lifecycle hook event to the control protocol, fired when a new working directory is registered mid-session
    • Fixed the initialize response reporting fast_mode_state from the spawn-time model after a model switch
    • Added sandbox.network.strictAllowlist to SDK settings types for deterministically denying non-allowlisted hosts in sandboxed commands
    • Added workflowSizeGuideline to SDK settings types for setting the advisory dynamic-workflow size guideline
    Open source →
  28. 0.3.21822 Jul 2026
    Release notes

    What's changed

    • SkillToolOutput now reports background: true when a forked skill was dispatched as a detached background agent
    • Fixed the result event's api_error_status reporting null for rate-limit and overloaded errors delivered mid-stream; it now reports 429/529
    • Added canonicalModel and provider to each modelUsage entry in result messages so downstream billing can look up the correct rate table for costUSD

    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
    • SkillToolOutput now reports background: true when a forked skill was dispatched as a detached background agent
    • Fixed the result event's api_error_status reporting null for rate-limit and overloaded errors delivered mid-stream; it now reports 429/529
    • Added canonicalModel and provider to each modelUsage entry in result messages so downstream billing can look up the correct rate table for costUSD
    Open source →
  29. 0.3.21721 Jul 2026
    Release notes

    What's changed

    • 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 deeper nesting
    • Added a cap on concurrently-running subagents (default 20, override with CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS)
    • Fixed Remote Control sessions not re-sending pending permission prompts to clients that connect after the prompt appeared

    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
    • 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 deeper nesting
    • Added a cap on concurrently-running subagents (default 20, override with CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS)
    • Fixed Remote Control sessions not re-sending pending permission prompts to clients that connect after the prompt appeared
    Open source →
  30. 0.3.21620 Jul 2026
    Release notes

    What's changed

    • Added optional skippedLinks count to rewindFiles responses for paths the rewind safety guards refused to restore or delete
    • Added tool_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 prose
    • Added optional user_message_uuid and request_sent_wall_ms fields to the success result message for cross-host request-latency correlation

    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 skippedLinks count to rewindFiles responses for paths the rewind safety guards refused to restore or delete
    • Added tool_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 prose
    • Added optional user_message_uuid and request_sent_wall_ms fields to the success result message for cross-host request-latency correlation
    Open source →
  31. 0.3.21519 Jul 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.215

    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.215
    Open source →
  32. 0.3.21418 Jul 2026
    Release notes

    What's changed

    • set_permission_mode now rejects unrecognized permission modes with an error instead of silently adopting them; the 'manual' alias is accepted at every ingress
    • Added optional subkind: 'scheduled-trigger' to the task-notification member of SDKMessageOrigin, marking deliveries that are the fired prompt of a user-configured scheduled task
    • applyFlagSettings({effortLevel}) now accepts 'max' in its TypeScript type (runtime already supported it)
    • Assistant messages truncated by interrupt() now carry aborted: true, so consumers can distinguish a mid-stream partial from a completed message
    • Added optional subagent_type and subagent_retry fields to tool_progress messages so clients can show a subagent waiting out an API rate-limit retry
    • The system/init message's plugins entries and the reload_plugins response now include each plugin's manifest version
    • SessionStart hooks now report source "fork" instead of "resume" when the session begins as a fork

    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
    • set_permission_mode now rejects unrecognized permission modes with an error instead of silently adopting them; the 'manual' alias is accepted at every ingress
    • Added optional subkind: 'scheduled-trigger' to the task-notification member of SDKMessageOrigin, marking deliveries that are the fired prompt of a user-configured scheduled task
    • applyFlagSettings({effortLevel}) now accepts 'max' in its TypeScript type (runtime already supported it)
    • Assistant messages truncated by interrupt() now carry aborted: true, so consumers can distinguish a mid-stream partial from a completed message
    • Added optional subagent_type and subagent_retry fields to tool_progress messages so clients can show a subagent waiting out an API rate-limit retry
    • The system/init message's plugins entries and the reload_plugins response now include each plugin's manifest version
    • SessionStart hooks now report source "fork" instead of "resume" when the session begins as a fork
    Open source →
  33. 0.3.21317 Jul 2026
    Release notes
    • Updated to parity with Claude Code v2.1.213
    Open source →
  34. 0.3.21216 Jul 2026
    Release notes

    What's changed

    • Fixed dash-leading resumeSessionAt and sessionId values being passed to the CLI as separate argv tokens; both now use equals-form (--flag=value)
    • Agent tool output now includes the resolved model when a mid-turn model swap changed the subagent's model

    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 dash-leading resumeSessionAt and sessionId values being passed to the CLI as separate argv tokens; both now use equals-form (--flag=value)
    • Agent tool output now includes the resolved model when a mid-turn model swap changed the subagent's model
    Open source →
  35. 0.3.21115 Jul 2026
    Release notes

    What's changed

    • Fixed --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 events
    • Added SDKAssistantMessage.timestamp (ISO-8601) to the live stream, matching SDKUserMessage; older emitters omit it, consumers should fall back to receive time
    • Added rate-limit message prefix buckets (USAGE_LIMIT_ERROR_PREFIXES and siblings) as @alpha exports for classifying rate-limit messages without hand-mirrored lists
    • Improved process-exit errors to include the CLI's stderr output, so a failed child reports its actual cause instead of only an exit code

    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 --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 events
    • Added SDKAssistantMessage.timestamp (ISO-8601) to the live stream, matching SDKUserMessage; older emitters omit it, consumers should fall back to receive time
    • Added rate-limit message prefix buckets (USAGE_LIMIT_ERROR_PREFIXES and siblings) as @alpha exports for classifying rate-limit messages without hand-mirrored lists
    • Improved process-exit errors to include the CLI's stderr output, so a failed child reports its actual cause instead of only an exit code
    Open source →
  36. 0.3.21014 Jul 2026
    Release notes

    What's changed

    • Added timedOutAfterMs to BashToolOutput, set when a command is auto-backgrounded on timeout

    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 timedOutAfterMs to BashToolOutput, set when a command is auto-backgrounded on timeout
    Open source →
  37. 0.3.20914 Jul 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.209

    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.209
    Open source →
  38. 0.3.20813 Jul 2026
    Release notes

    What's changed

    • Fixed a caller abort during a pending SDK hook callback being converted into hook success, which let PreToolUse-gated tools execute after the abort
    • Fixed a per-query resource leak in the SDK's process tracking when spawning the CLI fails (nonexistent or inaccessible executable path)
    • Fixed an SDK 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 continues
    • Fixed extraArgs 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 argv
    • Fixed an abort-listener leak: streaming queries sharing one AbortController no longer accumulate abort listeners on its signal after each completed query
    • Fixed createSdkMcpServer docs pointing at a nonexistent env var; the MCP tool-call timeout knob is MCP_TOOL_TIMEOUT
    • Fixed an uncaught exception when writing to stdin after the Claude Code subprocess has exited

    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 a caller abort during a pending SDK hook callback being converted into hook success, which let PreToolUse-gated tools execute after the abort
    • Fixed a per-query resource leak in the SDK's process tracking when spawning the CLI fails (nonexistent or inaccessible executable path)
    • Fixed an SDK 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 continues
    • Fixed extraArgs 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 argv
    • Fixed an abort-listener leak: streaming queries sharing one AbortController no longer accumulate abort listeners on its signal after each completed query
    • Fixed createSdkMcpServer docs pointing at a nonexistent env var; the MCP tool-call timeout knob is MCP_TOOL_TIMEOUT
    • Fixed an uncaught exception when writing to stdin after the Claude Code subprocess has exited
    Open source →
  39. 0.3.20710 Jul 2026
    Release notes

    What's changed

    • Fixed 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 contract
    • The Agent tool's structured result now has a published SDK type (AgentToolCompletedOutput) that matches the emitted object exactly

    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 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 contract
    • The Agent tool's structured result now has a published SDK type (AgentToolCompletedOutput) that matches the emitted object exactly
    Open source →
  40. 0.3.2069 Jul 2026
    Release notes

    What's changed

    • Added 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_ms

    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 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_ms
    Open source →
  41. 0.3.2058 Jul 2026
    Release notes

    What's changed

    • Interrupt control responses now include 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 detection
    • Added structured name and body fields to peer-message session events, exposing the sender display name and decoded message body

    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
    • Interrupt control responses now include 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 detection
    • Added structured name and body fields to peer-message session events, exposing the sender display name and decoded message body
    Open source →
  42. 0.3.2048 Jul 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.204

    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 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 cancelled
    • Fixed the post-merge cancel backstop cancelling every member of a coalesced prompt batch when a cancel named only one: uncancelled siblings now re-merge and run (previously they were reported cancelled — on remote transports that acknowledged them as processed, silently dropping messages nobody cancelled)
    • Added 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)
    • Updated to parity with Claude Code v2.1.204
    Open source →
  43. 0.3.2037 Jul 2026
    Release notes

    What's changed

    • Added a 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 edges
    • Fixed stable releases shipping a sdk.d.ts with unresolved type references that broke consumer typechecking with skipLibCheck disabled

    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 a 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 edges
    • Fixed stable releases shipping a sdk.d.ts with unresolved type references that broke consumer typechecking with skipLibCheck disabled
    Open source →
  44. 0.3.2026 Jul 2026
    Release notes

    What's changed

    • Added parent_agent_id field to subagent session messages for building depth-2+ agent trees from disk-persisted metadata
    • Fixed apply_flag_settings with a non-object settings value crashing the session instead of returning a control error

    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 parent_agent_id field to subagent session messages for building depth-2+ agent trees from disk-persisted metadata
    • Fixed apply_flag_settings with a non-object settings value crashing the session instead of returning a control error
    Open source →
  45. 0.3.2013 Jul 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.201

    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.201
    Open source →
  46. 0.3.2003 Jul 2026
    Release notes

    What's changed

    • Added 'manual' as an accepted alias for the 'default' permission mode in SDK inputs
    • Fixed onSetPermissionMode callback not firing for SDK-hosted Remote Control sessions
    • Fixed set_model control request accepting unrecognized model strings; invalid models are now rejected before latching

    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 'manual' as an accepted alias for the 'default' permission mode in SDK inputs
    • Fixed onSetPermissionMode callback not firing for SDK-hosted Remote Control sessions
    • Fixed set_model control request accepting unrecognized model strings; invalid models are now rejected before latching
    Open source →
  47. 0.3.1992 Jul 2026
    Release notes

    What's changed

    • Added requestId to canUseTool callback options for correlating out-of-band permission responses, and support for returning null to suppress the SDK's automatic control response
    • Added blocked field to workflow_agent progress events indicating when an agent was blocked by the auto-mode safety classifier
    • Added mode:"mask" and per-credential injectHosts to sandbox.credentials settings types for injecting masked credentials into sandboxed commands

    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 requestId to canUseTool callback options for correlating out-of-band permission responses, and support for returning null to suppress the SDK's automatic control response
    • Added blocked field to workflow_agent progress events indicating when an agent was blocked by the auto-mode safety classifier
    • Added mode:"mask" and per-credential injectHosts to sandbox.credentials settings types for injecting masked credentials into sandboxed commands
    Open source →
  48. 0.3.1981 Jul 2026
    Release notes

    What's changed

    • Added a runtime warning when canUseTool is configured alongside allowedTools or bypassPermissions, which shadow the callback
    • Added per-server request_timeout_ms option to mcp_set_servers control request
    • Fixed SDKUserMessage.isSynthetic not being mapped to isMeta on ingestion, which could cause synthetic messages to be treated as real user messages
    • Fixed workflow progress events silently dropping earliest agents from the list while the phase counter remained correct

    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 a runtime warning when canUseTool is configured alongside allowedTools or bypassPermissions, which shadow the callback
    • Added per-server request_timeout_ms option to mcp_set_servers control request
    • Fixed SDKUserMessage.isSynthetic not being mapped to isMeta on ingestion, which could cause synthetic messages to be treated as real user messages
    • Fixed workflow progress events silently dropping earliest agents from the list while the phase counter remained correct
    Open source →
  49. 0.3.19730 Jun 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.197

    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.197
    Open source →
  50. 0.3.19629 Jun 2026
    Release notes

    What's changed

    • Added prompt_id field to hook input payloads for correlating hook events with OpenTelemetry prompt-level events
    • Fixed control protocol deduplication dropping tool-use IDs after 1000 resolutions, which could cause duplicate tool_result deliveries in long-running sessions

    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 prompt_id field to hook input payloads for correlating hook events with OpenTelemetry prompt-level events
    • Fixed control protocol deduplication dropping tool-use IDs after 1000 resolutions, which could cause duplicate tool_result deliveries in long-running sessions
    Open source →
  51. 0.3.19526 Jun 2026
    Release notes

    What's changed

    • Added Query.reinitialize() to re-send the initialize control request and redeliver pending permission/dialog prompts after a transport gap
    • Fixed commands_changed event not being emitted for synced skills when the skill list resolves before the change-detector subscribes

    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 Query.reinitialize() to re-send the initialize control request and redeliver pending permission/dialog prompts after a transport gap
    • Fixed commands_changed event not being emitted for synced skills when the skill list resolves before the change-detector subscribes
    Open source →
  52. 0.3.19325 Jun 2026
    Release notes

    What's changed

    • Added promptSuggestions option to Browser SDK query() to opt the remote CLI into emitting follow-up suggestions
    • Fixed brief console window flashes on Windows when spawning CLI subprocesses

    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 promptSuggestions option to Browser SDK query() to opt the remote CLI into emitting follow-up suggestions
    • Fixed brief console window flashes on Windows when spawning CLI subprocesses
    Open source →
  53. 0.3.19124 Jun 2026
    Release notes

    What's changed

    • Added old_source field to NotebookEdit tool results for replace and delete operations, enabling inline diffs
    • Added seven_day_overage_included to SDKRateLimitInfo.rateLimitType for per-model weekly usage limits
    • Added model_scoped array to usage response for per-model weekly limit windows with utilization and reset times
    • Fixed fast mode reverting to standard after the first turn when settingSources includes user/project settings

    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 old_source field to NotebookEdit tool results for replace and delete operations, enabling inline diffs
    • Added seven_day_overage_included to SDKRateLimitInfo.rateLimitType for per-model weekly usage limits
    • Added model_scoped array to usage response for per-model weekly limit windows with utilization and reset times
    • Fixed fast mode reverting to standard after the first turn when settingSources includes user/project settings
    Open source →
  54. 0.3.19024 Jun 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.190

    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.190
    Open source →
  55. 0.3.18723 Jun 2026
    Release notes

    What's changed

    • Added sandbox.credentials to SDK settings types for configuring credential file and environment variable denial in sandboxed commands

    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 sandbox.credentials to SDK settings types for configuring credential file and environment variable denial in sandboxed commands
    Open source →
  56. 0.3.18622 Jun 2026
    Release notes

    What's changed

    • Added agent_id field to can_use_tool control requests — background agents now forward permission prompts to canUseTool instead of auto-denying, and stdin stays open while background tasks are running
    • Added ReadMcpResourceDirTool tool type to SDK schemas — MCP resource directory listing is now a dedicated tool instead of a fallback inside ReadMcpResourceTool
    • Added rewind_conversation control request for rewinding a conversation to a previous point with durable resume anchor support

    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 agent_id field to can_use_tool control requests — background agents now forward permission prompts to canUseTool instead of auto-denying, and stdin stays open while background tasks are running
    • Added ReadMcpResourceDirTool tool type to SDK schemas — MCP resource directory listing is now a dedicated tool instead of a fallback inside ReadMcpResourceTool
    • Added rewind_conversation control request for rewinding a conversation to a previous point with durable resume anchor support
    Open source →
  57. 0.3.18520 Jun 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.185

    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.185
    Open source →
  58. 0.3.18319 Jun 2026
    Release notes

    What's changed

    • Updated to parity with Claude Code v2.1.183

    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.183
    Open source →
  59. 0.3.18218 Jun 2026
    Release notes
    • Updated to parity with Claude Code v2.1.182
    Open source →
  60. 0.3.18117 Jun 2026
    Release notes

    What's changed

    • Added errorCode, canUserPurchaseCredits, and hasChargeableSavedPaymentMethod fields to SDKRateLimitInfo for detecting credits-required rate limits
    • Added tool_use_meta.icon_url to assistant messages, populated from MCP server directory metadata
    • Fixed SDK-hosted Remote Control sessions dropping file_attachments from inbound user messages

    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 errorCode, canUserPurchaseCredits, and hasChargeableSavedPaymentMethod fields to SDKRateLimitInfo for detecting credits-required rate limits
    • Added tool_use_meta.icon_url to assistant messages, populated from MCP server directory metadata
    • Fixed SDK-hosted Remote Control sessions dropping file_attachments from inbound user messages
    Open source →