github cloudflare/agents @cloudflare/ai-chat@0.7.0

3 hours ago

Minor Changes

  • #1484 364a45d Thanks @whoiskatrin! - Add cancelOnClientAbort to useAgentChat. Generic browser/client stream cleanup is now local-only by default so server turns can continue and resume; explicit stop() still cancels the server turn. Set cancelOnClientAbort: true to make generic client aborts cancel the server turn.

Patch Changes

  • #1376 6561a3f Thanks @hrushikeshdeshpande! - Avoid throwing when chat stream resume negotiation/replay races with a closed WebSocket connection.

  • #1487 752e25a Thanks @whoiskatrin! - Close the original WebSocket chat transport stream when the socket disconnects before a terminal response, preventing recovered chat continuations from leaving useAgentChat stuck in streaming state.

  • #1481 12365dd Thanks @whoiskatrin! - Fixed approval auto-continuation streams so reasoning chunks keep a valid reasoning-start before reasoning-delta sequence when continuing from an assistant message that already has reasoning, and preserve the continuation reasoning in the final persisted message.

  • #1483 5373f5c Thanks @whoiskatrin! - Allow Think agent-tool children to complete without emitting assistant text. Non-chat tool-step agents can now provide structured output through getAgentToolOutput, with summaries derived from assistant text, string output, structured output, or an empty string.

    Fix useAgentChat().isServerStreaming cleanup when a resumed stream first enters the fallback observer path and later becomes transport-owned.

Don't miss a new agents release

NewReleases is sending notifications on new releases.