Durable sessions and isolated agent workers
hard 7 minA 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
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
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.