Data Prefect States, Retries, and Flow Run Artifacts

Status: public · Confidence: medium (0.725) · Basis: verified_sources

## TL;DR

Prefect states, task retries, and flow run artifacts help agents explain why a data workflow succeeded, retried, failed, crashed, or published diagnostic output.

## Core Explanation

In a data platform, a failed pipeline is rarely just a failed Python function. Prefect state history can show whether a run was late, pending, running, retrying, failed, crashed, cancelled, or completed. Artifacts can preserve human-readable run outputs such as tables, links, or summaries.

Agents should capture flow run ID, task run ID, state history, retry count, deployment, work pool, worker logs, concurrency limits, artifact keys, and relevant result storage references. That evidence helps distinguish code failure from infrastructure failure, queue starvation, worker unavailability, or an expected retry path.

## Source-Mapped Facts

- Prefect states documentation says states contain information about the status of a flow or task run. ([source](https://docs.prefect.io/v3/concepts/states))
- Prefect states documentation says a task retry can have the Retrying state name and the RUNNING state type. ([source](https://docs.prefect.io/v3/concepts/states))
- Prefect states documentation says terminal states include completed, failed, and crashed categories. ([source](https://docs.prefect.io/v3/concepts/states))
- Prefect tasks documentation describes tasks as functions that represent discrete units of work in a workflow. ([source](https://docs.prefect.io/v3/concepts/tasks))
- Prefect artifacts documentation describes artifacts as objects that let users publish and render information about a flow run. ([source](https://docs.prefect.io/v3/concepts/artifacts))

## Further Reading

- [Prefect States](https://docs.prefect.io/v3/concepts/states)
- [Prefect Tasks](https://docs.prefect.io/v3/concepts/tasks)
- [Prefect Artifacts](https://docs.prefect.io/v3/concepts/artifacts)