# What changed in @cloudflare/ai-chat

> 26 changes in @cloudflare/ai-chat 0.12 from its official release notes, upgrade guides and advisories: 7 breaking, 2 deprecations, 5 new APIs and options. Each one cited. Sources checked 2026-11-01. HTML: https://unstale.sh/npm/@cloudflare/ai-chat/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @cloudflare/ai-chat 0.12

### Breaking changes

- Requires agents@>=0.25.0 so Think and AI Chat can import the chat helpers provided by that release. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- An active stream that finishes with a normal assistant response no longer starts an automatic continuation. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- AIChatAgent messages are stored through Sessions, with existing message rows imported once on first wake; rolling back after migration leaves an empty conversation. (0.12.0) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.0)
- AI Chat requires agents 0.23.0 or later for the shared recovery Task definition and internal enqueue support. (0.12.0) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.0)
- The cleanupStreamBuffers export is removed because stream-buffer sweeps are no longer used. (0.12.0) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.0)
- The STREAM_CLEANUP_DELAY_SECONDS export is removed because stream-buffer sweeps are no longer used. (0.12.0) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.0)
- The transcript is now empty until onStart; subclasses that read this.messages in the constructor should read it from onStart or later. (0.12.0) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.0)

### Deprecations

- maxOomRetries is deprecated in favor of chatRecovery.maxInterruptedAttempts. (0.12.2) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.2)
- Deprecated in favour of reconcileMessages; message reconciliation keeps assistant messages and tool outputs attached to the correct turn when a provider reuses a toolCallId. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)

### New APIs and options

- Interfaces can now be used as Props on Agent, AIChatAgent, Think, and routing helpers. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- Adds eventDelivery: "terminal" to forward only lifecycle, progress, and milestone events for a run. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- Adds session.mirror() to keep an in-memory transcript in sync with a session's change feed. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- Adds onTurnEnd; terminal chat frames also carry outcomes and user message IDs so clients can settle sends correctly across recovery and reconnects. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- AIChatAgent exposes its backing Streams capability so consumers on the same Durable Object can observe chat streams with streams.read(). (0.12.0) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.0)

### Behavior and default changes

- Chat recovery seals a turn after the configured number of interrupted attempts, defaulting to 5, so turns that repeatedly exceed the Durable Object memory limit do not retry forever. (0.12.2) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.2)
- The recovery work budget increases from 1000 to 10000, keeping it as generous as before when work is counted in durable segments. (0.12.0) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.0)
- The response is streamed instead of serializing the whole transcript; clients calling .json() are unaffected. (0.12.0) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.0)
- ResumableStream now uses the shared Streams capability for durable chat output; existing chat stream tables migrate on first construction after upgrade. (0.12.0) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.0)

### Fixes and other changes

- Prevents agent-tool chunks from being duplicated or dropped during reconnect, child re-attach, and fiber recovery. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- A failed agent-tool child is reported as failed even if it was evicted before the failure was recorded. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- Settles approved tool calls that never ran once the conversation moves past them, preventing later turns from sending unresolved tool calls. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- Continuation turns that fail before streaming now report an error to clients and onChatResponse instead of appearing to hang. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- AI Chat recovers from transient response-reader errors instead of ending the turn, respects recovery persistence choices, and avoids joining stale recovery runs. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- AI Chat and Think send the terminal done frame after persisting and broadcasting the assistant reply, preventing later sends from being overwritten. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- Keeps a tool call's input when its approval request arrives before the input finishes streaming. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
- Prevents text from appearing twice when reconnecting during a tool continuation. (0.12.1) — [release notes](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/ai-chat%400.12.1)
