Skip to main content
Task run events track the lifecycle of every task run within a flow. They are emitted on every state transition, mirroring the structure of flow run state events.

prefect.task-run.{state}

Emitted each time a task run transitions to a new state. The {state} suffix is the state name (for example, prefect.task-run.Running or prefect.task-run.Completed).
Task state transitions are managed locally by the task engine, not proposed to the server like flow run states. The task engine emits these events and delivers them via the events system.

State variants

Resource

Unlike flow run events, task run state events do not include the parent flow run, flow, or deployment as related resources. Task run context (including the parent flow run ID) is available in the event payload under task_run.

Payload