What's changed
- Added optional
terminal_reasonfield to result messages, exposing why the query loop terminated (completed,aborted_tools,max_turns,blocking_limit, etc.) - Added
'auto'to the publicPermissionModetype - Changed
sandboxoption to defaultfailIfUnavailabletotruewhenenabled: trueis passed —query()will emit an error result and exit if sandbox dependencies are missing, instead of silently running unsandboxed. SetfailIfUnavailable: falseto allow graceful degradation. - Updated to parity with Claude Code v2.1.91
Update
npm install @anthropic-ai/claude-agent-sdk@0.2.91
# or
yarn add @anthropic-ai/claude-agent-sdk@0.2.91
# or
pnpm add @anthropic-ai/claude-agent-sdk@0.2.91
# or
bun add @anthropic-ai/claude-agent-sdk@0.2.91