@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.
In short
4 new5 fixed3 changed
Release note
What's changed
Added
thinkingTokenstoModelUsage(a subset ofoutputTokens), and fixed result-messageusage.output_tokens_details.thinking_tokensreporting 0 instead of the session's real countAdded
tool_use_result.resourceLinkson user messages carrying MCP tool results: theresource_linkblocks the tool returned, so hosts can render returned files without parsing the result textAdded optional
resource_linkstotask_notificationfor an auto-backgrounded MCP tool call that completed, listing the files it returned by reference; join to the call viatool_use_idFixed
mcp_reconnectandmcp_toggleacting on a same-named.mcp.json/~/.claude.jsonserver instead of the--mcp-configormcp_set_serversoneFixed
mcp_toggledisable also removing the tools of a sibling MCP server whose name extends the disabled one's (disablingfoodroppedfoo__bar's tools)Changed
mcp_set_serversto also list a server whose connection attempt throws underadded(with afailedrow inmcp_status), not only undererrorsChanged Agent tool calls to emit the periodic
tool_progressheartbeat (heartbeat: true) like other long tools; heartbeat frames never clear asubagent_retryindicatorFixed the browser SDK bundle (
@anthropic-ai/claude-agent-sdk/browser) never streaming any messages on engines without nativeSymbol.dispose(Safari/iOS, Firefox ESR, older Chromium)Fixed a background Bash task that is still running when a stream-json session ends right after an interrupt (stdin closed) never receiving its final
task_notificationFixed
-pgiving up on a long-running background subagent without actually stopping it, sobackground_tasks_changedkept listing it and events for it arrived after itsstoppednotificationAdded
detailoption toQuery.getContextUsage():'summary'answers from the last response's usage and local estimates without per-category token-count API calls (default'full')Updated to parity with Claude Code v2.1.257
Update
npm install @anthropic-ai/claude-agent-sdk@0.3.257 # or yarn add @anthropic-ai/claude-agent-sdk@0.3.257 # or pnpm add @anthropic-ai/claude-agent-sdk@0.3.257 # or bun add @anthropic-ai/claude-agent-sdk@0.3.257
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.