> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/workflow-execution/loop-failures-and-partial-results.md).

# Loop Failures and Partial Results

One failed item can cause the whole loop to fail. Inspect the error type before deciding whether to correct the input, retry an operation, or change the workflow.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FsCbfJPJ0MpjtMpuCOQqg%2FG033.mp4?alt=media&token=b6418512-a20b-4016-91a5-42efaa47c8f8>" %}

## Before you begin

Access to the parent run and the child run details.

## Key concepts

| Term           | Definition                                                                                                                                                                   |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Iteration      | One repetition of the loop’s processing for an item. An iteration can have its own run result and failure.                                                                   |
| Partial result | Output available before all requested work completes successfully. Do not report the entire task as successful unless the operation’s contract supports that interpretation. |
| Retry          | A repeated attempt after a failed or uncertain operation. It can repeat external changes; use it only when the result is understood.                                         |
| Fallback       | An alternate response, model, or branch used under a configured failure condition. A fallback can produce a usable answer while the original operation still failed.         |
| Side effect    | A change outside the returned answer, such as creating a record or sending email. Cancellation or release rollback does not undo a completed side effect.                    |

## Handle a failed loop item

1. Open the loop error and identify the affected iteration.

![On Error controls whether the node stops the workflow or follows a supported recovery path.](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/RGFigcy5yOUcZUPjBXVV/assets/g033-g033-01-stop-settings.png)

On Error controls whether the node stops the workflow or follows a supported recovery path.

2. Inspect the child input, failing step, and provider response.
3. Correct the cause before rerunning. Check whether any external writes already completed.

The recovery addresses the failed operation without assuming that earlier work was reversed.

## Behavior and limitations

A failed child execution can fail the Beta loop rather than return a successful batch with one item omitted. Some temporary failures are retried. Inspect completed child runs before restarting, because already completed provider operations are not reversed. Configure supported fallback handling deliberately rather than assuming failed items are skipped.

## Related resources

[Error handling and fallback branches](https://docs.stackai.com/guides-and-quickstarts/workflow-builder/error-handling-and-fallback-branches.md)

[Execution Order and Node Dependencies](https://docs.stackai.com/technical-reference/workflow-execution/execution-order-and-node-dependencies.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/technical-reference/workflow-execution/loop-failures-and-partial-results.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
