Engineering

Plan, Execute, Recover: Durable Sessions for Long Agent Work

Eric Brasher August 4, 2026 at 10:30 AM 5 min read

An autonomous loop is only useful if it can survive ordinary distributed-system events. This morning we connected Harness plans, iteration state, and intermediate evidence to the host agent's durable session so deactivation is a pause, not a restart from memory.

Planning Is State

A plan is not just text at the top of a prompt. It contains task identity, status, dependencies, attempts, outputs, and enough context to explain why an item exists. Treating it as real state makes progress inspectable and recovery deterministic.

The Harness takes snapshots at meaningful boundaries rather than after every token. When an item is added, completed, or delegated, the durable representation advances. If Orleans later reactivates the grain on another silo, the Harness reconstructs the plan and continues from the next incomplete item.

Plan and Execute Are Distinct Modes

Some applications want a review gate: generate a plan, show it to an operator, and execute only after approval. Others want one call that plans and works until completion. The Harness supports both shapes without changing the underlying state model.

That distinction is particularly valuable in regulated or expensive workflows. The same planner can run in a proposal-only mode in production, while a lower-risk environment allows immediate execution. The host does not need separate agent classes, and the stored plan remains the artifact the operator reviewed.

Recovery Must Not Duplicate Effects

Persistence cannot magically make arbitrary tools exactly-once. What it can do is make boundaries visible. Harness state records which item was active and what result was committed. Tool and plugin authors can then use stable task identifiers as idempotency keys for external systems.

For operations with side effects, the recommended sequence is: record the intent, invoke an idempotent tool, record the result, then mark the item complete. If recovery happens in the middle, the stable key lets the external service return the original outcome instead of creating it twice.

Delivery and effects

FabrCore provides durable state and at-least-once delivery where documented. Your external tool contract still determines whether a side effect can be replayed safely.