Source · release
Claude Agent SDK (TypeScript) v0.3.334
Summary
This release brings the TypeScript Agent SDK up to Claude Code 2.1.334. Its main behaviour change affects long sessions: on most current 1M-context models, the default point at which the conversation is compacted automatically drops to about 400K tokens. This is rolling out gradually.
Key points
- Auto-compact default about 400K: sessions on 1M-context models now compact much
earlier. To keep the full 1M window, set
autoCompactWindowundermodelSettingsfor that model. - New
startup_failure_reasonvalues:consumer_terms_review_in_terminalandconsumer_terms_accept_on_web: the session cannot start until updated Consumer Terms are accepted.resume_target_not_found:--resumecould not find the conversation. Handle these values in apps that start sessions unattended.
- Small additions:
task_notificationnow reportsduration_msfor shell commands.NotebookEditresults includeold_cell_type.- A slash command that runs another command is now listed under its own name.
- Fixes:
SYSTEM_PROMPT_DYNAMIC_BOUNDARYnow works on Bedrock, Agent Platform, Foundry, and gateways.- A WebSocket transport leak in the browser is fixed.
- In-process MCP tool calls no longer end early.
Why it matters
Agents that rely on a very long uncompacted context, such as large code reviews or long research runs, will now summarise their history at about 400K tokens unless you configure otherwise. The new failure reasons let headless deployments tell a terms prompt apart from a real crash.