# Durable background execution keeps runs alive through crashes and deploys

> An accepted background run is committed to your database before it starts, so any replica can pick it up and finish it. The queue is backed by your database, and Redis becomes optional coordination rather than the source of truth.

- Published: 2026-08-24
- Author: Yash Pratap Solanky
- Categories: Changelog
- Canonical: https://www.agno.com/articles/durable-background-execution-keeps-runs-alive-through-crashes-and-deploys
- Markdown: https://www.agno.com/articles/durable-background-execution-keeps-runs-alive-through-crashes-and-deploys.md

Durable background execution commits an accepted run to your database before it starts, so a crash or a deploy no longer takes the run down with it. Any replica can pick the run up and finish it, and it is no longer tied to the machine that first accepted it.

Previously, a background run lived only in the process that started it. Now the queue is backed by your database, and Redis is optional coordination rather than the source of truth.

The queue includes bounded concurrency (default 32, set with `AGNO_BACKGROUND_MAX_CONCURRENCY`), cancellation while a job is still queued, `Idempotency-Key` dedupe so a retried request never runs twice, and a 429 when the queue is full. A client that drops its connection can reconnect and resume the stream, and a REST surface lets you list, inspect, and requeue jobs.

Enable it on AgentOS:

```python
from agno.os import AgentOS
from agno.job_queue import QueueConfig

agent_os = AgentOS(agents=[agent], queue=QueueConfig(durable=True))
```

See the docs for the [durable queue](https://docs.agno.com/agent-os/background-execution/durable-queue), [operations](https://docs.agno.com/agent-os/background-execution/operations) and [multi-replica](https://docs.agno.com/agent-os/background-execution/multi-replica).
