Durable and Asynchronous Agent Work › Limitations and impact

Michael BrenndoerferDecember 1, 20262 min read
Language AI HandbookAll chapters
Part 49 of 67Long-Horizon Agents and Interoperability
Chapter 376Durable and Asynchronous Agent Work › Limitations and impact
Reading section 12 of 15 · Limitations and impact · 2 minSection 12 of 15 · 2 min

Section 12 of 15 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

A local SQLite transaction can keep a task event and its status consistent. It cannot commit with an independent service in this fixture. The external operation can still be attempted again and its outcome can remain unknown after a crash.

A request can succeed and lose its acknowledgement. A local log cannot disambiguate that outcome by itself. Repeat the logical key only if the service actually deduplicates it, or query the outcome using an identifier and handle remaining uncertainty explicitly.

The tasks table holds queue and lease state. The events table records progress and the result cache records previously returned stub outcomes. A production checkpoint would add a durable state snapshot and an offset, while this notebook folds the full log.

After a worker disappears, a later worker can claim the task if the assignment expires and the task is still eligible. It can continue from committed progress if the store is available and the recorded state is valid. This runner reconstructs progress from the event log. A production runner can start from a checkpoint that records a consistent state and replay offset, then read subsequent events.

The third trap is unbounded retries and stale workers. Without fencing, a slow worker can keep writing after its lease expired, and without a retry budget a poison task can run forever. Combined, these produce the classic failure mode where "the task keeps failing but it also keeps making external effects": the worst of both. The defenses (fencing tokens, per-task attempt counters, transient-vs-permanent error classification) are simple, but they must be present; none of them is provided for free by the LLM call stack. You get them by building the runner around the model, not by pointing the model at a queue and hoping.

A timeout can hide a completed effect. Bound retry cost with an attempt budget, and use the upstream operation’s own outcome and idempotency semantics to decide whether to repeat it.

The fixture writes an intent and two completion events per successful step, and can also renew leases. Measure write load alongside execution cost. A different store needs equivalent atomic ownership and transition checks.

The same separation between state, execution, and authority matters when several agents or a human participate. See Long-Horizon Agents and Interoperability.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy