Skip to content

Releases: anthropics/claude-agent-sdk-typescript

v0.2.113

17 Apr 19:34

Choose a tag to compare

What's changed

  • Changed the SDK to spawn a native Claude Code binary (via a per-platform optional dependency) instead of bundled JavaScript
  • Added sessionStore option (alpha) to query() and session helpers for mirroring session transcripts to external storage, with SessionStore/SessionKey/SessionStoreEntry types, InMemorySessionStore reference implementation, and importSessionToStore() for migrating existing sessions
  • Added deleteSession() for removing a session from disk or a SessionStore
  • Added SDKMirrorErrorMessage (subtype: 'mirror_error') to the SDKMessage union — emitted when a sessionStore.append() batch fails
  • Breaking: options.env once again replaces process.env for the CLI subprocess instead of overlaying it. To add or override individual variables, pass env: { ...process.env, MY_VAR: "x" }
  • Added title option to query() — sets the session title and skips auto-generation
  • Added OpenTelemetry trace context propagation — the caller's active trace context is forwarded to the CLI subprocess so spans parent under your distributed trace

Update

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

v0.2.112

16 Apr 19:55

Choose a tag to compare

What's changed

  • Updated to parity with Claude Code v2.1.112

Update

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

v0.2.111

16 Apr 15:18

Choose a tag to compare

What's changed

  • Opus 4.7 is now available! This version of the SDK is required to use it.
  • mcp_set_servers control request: remote (http/sse) server entries can now carry per-tool permission_policy values, which are applied to the session's allow/deny rules
  • startup() and WarmQuery are now part of the public TypeScript API
  • Changed options.env to overlay the inherited process.env instead of replacing it

Update

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

v0.2.110

15 Apr 22:07

Choose a tag to compare

What's changed

  • Fixed unstable_v2_createSession not respecting cwd, settingSources, and allowDangerouslySkipPermissions options
  • Added optional shouldQuery field to SDKUserMessage — set to false to append a user message without triggering an assistant turn; fixed shouldQuery: false messages incorrectly triggering auto-title generation, prompt suggestions, and UserPromptSubmit hooks
  • Auto session-title generation now respects CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC and CLAUDE_CODE_DISABLE_TERMINAL_TITLE

Update

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

v0.2.109

15 Apr 04:02

Choose a tag to compare

What's changed

  • Updated to parity with Claude Code v2.1.109

Update

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

v0.2.108

14 Apr 19:12

Choose a tag to compare

What's changed

  • SDKStatus now includes 'requesting'; when includePartialMessages is enabled, a {type:'system', subtype:'status', status:'requesting'} message is emitted before each API request in the stream

Update

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

v0.2.107

14 Apr 06:11

Choose a tag to compare

What's changed

  • Updated to parity with Claude Code v2.1.107

Update

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

v0.2.105

13 Apr 21:53

Choose a tag to compare

What's changed

  • Added system/memory_recall event and memory_paths on system/init for SDK renderers to surface memory operations
  • Fixed error_max_structured_output_retries being emitted when the final retry attempt succeeded, discarding valid structured output

Update

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

v0.2.104

13 Apr 01:45

Choose a tag to compare

chore: Update CHANGELOG.md

v0.2.101

10 Apr 19:03

Choose a tag to compare

What's changed

  • Security: bumped @anthropic-ai/sdk to ^0.81.0 and @modelcontextprotocol/sdk to ^1.29.0 to resolve GHSA-5474-4w2j-mq4c and transitive hono advisories
  • Fixed resume-session temp directory leaking on Windows when subprocess file handles weren't released before cleanup, and on macOS/APFS when await using disposal raced its own cleanup callback
  • Fixed MaxListenersExceededWarning when running 11+ concurrent query() calls

Update

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