Minor Changes
- #1860
f5b1dd8Thanks @mattzcarey! - Think agents emit Cloudflare-native traces out of the box with no tracing setup beyond enabling Worker traces. Named lifecycle and storage-phase spans group Durable Object internals around startup, request persistence, turn preparation, inference, result persistence, recovery, alarms, and durable submissions. Every inference call produces aninvoke_agent {agent class}span withchat {model}andexecute_tool {tool}children. Think supplies durable identity and turn metadata. Payload storage remains off by default; agents can setstoreMessagesfor OTel-schema model messages ({ role, parts }, canonical tool parts, and outputfinish_reason) onchatandstoreToolsfor tool arguments/results onexecute_tool. These flags configure the wrapper and are never emitted as metadata or attributes. Model streams are finalized on early exit, and durable submissions run from their awaited alarm invocation so spans do not outlive invocation boundaries.
Patch Changes
-
#1860
f5b1dd8Thanks @mattzcarey! - Group SDK-managed initialization, startup, chat interactions, turns, and durable submissions into semantic phases. Storage-heavy setup, hydration, recovery, request persistence, and response persistence each receive a named bucket, keeping inference and tool spans visible without discarding lower-level Durable Object SQLite spans. Each span records agent identity, storage phase, a stable marker for UI grouping, and operation-specific metadata. No-op on runtimes without thetracingAPI. -
#1959
a3cbed1Thanks @mattzcarey! - Cache MCP JSON Schema conversion for the current catalog on each live connection, and let Think agents skip direct MCP AI-tool exposure when those tools are exposed through Code Mode or another mechanism outside Think's automatic tool set. -
#1963
3ce98ffThanks @mattzcarey! - Reconcile staleuseAgentChatserver-streaming state after an errored client reconnects.Reconnect probes now include correlation IDs, and
STREAM_RESUME_NONEdistinguishes globally idle agents from active continuations owned by another connection. The hook clears fallback streaming state only for a correlated idle response. Reconnect opens are retained while a prior resume or status transition settles, in-flight handshakes are retransmitted on replacement sockets, and all AI SDK resume entry points share one serialization gate. -
#1937
ed9f42bThanks @cjol! - Forward routing props through the ThinkonStartlifecycle wrapper. -
#1860
f5b1dd8Thanks @mattzcarey! - Run durable submissions only from their awaited scheduled drain, preventing model work and tracing spans from outliving the short submission-acceptance invocation. -
#1949
32e7390Thanks @cjol! - Warn whengetSkills()makes an overriddengetSystemPrompt()fallback-only and document using Session context blocks for always-on instructions.