The Next DAL Tooling Feature Should Be a Recovery Ledger
A failed agent run should not force an operator to reconstruct reality from exceptions and chat history. DAL’s next trust improvement should make recovery state explicit: what was attempted, what survived, and which next action is safe.
This article examines how a recovery ledger could turn failure postmortems into a practical runtime and tooling feature without pretending that every interruption can be retried automatically.
Start with the gap between failure and evidence
A run can stop after several different kinds of progress. A file may have been written before validation failed. A scheduled task may have been persisted before the process lost its response. An external request may have timed out after the provider accepted it. In each case, the word failed is too coarse.
The operator needs a smaller set of facts:
- What operation was attempted?
- Which durable artifacts now exist?
- Did an external effect definitely happen, definitely not happen, or remain unknown?
- What action is allowed next?
Today, those facts are often scattered across tool output, filesystem state, queue records, and a conversational transcript. That makes the first recovery step investigative rather than productive. Worse, it encourages broad retries that can duplicate the part of the operation that already succeeded.
A recovery ledger would give each run a durable, inspectable record at the boundary where execution meets evidence.
Model recovery as a ledger, not a stack trace
The first version does not need a complex event-sourcing system. It needs a small versioned record that can be returned by the runtime and written alongside the relevant work log. For example:
``json { "schema": 1, "run_id": "run_2026-09-15T08:26:04Z", "operation": "write_article_draft", "status": "partial", "checkpoints": [ {"name": "file_written", "state": "confirmed", "path": "COO-FILESYSTEM/articles/drafts/example.md"}, {"name": "format_verified", "state": "pending"} ], "external_effect": "none", "next_action": "inspect_and_verify", "blocker": null } ``
The important distinction is between an operation’s overall status and its evidence. partial says the run did not reach its intended endpoint. The checkpoint says useful work did occur. external_effect prevents a local verification problem from being confused with a send or publish outcome.
The ledger should be deliberately boring. Stable identifiers, explicit states, named paths, and timestamps are more valuable than a long narrative. A human can read it; a queue worker can route it; tests can assert it.
Make the next action typed
A generic retry command is unsafe because different failures have different consequences. DAL should classify recovery actions rather than treating all interruptions alike.
A minimal set might be:
- inspect — reread the ledger and existing artifacts before changing anything;
- resume — continue from a confirmed checkpoint;
- repair — make a narrow local correction to a named artifact;
- replay — repeat an idempotent operation using the same operation identity;
- escalate — stop and request human review when an external result is uncertain.
For a draft whose file exists but whose structure was not verified, inspect or repair is appropriate. Regenerating the article from scratch is not. For an email request that timed out after submission, escalate or provider-status inspection is safer than replaying the send. For a persisted schedule whose response was lost, inspect can establish whether the task already exists.
Typed actions also make autonomous queues calmer. A worker can drain resume items while leaving escalate items in a review lane. The operator sees why a task is waiting, rather than a pile of indistinguishable failures.
Put checkpoints at meaningful boundaries
A recovery ledger is useful only if the runtime records evidence before the final result. Checkpoints should correspond to boundaries that change what a retry may safely do:
- input accepted;
- local artifact created or updated;
- artifact verified;
- review submitted;
- external effect confirmed;
- run completed.
This does not require recording every internal function call. The goal is to capture durable state transitions. If execution stops between “file written” and “format verified,” the next worker can verify the existing file. If it stops after “external effect unknown,” the system must not silently resend.
The same approach helps with successful runs. A completion record can point to the final artifact and show that the review or publication boundary was intentionally crossed. Trust is not only about explaining failures; it is about making success auditable without requiring a full transcript.
Test interruption, not just exceptions
The developer workflow should make partial success testable. A useful test suite would interrupt a run after each meaningful checkpoint and assert the permitted recovery action.
For a file-producing task, the test could write the artifact, simulate a process stop, then invoke recovery. The expected behavior is to find and verify the existing file, not create a second one. For an external action, the test should simulate an ambiguous provider response and assert that the ledger becomes external_effect: unknown with next_action: escalate.
The CLI or host protocol should expose a concise inspection command as soon as the ledger exists. A developer should be able to ask for a run’s status and see the exact path, checkpoint, and next action. This read-only surface should come before automatic recovery; otherwise the system will automate decisions that have not yet become legible.
Conclusion: make recovery the product surface
The next trust feature in DAL should improve the moment after execution stops. A recovery ledger would preserve partial progress, separate local evidence from external uncertainty, and turn retrying into a typed decision rather than a reflex.
A practical first release can stay narrow: define a versioned schema, persist checkpoints for artifacts and external boundaries, expose read-only inspection, and add interruption tests. Then add resume behavior only for operations that are demonstrably idempotent.
The goal is not to eliminate failure postmortems. It is to ensure that every postmortem leaves behind a usable recovery record—and that the next safe move is visible before anyone presses retry.