Packages

@anthropic-ai/claude-agent-sdk

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

Your version

0.3.274

16 Sep 2026Where it was published

0.3.330 is the newest release of 0.3.x.

In short

4 new2 fixed3 changed

Release note

What's changed

  • 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

  • Added CLAUDE_CODE_EMIT_STARTUP_TIMING=1 for stream-json hosts: the session's first system/init then carries the per-phase startup_timing breakdown that cloud sessions already emit

  • Fixed getSessionMessages() omitting a message the user sent while Claude was running a tool; it now comes back as a user message where Claude read it

  • Fixed missing origin: {kind: 'task-notification'} on the replayed user message when a background task finishes during a running turn (--replay-user-messages)

  • Improved startup: the first turn no longer waits up to 2s for connecting MCP servers from settings files or plugins whose tools tool search defers; options.mcpServers servers are still awaited

  • Changed queued background-task completions to share one model call: each still gets its own result, all but the last empty with num_turns: 0

  • Updated to parity with Claude Code v2.1.274

Update

npm install @anthropic-ai/claude-agent-sdk@0.3.274
# or
yarn add @anthropic-ai/claude-agent-sdk@0.3.274
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.3.274
# or
bun add @anthropic-ai/claude-agent-sdk@0.3.274

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.