In this article
Distinguish the retry of a parent from a new child flow run: result persistence can determine reuse, identity, history and the child’s renewed attempt budget.
Follow the repeated parent call
A parent workflow runs a source-collection flow and then fails while formatting a report. Its retry reaches the collection call again. Prefect’s current retry guide says a completed nested result is reused when it was persisted. The parent’s retry does not automatically mean another collection execution, nor does an earlier green child status alone establish that a reusable result was stored.
Make result persistence part of the child contract
The guide identifies persist_result=True on the child flow as the setting enabling this result persistence. Decide whether the source collection should supply a stable reusable snapshot or should intentionally observe fresh information. Persistence controls the availability of a completed result for reuse; it does not determine whether that snapshot still satisfies the report’s freshness requirement. Record the source revision inside the result when that distinction matters to the reader.
Recognize the fresh child execution
If the child failed or completed without a persisted result, the parent retry creates a new child flow run. The flow engine preserves the previous run’s history and gives the fresh child its own retry budget. An operator investigating several collection attempts should therefore inspect child run identities, rather than grouping every event under an assumption that one original child merely continued consuming the same attempt allowance.
Trace the effect on task cache identity
A new child run has a new flow-run identity. Task caches incorporating that identity do not automatically carry over as equivalent keys. The cache-policy implementation defines the run component used by such policies. This is a consequence of creating another child, not evidence that every cached task in every policy must rerun. Inspect the actual policy before estimating how much work the parent’s retry will repeat.
Distinguish retry from process reattachment
The engine also looks for an existing child when its parent tracking task remains non-final after a process restart, avoiding an unnecessary duplicate child under that tracking task. Recovery and explicit repeated execution are thus separate paths. Tool observations should preserve their run identifiers. Task budgets help assess total work across parent retries and fresh children, including outcomes that a single child retry counter cannot explain.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.