A Design for Running Agents Safely in Short-Lived Containers

I am moving the environment that runs agents from per-workspace VMs to Cloudflare Containers that start per job and stop afterwards. Following one job from start to stop, this post covers fencing off old containers (boot_id and CAS), work ownership, committing saves to R2, and draining before stopping, each compared with the common approach.

October 18, 2026 | 12 min

A Failed Durable Object Alarm Retries 6 Times, Then Stops

A Durable Object has one alarm, a failing alarm is retried up to six times, and then nothing wakes the object. This post builds lease expiry in about 35 lines and checks retry exhaustion and recovery on local workerd.

September 24, 2026 | 9 min

Durable Object Hibernation Keeps the WebSocket and Drops Every Class Field

Cloudflare’s docs say hibernation keeps WebSocket connections open and discards in-memory state. This post runs a small Durable Object under local workerd and watches exactly what that means: the socket stays OPEN, the constructor runs again on the next message, class fields reset, attachments survive only if you serialize them, and a pending timer or the standard WebSocket API quietly turns hibernation off. Production behaviour and billing are not tested.

September 22, 2026 | 13 min

Sending Fewer Messages over a Metered Relay

On Cloudflare Durable Objects, incoming WebSocket messages are billed and outgoing ones are not. On a relay like that, the number of messages is something you design. Three ways, with working code and tests: batch events into one frame by time, count and bytes; replace timer polling with change subscriptions and keep the poll as a fallback; and have an idle host drop its connection when nobody needs it.

August 19, 2026 | 10 min