@anthropic-ai/claude-agent-sdk
0.3.330 · 20 Nov 2026SEE LICENSE IN README.md20.7M / weekRepositorynpmAtom feed
0.3.330 is the newest release of 0.3.x.
Summary· from the note as AI read it
Migration neededRead before upgrading: 5 changes to make.
Before you upgrade
- Ensure query/startup/prewarm options are serializable; no circular or BigInt fields
- Pass hook event values and matcher hooks as arrays
- SDK MCP tool results may again be lost after reconnect; check reliance.To check
- Handle numeric JSON-RPC ids for SDK MCP server requests again.To check
- Move createSdkMcpServer servers from agent mcpServers to top-level mcpServers
New
- Changed background retries for most MCP servers on other machines, reached by hostname over https, to go on for about a day after a drop, up from at most about 27 minutes
In short
5 breaking1 new2 fixed1 internal
- Breaking
Breaking: Changed
query(),startup()andprewarm()to refuse options that can't be sent to Claude Code, such as an agent with a circular or BigInt field. Fix the named option. - Breaking
Breaking: Changed hook options to require arrays: a hook event's value and a matcher's
hooks. A Set, generator, plain object,trueor number is now refused. - BreakingTo check
Reverted 0.3.326's fix for a tool result from an SDK MCP server being lost, or delivered to another call, after a reconnect
- BreakingTo check
Changed the JSON-RPC
idof requests to an SDK MCP server back from a string to a number - Breaking
Deprecated
createSdkMcpServer()servers in an agent'smcpServers: ignored with a warning, and other options apply. Move them to top-levelmcpServers, which gives the main session their tools.
Release note
What's changed
- Breaking
Changed
query(),startup()andprewarm()to refuse options that can't be sent to Claude Code, such as an agent with a circular or BigInt field. Fix the named option. - Breaking
Changed hook options to require arrays: a hook event's value and a matcher's
hooks. A Set, generator, plain object,trueor number is now refused. Fixed
task_startedsending Claude Code's own text, such as a task notification, aspromptwhen a background subagent is woken; such an event now has nopromptFixed Claude reporting a background agent as still running when its permission request had waited on
canUseToolfor 30 seconds or moreReverted 0.3.326's fix for a tool result from an SDK MCP server being lost, or delivered to another call, after a reconnect
Changed the JSON-RPC
idof requests to an SDK MCP server back from a string to a numberChanged background retries for most MCP servers on other machines, reached by hostname over https, to go on for about a day after a drop, up from at most about 27 minutes
- Deprecated
Deprecated
createSdkMcpServer()servers in an agent'smcpServers: ignored with a warning, and other options apply. Move them to top-levelmcpServers, which gives the main session their tools. Updated to parity with Claude Code v2.1.327
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.327 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.327 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.327 # or bun add @anthropic-ai/claude-agent-sdk@0.3.327
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.