@cloudflare/think@0.16.0

cloudflare/agents@cloudflare/think@0.16.0Aug 18, 2026by github-actions[bot]

AI Summary

This release removes the convention-driven Think framework scaffolding, requiring users to adopt a more manual configuration approach, while updating development tools and stream handling.

Key Highlights

  • Remove convention-driven Think framework (Vite plugin, CLI, scaffolder)
  • Update to Workers Types v5 compatibility
  • Preserve spacing between streamed text segments

Breaking Changes

  • Removal of `@cloudflare/think/vite`, `virtual:think/entry`, generated bindings, `think types`, `think init`, and `think studio`
  • Rename `textDeltaFromStreamChunk` import to `TextStreamCallback`
  • Text segments around tool calls now include a space

New Features

  • Framework simplification
  • Type system updates
  • Text streaming improvements

Full Release Notes

### Minor Changes

-   [#2063](https://github.com/cloudflare/agents/pull/2063) [`3de6c8e`](https://github.com/cloudflare/agents/commit/3de6c8ec3ad74b0c3809ed54e01359c570483532) Thanks [@cjol](https://github.com/cjol)! - Remove the convention-driven Think framework, including the Vite plugin, generated Worker entry and virtual modules, CLI, Studio, framework helpers, and server-entry helpers. Remove the separate `create-think` scaffolder and its starter templates. Think remains available as an explicit runtime for hand-written Worker entries.

    **Migration for existing framework users**

    If you only use the `Think` runtime, React integration, messengers, workflows, extensions, or tools, no migration is required.

    | Existing use                                      | Required change                                                                                                                                                             |
    | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `@cloudflare/think/vite`                          | Use `agents/vite` for decorators and `agents:skills`, alongside `@cloudflare/vite-plugin`.                                                                                  |
    | `virtual:think/entry`                             | Add a real Worker entry, such as `src/server.ts`, that explicitly exports each Think class.                                                                                 |
    | Generated bindings, migrations, and routing       | Declare top-level Durable Object bindings and migrations in `wrangler.jsonc`; route with `routeAgentRequest()` and, for custom sub-agent routing, `routeSubAgentRequest()`. |
    | `@cloudflare/think/framework`                     | Move generated configuration and class exports into application code.                                                                                                       |
    | `@cloudflare/think/server-entry`                  | Use Agents SDK routing helpers and application-owned request handlers.                                                                                                      |
    | `think types`                                     | Use `wrangler types`.                                                                                                                                                       |
    | `think init` or `create-think`                    | Use `npx create-cloudflare@latest --template cloudflare/agents-starter`, or manually configure a Think Worker.                                                              |
    | `think studio`, `think state`, or `think inspect` | No direct replacement.                                                                                                                                                      |

    Existing deployments must preserve generated `ThinkAgent_*` and `ThinkSubAgent_*` constructor names and existing migration history. Sub-agent registries use `Class.name`, so export aliases alone do not preserve compatibility. If renaming classes, use a data-preserving Durable Object rename migration.

-   [#2049](https://github.com/cloudflare/agents/pull/2049) [`ce0e608`](https://github.com/cloudflare/agents/commit/ce0e608675e41794b02178dce0fb13bb62530aa8) Thanks [@cjol](https://github.com/cjol)! - Preserve spacing between streamed text segments separated by tool calls. Think messenger delivery and Voice now share the same boundary-aware text joining logic from `agents/chat`.

    Existing users must:

    -   Replace imports of `textDeltaFromStreamChunk()` from `@cloudflare/think/messengers` with `TextStreamCallback`, passing it the complete structured stream events.
    -   Upgrade to `agents@0.21.0` when installing `@cloudflare/think@0.16.0` or `@cloudflare/voice@0.3.6`; both now require `agents >=0.20.2`.
    -   Update exact-text expectations if they relied on segments around tool calls being concatenated without a space.

### Patch Changes

-   [#2082](https://github.com/cloudflare/agents/pull/2082) [`9d35e81`](https://github.com/cloudflare/agents/commit/9d35e81e520065913c660cbb3863d971e5d1a501) Thanks [@cjol](https://github.com/cjol)! - Emit workspace image reads as `image-data` model content so AI SDK v6 routes them as images, while preserving `file-data` output for PDFs.

    Existing consumers that inspect raw workspace tool content must handle `image-data` for images; PDFs continue to use `file-data`. Normal tool callers require no change.

-   [#2023](https://github.com/cloudflare/agents/pull/2023) [`2b2b598`](https://github.com/cloudflare/agents/commit/2b2b5980e1945cf55f5a11626bc395e7c460516f) Thanks [@threepointone](https://github.com/threepointone)! - Treat `useAgentChat` observer error frames as terminal responses.

    Plain-text error bodies are no longer parsed as stream chunks or merged into an empty assistant message. Error frames now clear observer streaming, replay, recovery, and tool-continuation state even when they omit `done`, matching the transport-owned stream behavior.

    Existing observer UIs that displayed error bodies as assistant messages must move those diagnostics to a dedicated error surface.

-   [#1996](https://github.com/cloudflare/agents/pull/1996) [`753a674`](https://github.com/cloudflare/agents/commit/753a6748c1d20e56a300bedab6174e43acb33a79) Thanks [@mattzcarey](https://github.com/mattzcarey)! - Update PartyServer and the Cloudflare Workers development toolchain for `@cloudflare/workers-types` v5 compatibility. New Think projects now use Workers Types v5 with matching Wrangler and Vite plugin versions.

-   [#2062](https://github.com/cloudflare/agents/pull/2062) [`882ae63`](https://github.com/cloudflare/agents/commit/882ae639fa20973ebdb25458ebc4330ccea8f8b2) Thanks [@ben-reitz](https://github.com/ben-reitz)! - Expose `TurnConfig.repairToolCall` so callers can repair malformed tool calls before tool execution.