Miguel Salinas, an engineer at camelAI, said in a post on X on 28 July that the company rewrote its coding agent to run entirely inside a single Cloudflare Durable Object, replacing per-user virtual machines with Pi, Cloudflare’s Agents SDK and Code Mode. The rewrite is not cosmetic: it changes where the agent’s files live and how the agent executes code. camelAI recently open sourced its codebase, so the redesign is inspectable rather than merely described in a thread.

The reason given is economic. Salinas said the team moved off virtual machines because giving every user an always-on machine with an attached disk was too expensive to scale. That is the unit-economics problem facing any product that spins up a sandboxed compute environment per user: a dedicated VM is billed whether the user is actively prompting the agent or idle between sessions, and the attached disk keeps that cost running even when no computation is happening. The bill scales with signups, not with usage.

A Durable Object is Cloudflare’s answer to that shape of problem: a single-instance, stateful compute primitive that a request can wake, use and let go dormant, with storage attached directly to the object rather than to a machine the provider keeps running regardless of demand. Running the whole agent inside one collapses a fleet of dedicated VMs into compute that activates on demand and bills closer to work actually performed.

The filesystem change follows the same logic. The agent’s files now live in SQLite and R2, Cloudflare’s object storage, instead of on a disk attached to a machine. That trades a real filesystem for a database-backed approximation of one: durable and cheap to keep dormant, but not a POSIX filesystem that any arbitrary tool can mount.

The larger trade is how the agent acts in the world. Instead of bash, the agent now writes JavaScript, executed through Code Mode and Cloudflare’s dynamic Worker loaders. Bash gives an agent a real shell: any installed binary, standard process and file semantics, decades of tooling built to run in one. A sandboxed JavaScript runtime confines the agent to whatever Code Mode and the Worker sandbox expose, which means losing native command-line tools or rebuilding their equivalents in JavaScript. One reply beneath Salinas’s post asked directly whether the JavaScript path burns more tokens than a shell command would, a question the post does not answer.

For any team running agents at scale, the takeaway is not that Durable Objects suit every workload. It is that the always-on, per-user VM is a fixed cost floor that does not fall as usage grows, and camelAI’s rewrite is a public data point on what a team gives up in tooling to remove that floor.

Miguel Salinas of camelAI described the rewrite in a post on X on 28 July 2026.