What's changed
- Added
thinkingTokenstoModelUsage(a subset ofoutputTokens), and fixed result-messageusage.output_tokens_details.thinking_tokensreporting 0 instead of the session's real count - Added
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 text - Added 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_id - Fixed
mcp_reconnectandmcp_toggleacting on a same-named.mcp.json/~/.claude.jsonserver instead of the--mcp-configormcp_set_serversone - Fixed
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 undererrors - Changed Agent tool calls to emit the periodic
tool_progressheartbeat (heartbeat: true) like other long tools; heartbeat frames never clear asubagent_retryindicator - Fixed 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_notification - Fixed
-pgiving up on a long-running background subagent without actually stopping it, sobackground_tasks_changedkept listing it and events for it arrived after itsstoppednotification - Added
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