Packages

@anthropic-ai/claude-agent-sdk

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

Your version

0.3.328

18 Nov 2026Where it was published

0.3.330 is the newest release of 0.3.x.

In short

3 new3 fixed4 changed

Release note

What's changed

  • Added onFailure to mcp_tool hooks in the Settings type: with "block", a hook whose call fails blocks the action it guards

  • Added CLAUDE_CODE_DISABLE_DEFERRED_TOOL_RESUME: set it in the env option to stop resume and continue from running a tool call that a hook deferred; settings can't set it

  • Added support for the policy plugin's allowManagedModsOnly option in host-supplied managedSettings; an admin's managed settings still win

  • Fixed the agent option: an inline definition in agents now wins over a user, project, plugin or built-in agent of the same name for model, prompt and hooks

  • Fixed the agent option: an agent from an agents directory now keeps its system prompt when systemPrompt is not set

  • Fixed the model saying background agents were still running after an SDK interrupt had stopped them

  • Changed subagents to wait for their own subagents by default when CLAUDE_CODE_FORK_SUBAGENT=0 is set

  • Changed a shell command rewritten by a PermissionRequest hook: the rewrite's own permission check now decides the sandbox, so a sandbox-excluded rewrite runs outside it; canUseTool is unchanged

  • Changed resolveSettings() on Windows to re-read registry policy every 6 hours while none is set (was 30 minutes)

  • Updated to parity with Claude Code v2.1.328

Update

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

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.