Packages

@anthropic-ai/claude-agent-sdk

0.3.330 · 20 Nov 2026SEE LICENSE IN README.md20.7M / weekRepositorynpmAtom feed

Your version

351 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 0.3.275

    17 Sep 2026
    • Fixed a deferred tool call's result being emitted with internal keys such as toolUseResult instead of tool_use_result when the tool re-runs at the start of a resumed turn

    • Fixed getSessionMessages() and forkSession() sometimes missing a turn's assistant message when called right after the turn's result message

    • Fixed forkSession({ upToMessageId }) rejecting a client-supplied SDKUserMessage.uuid that is not in UUID format

  2. 0.3.274

    16 Sep 2026
    • Added startup_failure_reason to the error result a stream-json run writes before exiting on a known startup failure

    • Added mcpServer: {name, source} to canUseTool options, mcp_server to tool hook inputs, and source to MCP server status rows, so hosts can key trust on source === "sdk"

    • Added CLAUDE_CODE_MCP_STARTUP_WAIT_MS (pass via env) to bound or disable (0) the first-turn wait for connecting MCP servers

  3. 0.3.273

    15 Sep 2026
    • Added a usage_report sibling (SDKUsageReport: session totals, the plan's usage rows as the server sends them, extra usage) on the assistant message that delivers a headless /usage result

    • Added reason: "worker_restart" to task_notification messages when a background task was stopped by a worker process restart

    • Added a one-line transcript notice when the SDK host's Stop or SessionStart hook callback times out, shown once until the host answers again

  4. 0.3.272

    14 Sep 2026
    • Updated to parity with Claude Code v2.1.272

  5. 0.3.271

    14 Sep 2026
    • Added optional omitClaudeMd to AgentDefinition in the agents option, so a subagent can run without user, project and local CLAUDE.md files; managed policy files still load

    • Fixed listSessions, getSessionMessages and getSessionInfo with dir on Windows not finding sessions for a directory on a mapped network drive or SUBST drive

    • Fixed sessionStore resume losing the global config when it is stored under the legacy .config.json name or an OAuth-suffixed file name

  6. 0.3.270

    12 Sep 2026
    • Updated to parity with Claude Code v2.1.270

  7. 0.3.269

    11 Sep 2026
    • Changed user_message_uuid, user_message_uuids and resume_reason to be stamped on a turn's first complete assistant message as well as its first stream event when partial messages are on

    • Fixed result.permission_denials omitting Read, Edit and Write calls blocked by a path-scoped deny rule

    • Fixed interrupts and permission responses being delayed while a host-started MCP server OAuth sign-in waited on a slow authorization server

  8. 0.3.268

    10 Sep 2026
    • Added result_index to result messages: the result's position in delivery order within the run, from 0

    • Added local_command to the result message of a turn that ran a slash command without entering the model loop, carrying the command's name

    • Added hold_on_cache_impact to the reload_plugins control request (Query.reloadPlugins({ holdOnCacheImpact: true })): holds a reload that would invalidate the session's prompt cache

  9. 0.3.267

    9 Sep 2026
    • Added getCcrEvent(query, message) and getSseLastSequenceNum(query) to the browser SDK's SSE transport, plus fromSequenceNum, onCatchUpTruncated and onDeliveryUpdate SSE options

    • Changed systemPrompt recording to default on for custom prompts and appends (a mid-session prompt change takes effect at the next compaction); pass snapshot: false to keep per-request rendering

    • Updated to parity with Claude Code v2.1.267

  10. 0.3.266

    8 Sep 2026
    • Updated to parity with Claude Code v2.1.266

  11. 0.3.265

    8 Sep 2026
    • Added user_message_uuid and user_message_uuids to a synthetic turn's first reply and result for a message sent with isSynthetic: true and a uuid, naming the message that started it

    • Added user_message_uuid and user_message_uuids to the first reply and the result of a turn Claude Code started itself, such as a resume, naming the messages you sent that it picked up mid-turn

    • Fixed user_message_uuid missing from the success result of a turn that sent no API request, such as a slash command

  12. 0.3.263

    6 Sep 2026
    • Updated to parity with Claude Code v2.1.263

  13. 0.3.261

    4 Sep 2026
    • Added pluginDelivery: 'initialize' to send plugins over stdin so the launch command line no longer grows with the plugin count (fixes Windows start failures with many plugins)

    • Fixed query() throwing "Object not disposable" in runtimes without a native Symbol.dispose, such as Node ≤22 vm contexts (Jest's node environment, vitest vmThreads/vmForks) and Node <18.18

    • Updated to parity with Claude Code v2.1.261

  14. 0.3.260

    3 Sep 2026
    • Added optional user_message_uuid to thinking_tokens system messages, linking thinking progress to the user message that triggered the turn

    • Added optional first_content_frame_ms, first_stream_post_ms, first_stream_post_ack_ms and first_stream_post_wall_ms fields to the success result message for remote-session latency breakdowns

    • Fixed rewindFiles() reporting success when no files could be restored (for example when checkpoint backups are missing); it now fails

  15. 0.3.259

    2 Sep 2026
    • Added user_message_uuids beside user_message_uuid on a turn's first reply frame and result: every user message the turn answered, so a reply to several merged messages can be matched to each

    • Added permissionPrompts: 'none' option to auto-deny permission prompts in sessions with nobody to answer them, without disabling auto mode's classifier

    • Updated to parity with Claude Code v2.1.259

  16. 0.3.258

    1 Sep 2026
    • Updated to parity with Claude Code v2.1.258

  17. 0.3.257

    1 Sep 2026
    • Added thinkingTokens to ModelUsage (a subset of outputTokens), and fixed result-message usage.output_tokens_details.thinking_tokens reporting 0 instead of the session's real count

    • Added tool_use_result.resourceLinks on user messages carrying MCP tool results: the resource_link blocks the tool returned, so hosts can render returned files without parsing the result text

    • Added optional resource_links to task_notification for an auto-backgrounded MCP tool call that completed, listing the files it returned by reference; join to the call via tool_use_id

  18. 0.3.252

    31 Aug 2026
    • Updated to parity with Claude Code v2.1.252

  19. 0.3.251

    28 Aug 2026
    • Updated to parity with Claude Code v2.1.251

  20. 0.3.250

    27 Aug 2026
    • Updated to parity with Claude Code v2.1.250

  21. 0.3.248

    27 Aug 2026
    • Added a per-server timeout for SDK-hosted MCP servers (createSdkMcpServer({ timeout })), overriding MCP_TOOL_TIMEOUT for that server's tool calls

  22. 0.3.247

    26 Aug 2026
    • 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

  23. 0.3.246

    25 Aug 2026
    • 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

  24. 0.3.245

    25 Aug 2026
    • Updated to parity with Claude Code v2.1.245

  25. 0.3.243

    24 Aug 2026
    • 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

  26. 0.3.242

    24 Aug 2026
    • Updated to parity with Claude Code v2.1.242

  27. 0.3.241

    22 Aug 2026
    • Updated to parity with Claude Code v2.1.241

  28. 0.3.240

    22 Aug 2026
    • Updated to parity with Claude Code v2.1.240

  29. 0.3.239

    21 Aug 2026
    • 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

  30. 0.3.238

    20 Aug 2026
    • 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

  31. 0.3.237

    19 Aug 2026

    Reading the note…

  32. 0.3.236

    19 Aug 2026

    Reading the note…

  33. 0.3.235

    18 Aug 2026

    Reading the note…

  34. 0.3.234

    17 Aug 2026

    Reading the note…

  35. 0.3.233

    14 Aug 2026

    Reading the note…

  36. 0.3.232

    13 Aug 2026

    Reading the note…

  37. 0.3.231

    13 Aug 2026

    Reading the note…

  38. 0.3.229

    12 Aug 2026

    Reading the note…

  39. 0.3.228

    11 Aug 2026

    Reading the note…

  40. 0.3.227

    10 Aug 2026

    Reading the note…

  41. 0.3.226

    8 Aug 2026

    Reading the note…

  42. 0.3.225

    7 Aug 2026

    Reading the note…

  43. 0.3.224

    7 Aug 2026

    Reading the note…

  44. 0.3.223

    5 Aug 2026

    Reading the note…

  45. 0.3.222

    4 Aug 2026

    Reading the note…

  46. 0.3.221

    3 Aug 2026

    Reading the note…

  47. 0.3.220

    24 Jul 2026

    Reading the note…

  48. 0.3.219

    24 Jul 2026

    Reading the note…

  49. 0.3.218

    22 Jul 2026

    Reading the note…

  50. 0.3.217

    21 Jul 2026

    Reading the note…

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.