{
  "version": "2",
  "id": "https://freelancenews.online/news/cloudflare-s-agents-sdk-adds-an-experimental-harness-for-running-e6728fa5",
  "title": "Cloudflare's Agents SDK adds an experimental harness for running OpenCode 2.0 inside Durable Objects",
  "summary": "The changelog documents an OpenCodeHarness that runs OpenCode in a plain Durable Object with SQLite-backed sessions, a Lifecycle that resumes interrupted work after eviction, and a Workers AI model provider, but the feature is labelled experimental and no pricing or general-availability date is given.",
  "body": "Cloudflare's developer changelog describes a new way to run the OpenCode 2.0 coding agent on its platform: an experimental OpenCodeHarness in the Agents SDK that hosts OpenCode inside a plain Durable Object. The post, dated 12 October 2026, frames the harness as the mechanism that connects the agent runtime to Cloudflare's durable compute primitives rather than as a standalone product.\n\nAccording to the changelog, sessions are stored in SQLite and Lifecycle jobs wake interrupted work after eviction. That pairing matters because Durable Objects can be evicted between requests; the documented design pairs persistent session state with a job that restarts work that was cut off, which is the part of the announcement with the clearest operational consequence for anyone running long agent tasks.\n\nThe post specifies the packages needed: Agents SDK 0.28.0 or later, installed together with the OpenCode packages via the command it prints, which pulls agents@latest, @opencode/sdk@2 and @opencode/plugin@2. Version floors and package names are the concrete, checkable part of the release; the changelog does not state a general-availability date or any pricing for the harness.\n\nThe documented setup imports DurableObject from cloudflare:workers, Lifecycle from agents/lifecycle, OpenCodeWorkerd from @opencode/sdk/workerd, OpenCodeHarness from agents/harness/opencode, and createAI from agents/models/opencode. A class extending DurableObject then constructs an AI binding, an OpenCodeHarness, and installs a Lifecycle that uses the harness. The changelog shows both a JavaScript and a TypeScript variant of the same example.\n\nInside the harness configuration, the example passes a storage object into OpenCodeWorkerd.create, sets models to fetch: false, and supplies plugins. The defaults block names a model, @cf/moonshotai/kimi-k2.7-code, with reasoningEffort set to low, and an agent named build. The class exposes an ask method that calls harness.prompt and returns status, text and reason.\n\nAccording to the changelog, OpenCode reaches Workers AI via the AI binding by way of the agents/models/opencode provider. Custom tools, remote MCP servers and skills can be added to the harness through OpenCode plugins, the changelog adds. For the embedded host API, readers are directed by it to OpenCode's Cloudflare SDK documentation. A working example is also cited, one that brings in a browser UI, WebSocket streaming, and Workspace tools drawn from @cloudflare/computer for code execution and files.\n\nFor freelancers and small studios building agent-backed tools, the practical appeal is architectural: the agent loop, its session state and its model calls are described as living inside one Cloudflare primitive rather than in a separate always-on server. That is a supported reading of the changelog's own description, not a benchmark. The post supplies no latency, cost or reliability figures, so any efficiency claim would be unsupported.\n\nThe tradeoffs visible in the evidence are the ones the source itself flags. The harness is called experimental, which in Cloudflare's changelog vocabulary signals an interface that may change. The example pins @opencode/sdk@2 and @opencode/plugin@2 while installing agents@latest, a combination that can drift as the SDK moves. And the model default in the sample is a specific Workers AI model with a low reasoning effort setting, which readers would need to revisit for their own workloads.\n\nThere is also a scope limit worth stating plainly. The changelog documents how to wire the harness, not how well it performs. It does not report evaluations, comparisons against other hosting approaches, or the conditions under which Lifecycle recovery succeeds. The claim that Lifecycle jobs wake interrupted work after eviction is a description of intended behaviour in the source, not an independently verified outcome.\n\nThe announcement sits in a broader pattern of agent runtimes being packaged as SDK components rather than as hosted services, but the evidence here covers only this one changelog entry. Nothing in the supplied material establishes adoption numbers, third-party testing, or how the harness interacts with Cloudflare's other agent tooling beyond the imports and the linked example.\n\nFor this audience, the sensible next step is a contained experiment: install the stated versions, reproduce the Durable Object example, and check whether session persistence and post-eviction recovery behave as described under your own workload before depending on them. Treat the experimental label as a signal to keep the integration behind an interface you can swap, and budget for the possibility that package versions and the harness API change.\n\nWhat remains unknown from the evidence: whether the harness is available on all Cloudflare plans, what it costs beyond normal Durable Objects and Workers AI usage, when it might leave experimental status, and whether the linked example is maintained alongside the SDK. The changelog answers how to start, not what happens at scale.",
  "category": "dev",
  "language": "en",
  "datePublished": "2026-10-14T01:18:10.432Z",
  "dateModified": "2026-10-14T01:18:10.432Z",
  "eventDate": "2026-10-12",
  "sourcePublicationDate": "2026-10-12T00:00:00.000Z",
  "source": {
    "name": "developers.cloudflare.com",
    "url": "https://developers.cloudflare.com/changelog/post/2026-10-12-opencode-harness/",
    "kind": "official-publisher"
  },
  "practicalImpact": "Editorial interpretation: developers evaluating agent hosting can prototype the documented Durable Object pattern with the stated package versions and test session persistence and post-eviction recovery against their own workloads, while keeping the experimental harness behind a swappable interface because the API and package versions may change.",
  "limitations": "The evidence is a single Cloudflare changelog entry. It gives no pricing, plan availability, general-availability date, performance data or independent verification. The Lifecycle recovery behaviour is described as intended design, not a tested outcome, and the linked example and OpenCode documentation were not inspected here.",
  "keyPoints": [
    "Cloudflare's changelog documents an experimental OpenCodeHarness in the Agents SDK that runs OpenCode 2.0 inside a plain Durable Object.",
    "Sessions are described as stored in SQLite, with Lifecycle jobs that wake interrupted work after eviction.",
    "The post requires Agents SDK 0.28.0 or later plus @opencode/sdk@2 and @opencode/plugin@2, and shows JavaScript and TypeScript examples.",
    "A Workers AI provider connects OpenCode to Workers AI through the AI binding, and plugins can add custom tools, remote MCP servers and skills.",
    "No pricing, plan availability or general-availability date is stated, and the harness is labelled experimental."
  ],
  "review": {
    "status": "source-reviewed",
    "checkedAt": "2026-10-14T01:18:10.432Z",
    "method": "Automated comparison against retrieved source text; not independent fact-checking.",
    "correctionNote": null
  },
  "sources": [
    {
      "id": 1,
      "url": "https://developers.cloudflare.com/changelog/post/2026-10-12-opencode-harness/",
      "publisher": "developers.cloudflare.com",
      "title": "Changelog",
      "publishedAt": 1791763200000,
      "fetchedAt": 1791940673534,
      "hash": "c33f4ff1b5d1e4bfacb7b7a7b56b27c507d34fb1ac7d76e329dcefc2510b2e68",
      "kind": "official-publisher"
    }
  ],
  "claims": [
    {
      "claim": "Cloudflare's Agents SDK supports OpenCode 2.0 through an experimental OpenCodeHarness that runs inside a plain Durable Object.",
      "source": 1,
      "id": "claim-1",
      "url": "https://freelancenews.online/news/cloudflare-s-agents-sdk-adds-an-experimental-harness-for-running-e6728fa5#claim-1"
    },
    {
      "claim": "Sessions are stored in SQLite and Lifecycle jobs are described as waking interrupted work after eviction.",
      "source": 1,
      "id": "claim-2",
      "url": "https://freelancenews.online/news/cloudflare-s-agents-sdk-adds-an-experimental-harness-for-running-e6728fa5#claim-2"
    },
    {
      "claim": "The post instructs installing Agents SDK 0.28.0 or later with the OpenCode packages.",
      "source": 1,
      "id": "claim-3",
      "url": "https://freelancenews.online/news/cloudflare-s-agents-sdk-adds-an-experimental-harness-for-running-e6728fa5#claim-3"
    },
    {
      "claim": "The agents/models/opencode provider connects OpenCode to Workers AI through the AI binding, and plugins add custom tools, remote MCP servers and skills.",
      "source": 1,
      "id": "claim-4",
      "url": "https://freelancenews.online/news/cloudflare-s-agents-sdk-adds-an-experimental-harness-for-running-e6728fa5#claim-4"
    },
    {
      "claim": "The example defaults to the @cf/moonshotai/kimi-k2.7-code model with reasoningEffort set to low and an agent named build.",
      "source": 1,
      "id": "claim-5",
      "url": "https://freelancenews.online/news/cloudflare-s-agents-sdk-adds-an-experimental-harness-for-running-e6728fa5#claim-5"
    },
    {
      "claim": "A working example adds a browser UI, WebSocket streaming and Workspace tools from @cloudflare/computer for files and code execution.",
      "source": 1,
      "id": "claim-6",
      "url": "https://freelancenews.online/news/cloudflare-s-agents-sdk-adds-an-experimental-harness-for-running-e6728fa5#claim-6"
    }
  ],
  "formats": {
    "html": "https://freelancenews.online/news/cloudflare-s-agents-sdk-adds-an-experimental-harness-for-running-e6728fa5",
    "markdown": "https://freelancenews.online/news/cloudflare-s-agents-sdk-adds-an-experimental-harness-for-running-e6728fa5.md",
    "json": "https://freelancenews.online/news/cloudflare-s-agents-sdk-adds-an-experimental-harness-for-running-e6728fa5.json"
  }
}