---
title: "Comment by Salman Parvez | ML Systems on \"Why AI Applications Need Background Workflows\" | Hashnode"
description: "Per-step retries are the right unit, and they pull a second requirement in behind them: each step has to leave a record of what it produced and from which input"
url: "https://hashnode.com/posts/why-ai-applications-need-background-workflows/6a9ef29efc4d623b5e92e991/comment/6a9f363df3354fce1f6974f7"
---

[Discussion](https://hashnode.com/posts/why-ai-applications-need-background-workflows/6a9ef29efc4d623b5e92e991)

Comment [Why AI Applications Need Background Workflows](https://hashnode.com/posts/why-ai-applications-need-background-workflows/6a9ef29efc4d623b5e92e991)

[Salman Parvez | ML Systems](https://hashnode.com/@ml-systems)

[Sep 7](https://hashnode.com/posts/why-ai-applications-need-background-workflows/6a9ef29efc4d623b5e92e991/comment/6a9f363df3354fce1f6974f7)

Per-step retries are the right unit, and they pull a second requirement in behind them: each step has to leave a record of what it produced and from which input, or a retry can silently redo work against a newer version of the document than the step before it saw. We run intake this way for a house — assessor harvest, facade vision, sketch reconciliation, compression — and the thing that made retries safe wasn't the queue, it was giving every step's output a source and a version, so a re-run that disagrees with the earlier run shows up as a conflict instead of overwriting it.

[Aansh Malhotra](https://hashnode.com/@axnsh)

[Sep 9](https://hashnode.com/posts/why-ai-applications-need-background-workflows/6a9ef29efc4d623b5e92e991/comment/6a9f363df3354fce1f6974f7#reply-6aa19b6adf05e503c4981932)

That’s a really good point. Retries are only truly safe when each step knows exactly what input it worked on and what output it produced. Versioning those outputs also makes conflicts visible instead of letting a retry overwrite newer data. Definitely something worth considering for production workflows.

[Sep 14](https://hashnode.com/posts/why-ai-applications-need-background-workflows/6a9ef29efc4d623b5e92e991/comment/6a9f363df3354fce1f6974f7#reply-6aa7d270fbb0d91d69fd1377)

Thanks, Aansh. The one rule that made it hold: a re-run never writes over the earlier output, it writes a second claim beside it with its own source and version. Whether the two agree is decided by a separate reconciliation step, not by the retry, and if they disagree the row is marked conflict and nothing downstream reads it until a person resolves it. Retries stay cheap because they can never be destructive, which is what makes it safe to set them aggressively.
