Packages

@anthropic-ai/claude-agent-sdk

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

Your version

0.3.319

6 Nov 2026Where it was published

0.3.330 is the newest release of 0.3.x.

In short

1 new2 fixed3 changed

Release note

What's changed

  • Added MCP task support in SDK sessions (not on Bedrock, Vertex or Foundry): with CLAUDE_AUTO_BACKGROUND_TASKS=1 and streaming input, an MCP task runs in the background with task_type "mcp_task"

  • Fixed the OpenTelemetry claude_code.session.count metric counting prewarm() processes that were never claimed; a pre-started process now counts once, when SpareProcess.claim() succeeds

  • Fixed session_writes_lost listing the wrong session in transcript_session_ids after /clear in a session resumed from a transcript file outside the projects folder

  • Improved deleteSession() to reject with ENOTEMPTY if the session's folder could not be fully deleted

  • Changed session_writes_lost to be sent only when the CLI exits 0; a run that ends on an error result now gets only the stderr line

  • Updated to parity with Claude Code v2.1.319

Update

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

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.