AlgoViz

Durable sessions and isolated agent workers

hard 7 min

A long-running task outlives individual model calls and workers.

Trace the example

Follow the evidence through each stage, then test a change in the case.

Resume a draft after approval expires

Resume a draft after approval expires. Selected component: Event ledger inside Session service.
Open full-size diagram

Session service

Draft stored with a pending send

A durable event records the draft version, operation key and original approval expiry. It can be read after the worker vanishes.

An old summary says “approved” but the current grant expired. What may the worker do?

Resume a pending send

Grant expired · preserve the draft and request approval

The unchanged draft has a ten-minute grant with an exclusive expiry, the same user and scope, and no intervening revocation. A summary saying “approved” does not extend it.