Cloudflare's Project Think Lets AI Agents Run for Days at Near-Zero Cost
Cloudflare's Agents SDK gains Project Think: durable execution, sandboxed code, sub-agents, and a batteries-included harness for long-running AI agents
Takeaways
- Project Think is a major update to Cloudflare's Agents SDK, adding durable execution, sub-agents, sandboxed code, and persistent sessions.
- Durable fibers (
runFiber) let long-running agent tasks survive crashes, deploys, and Durable Object evictions without losing state. - Code Mode (
@cloudflare/codemode) lets the model write a single program instead of chaining tool calls, reducing token usage by up to 99.9% in some cases. - The Think base class wires the full stack together: streaming chat, memory, tool execution, sub-agents, and self-authored extensions with a minimal subclass.
- Pricing starts at $5/month on Workers Paid; agents cost nothing when hibernated, making per-user or per-task agent instances economically viable.
- Project Think is in preview with APIs subject to change; the underlying Durable Objects runtime is production-ready and battle-tested.
Cloudflare's Agents SDK has been solving a problem most agent frameworks ignore: what does it take to run an agent that persists for days, survives crashes, costs nothing when idle, and can safely execute code it writes for itself? Project Think, announced during Agents Week 2026, is the SDK's most significant expansion yet, and it ships real primitives rather than promises.
Why existing agents fall short
Most AI agents today are glorified request handlers. They spin up, call a model, return a response, and disappear. That works for simple queries, but it breaks down the moment you need an agent to clone a repository, run a test suite, iterate on failures, and open a pull request in one continuous session. The economics break too: containers and VMs cost money even when idle, and they vanish the moment a deploy or platform restart hits.
Cloudflare's answer is to build agents on top of Durable Objects, where each agent instance gets its own SQLite database, its own execution context, and its own lifecycle. Durable Objects that are idle and eligible for hibernation are not billed for duration, which means an agent serving one user, sitting idle 99% of the time, costs almost nothing.
What Project Think ships
Project Think adds a concrete set of new primitives to the Agents SDK:
- Durable execution via fibers: crash recovery, checkpointing, and automatic keepalive for long-running agent loops
- Sub-agents: isolated child agents with their own SQLite databases and typed RPC
- Persistent sessions: tree-structured messages with forking, compaction, and full-text search
- Sandboxed code execution: Dynamic Workers, a codemode runtime, and live npm resolution
Surviving long-running work
The new runFiber() API handles the failure modes that kill long agent sessions. An LLM call can take 30 seconds; a multi-turn loop can run far longer. At any point, the execution environment can vanish due to a deploy, a platform restart, or a resource limit. Fibers solve this with two guarantees: an in-flight turn survives Durable Object eviction and resumes rather than disappearing silently, and replies are snapshotted as accepted, streaming, or completed so a restart replays an undelivered answer instead of sending a duplicate partial response.