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.
What is a durable agent, and why does Pi Durable make it easy?
A durable agent survives its own crashes: it keeps working, resumes from exactly the right step, and never repeats a side effect — because, as Scott Tolinski puts it, an agent that sent an email and then restarts the process sends a second email. His episode opens with agents that fix software while he sleeps and run anywhere from browsers to photo frames. Pi Durable, a library from the team behind the Pi agent harness, delivers that durability as infrastructure: adopting it let Scott delete about 8,000 lines of his own brittle plumbing. His advice to anyone building agents is blunt: make them durable.
The durability requirement
Why now? Agents run longer than ever, act on the world (pull requests, research, even sharing bank details to Slack), and increasingly start themselves from webhooks, cron, and automations. Scott's requirement list: keep working, be resumable, know exactly which step you were on. The failure mode he keeps coming back to is duplication — double emails, double pull requests. Chat-history resume does not meet the bar, because execution state includes every tool call made or pending, approvals awaited, and whether the deploy already happened. Nor does a workflow engine, which locks the next step in advance instead of letting the agent decide.
What the library actually does
Pi itself is the extendable agent harness behind OpenClaw and many developers' coding setups, Scott's included. Pi Durable persists everything as it goes — what was said, the tool calls, what is being waited on — and a new process simply opens the storage and continues after a crash. Every tool declares whether it is safe to rerun: searches yes, email sends no. The consequences compound: every screen becomes just a client of the same mid-flight agent — phone, terminal, browser — which makes steering, multiplayer, forking, and sub-agents nearly free. And it runs anywhere JavaScript runs: fully in a browser on IndexedDB, on a Mac mini in Node, in durable objects, or on Deno's local equivalent — Scott's own deployment is plain Node with SQLite — with any model provider, local ones included.
Self-healing software, end to end
The demo closes the loop from error to merged fix. A bug lands in Sentry and a webhook travels through a Cloudflare tunnel to his pipeline, which triages it; the root-cause analysis comes from Sentry's Seer agent. He stops the agent mid-run to show the persisted state, resumes it, and it fixes, tests, and opens a pull request that he merges — for personal software, PRs can auto-merge. A minute later the run marks the issue resolved in both his system and Sentry, leaving a complete audit trail. And because it is one agent run, he can go back and question the very agent that did the work, in context, with the full record — instead of waking a fresh agent to ask what happened.
Not just him
Scott's entire personal system — documents, chats, to-dos — runs on Pi Durable agents on his own machine, less buggy than anything he hand-built. The ecosystem is converging: OpenCode 2 now runs as a library in servers and durable objects, connectable from any client; Cloudflare's Agent SDK embeds Pi Durable in a durable object; Deno — freshly acquired by Cloudflare — still ships a local durable-objects library. And the Pi author runs a multiplayer agent app entirely on his phone, with only model calls leaving the device.
Interview 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.
