github anthropics/claude-agent-sdk-typescript v0.2.89

latest releases: v0.3.332, v0.3.331, v0.3.330...
8 months ago

What's changed

  • Added startup() to pre-warm the CLI subprocess before query(), making the first query ~20x faster when startup cost can be paid upfront
  • Added includeSystemMessages option to getSessionMessages() to optionally include system messages in session history
  • Added listSubagents() and getSubagentMessages() functions to retrieve subagent conversation history from sessions
  • Added includeHookEvents option to enable hook lifecycle messages (hook_started, hook_progress, hook_response) for all hook event types
  • Fixed ERR_STREAM_WRITE_AFTER_END errors when single-turn queries with SDK MCP servers or hooks have control responses arriving after the result message
  • Fixed Zod v4 field .describe() metadata being dropped from createSdkMcpServer tool schemas
  • Fixed side_question returning null on resume before the first turn completes
  • Fixed settingSources empty array causing --setting-sources "" to consume the next CLI flag
  • Fixed error result messages (error_during_execution, error_max_turns, error_max_budget_usd) to correctly set is_error: true with descriptive messages
  • Fixed MCP servers getting permanently stuck in a failed state after a connection race — they now retry on the next message

Update

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

Don't miss a new claude-agent-sdk-typescript release

NewReleases is sending notifications on new releases.