Durable and Asynchronous Agent Work › Key Parameters
Michael BrenndoerferDecember 1, 20261 min read
Language AI HandbookAll chapters The key implementation parameters for this durable task runner are:
- LEASE_SECONDS: How long a worker holds a lease before it expires and other workers may reclaim the task. Shorter leases recover faster from crashes but increase renewal traffic.
- MAX_TASK_ATTEMPTS: The maximum number of task claims, including the first. The next scan of an eligible task with an exhausted budget records failure without granting another lease.
- backoff base and cap: The base delay doubles per retry until it reaches the cap. The function applies the jitter multiplier afterward, so the returned delay can exceed the cap.
- deadline_seconds: A supplied relative timeout becomes an absolute deadline at submission. The worker checks expiry before starting another step and before recording its result.
crash_after_stepinjects a crash after committed completion. Separate fixtures manually expire a lease and interrupt execution before writing a result.
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!