What Is a Durable Agent, and Why Does Pi Durable Make It Easy?

Long Read·3 min read·5 sections

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.

Contents 5 sections
  1. What is a durable agent, and why does Pi Durable make it easy?
  2. The durability requirement
  3. What the library actually does
  4. Self-healing software, end to end
  5. Not just him

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. Pi Durable, a library from the team behind the Pi agent harness, delivers that durability as infrastructure:

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. 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

The consequences compound: — phone, terminal, browser — which makes steering, multiplayer, forking, and sub-agents nearly free. fully in a browser on IndexedDB, on a Mac mini in Node, in durable objects, or on Deno's local equivalent — — with any model provider, local ones included.

Self-healing software, end to end

The demo closes the loop from error to merged fix. 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.

Not just him

The ecosystem is converging: ; Cloudflare's Agent SDK embeds Pi Durable in a durable object; Deno — freshly acquired by Cloudflare — still ships a local durable-objects library.

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:57
    A
    Scott Tolinski answered

    Today 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:20
    A
    Scott Tolinski answered

    Chat-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:27
    A
    Scott Tolinski answered

    No — 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.