You need to check out Pi Durable

Executive Summary
A solo deep-dive in which Scott Tolinski argues that agents which run long, start themselves, and perform non-repeatable side effects must be durable — resumable, crash-surviving, and exactly aware of their current step — and that Pi Durable, a library from the team behind the Pi agent harness, delivers that durability while letting him delete roughly 8,000 lines of custom plumbing. The mechanism: persist everything as it goes (messages, tool calls, pending waits), declare per tool whether a rerun is safe, and let a fresh process open the storage and continue. Because state lives in one store, every screen becomes a client of the same agent, and multiplayer, steering, and forking arrive for free; chat-history resume fails because execution state is more than text. The demo is his self-healing pipeline: Sentry errors trigger a webhook through a Cloudflare tunnel, Sentry's root-cause analysis feeds the agent, which fixes, tests, opens, and (for personal software) merges a pull request, then resolves the issue in both systems with a full audit trail — and he can question the same agent afterwards rather than starting fresh. The stack is not Cloudflare-locked: it runs in a plain browser on IndexedDB, on his Mac mini with Node and SQLite, in durable objects, or on Deno's equivalent, with any model provider — and the Pi author runs a multiplayer agent app entirely on an Android phone. He closes by telling agent builders to make their agents durable and to point an agent at the examples folder rather than the README.
Chapters & Key Takeaways
6 takeawaysDurable agents are defined by three properties — they keep working through crashes, they resume, and they know exactly which step they were on — because replaying without state duplicates side effects like sent emails and opened pull requests.
Pi Durable persisted everything Scott's custom agent plumbing did and let him delete about 8,000 lines of code while getting a better system.
Centralized agent state turns every screen into a client of the same mid-flight agent: steering, multiplayer, forking, and sub-agents come for free, and chat-history resume is insufficient because execution state is more than text.
The stack is portable: browser IndexedDB, Mac mini Node plus SQLite, durable objects, or Deno's local equivalent — with any model provider including local models.
The self-healing loop — Sentry webhook, root-cause analysis, fix, test, PR, merge, resolve — runs end to end with a complete audit trail, and the same agent can be questioned afterwards with full context.
The wider ecosystem is converging on durability: OpenCode 2 runs as a library in servers and durable objects, Cloudflare's Agent SDK embeds Pi Durable, and Deno's durable-objects library runs locally despite Deno's Cloudflare acquisition.
Deep Read
What Is a Durable Agent, and Why Does Pi Durable Make It Easy?
On Syntax, Scott Tolinski defines a durable agent — crash-surviving, resumable, never repeating a side effect — and shows how Pi Durable delivers it: persist every step, declare which tools can rerun, and any client steers the same mid-flight agent. The demo closes Sentry errors into merged fixes automatically.
Read the full articleInterview Highlights
3 exchanges- Q
When a self-started agent crashes mid-task, how does it pick the work back up without repeating steps?
Scott Tolinski asked01:57AScott Tolinski answeredToday a human goes back and checks whether anything broke overnight. Scott's bar for anything better: the agent must be durable — it keeps working, is resumable, and knows exactly which step it was on, so it never repeats one. The failure mode is duplication: restart after an email send and you get a double email, a double pull request. That is where durable agents earn their keep.
- Q
Why isn't resuming a saved chat history enough for an agent that crashed?
Scott Tolinski asked05:20AScott Tolinski answeredChat-resume is sometimes fine, especially in coding, Scott concedes. But agent state is more than text: every tool call, each call about to happen, approvals pending, whether the deploy already ran — all of it lives in storage. Return to a Pi Durable conversation and work picks up where it was, or already finished while you were gone. The goal: things just work, and failures resume when conditions allow.
- Q
Do durable agents tie you to Cloudflare's infrastructure?
Scott Tolinski asked07:27AScott Tolinski answeredNo — it runs anywhere JavaScript runs. Another developer ran Pi Durable entirely in the browser, storing to IndexedDB; Scott runs his on a Mac mini in plain Node with SQLite as the database. Durable objects and Deno's equivalent remain natural hosts, and the model side is equally open: any provider, including local models, can be connected. His conclusion for anyone building an agent system: you are not locked into one provider's way of doing things.