The AiEdge Newsletter

The AiEdge Newsletter

How Persistent Agents Keep Working

Reconstruct a coding task’s context, preserve accepted work, and recover safely when a worker disappears.

Damien Benveniste's avatar
Damien Benveniste
Oct 12, 2026
∙ Paid

A persistent agent keeps a task moving after the model's current context, the worker process, or the execution environment has ended. It does that by saving enough information outside those components to reconstruct the next valid step. Remembering a user's preferences helps future conversations; recovering a half-finished job requires a different set of guarantees.

OpenAI's managed Agents API now exposes durable sessions, context compaction, recovery, and separate execution environments, making the boundary between a saved conversation and a recoverable task a concrete platform decision. Agents API overview.

What actually allows an agent to continue tomorrow?

A worker disappears while task state, a saved artifact and an external receiver record remain available to a replacement.
A replacement needs evidence from several resources, not the old process stack.

The familiar agent loop is straightforward: receive a goal, ask the LLM for an action, execute a tool, return the observation, and repeat. A short demonstration can keep almost everything in one process. Stretch that task across several hours and the assumptions change. The agent may edit files, wait for approval, lose a network response, and outlive its container. Its next prompt cannot reconstruct facts that were never durably recorded.

The useful mental model is a distributed system with a probabilistic planner inside it. The model proposes what to do. The surrounding runtime records accepted decisions, preserves evidence, executes actions, and determines what can safely happen next.

One consequence is immediately useful: a missing result is different from a failed action. An external service may have completed the request before the worker disappeared. A saved task record saying “no result recorded” tells us about the worker's knowledge. It does not tell us whether the world changed. Recovering the job means closing that gap, not asking the model to guess.

We will separate the kinds of state, reconstruct a bounded context, and work through the commit boundaries. Then we will build a local runtime, continue a code repair in a fresh context, and terminate a process between an external effect and its saved acknowledgement.

Table of contents

  • Separate the state that must survive

  • Rebuild context from durable evidence

  • Recover execution across a crash

  • Resume workspaces, approvals, and delegated work

  • Connect the complete runtime

  • Build the durable runtime

  • Continue a coding task across context windows

  • Break it and compare recovery strategies

User's avatar

Continue reading this post for free, courtesy of Damien Benveniste.

Or purchase a paid subscription.
© 2026 AiEdge · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture