Cloudflare brings OpenCode agents to durable cloud sessions

Cloudflare has added experimental OpenCode 2.0 support to its Agents SDK, giving developers a way to keep an agent session on its cloud platform and recover work when the underlying process is interrupted. The October 12 announcement introduces OpenCodeHarness and requires Agents SDK 0.28.0 or later. Cloudflare announcement.
The integration connects OpenCode to Workers AI and supports plugins for custom tools, remote Model Context Protocol servers and skills. For teams building an assistant into an application, the relevant change is a documented hosting and recovery path around the agent loop. Integration details.
Sessions survive interruptions
Cloudflare’s guide places the OpenCode host inside a Durable Object and stores sessions, messages and durable events in its SQLite database. An active session has a Lifecycle job that keeps a heartbeat. If the object crashes or is evicted, an alarm can wake it and allow OpenCode to resume interrupted work. Session and recovery guide.
That design separates a conversation’s stored state from the lifetime of a running host. The guide also describes closing an idle host after 30 seconds when no work or event subscriptions remain, then reopening it for the next call. Developers can submit background work separately from waiting for its result and inspect the returned status. Host lifecycle documentation.
The execution environment still matters
OpenCode’s own Cloudflare documentation explains that the embedded profile replaces local filesystem and process services that are unavailable in this environment. It recommends retaining one host for the lifetime of a Durable Object instance, rather than constructing a fresh host for each request. Plugins bundled with the Worker can customise agents, models and tools. OpenCode embedded host documentation.
Cloudflare’s example consequently removes the default file reading, writing, editing, search and shell tools before adding a tool that can run in the Worker. A coding application needs an appropriate execution environment for repository operations. Installing the harness alone does not establish that environment. Tool configuration example.
What developers can evaluate now
The announcement includes a working example with a browser interface, WebSocket streaming and persistent note tools. These give developers a starting point for testing the interaction between a user interface, an agent session and durable storage. Cloudflare labels the integration experimental, so the launch should be read as an implementation option that still needs application testing. Example and release status.
The practical test is recovery across the whole application. A team should check whether interrupted prompts resume correctly, whether a repeated request duplicates a tool action and whether its chosen tools work within the host’s limits. Those are application checks, and the announcement does not report benchmark results or a measured reliability improvement.



