Source · release
Claude Agent SDK (TypeScript) v0.3.317 and v0.3.318
Summary
Two TypeScript Agent SDK releases matching Claude Code 2.1.317 (2026-11-03) and 2.1.318 (2026-11-04). 0.3.317 adds fail-closed hook matchers and one breaking type change; 0.3.318 reports when the stored claude.ai sign-in ends and when a config file is invalid.
Key points
- Install:
npm install @anthropic-ai/claude-agent-sdk@0.3.318. - 0.3.317,
onFailure: "block"on hook matchers: a hook callback that throws or returns invalid output blocks the action instead of letting it through, and a warning appears in the stream when a hook fails. Same feature ason_failure="block"in the Python SDK 0.2.177. - 0.3.317, breaking: the
file_unchangedvariant ofFileReadOutputis gone; a repeated Read returns the file content again. Code that matched that variant needs updating. - 0.3.317, other: a
session_writes_lostsystem message after the result when a full disk stopped the transcript or~/.claude.jsonbeing saved;lossyinreadFile()results when invalid UTF-8 was replaced;task.descriptionin TaskCreate results. - 0.3.318:
credential_expires_aton result messages;config_file_invalidas astartup_failure_reason; the interrupt response now covers a message held behind a model change;PushNotificationInput.statusis optional.
Why it matters
Guardrail hooks in SDK apps can now fail closed, and long-running SDK services can alert before a stored sign-in expires.