Tutorials
Inspect a failed run
Tutorial: deliberately break a flow, then use the Runs view, the step inspector, arrows, attempts and replay to find the cause, fix it, and recover interrupted runs with Resume.
#Goal
Learn to find out exactly why a flow failed, using a failure you create on purpose.
#Prerequisites
- The HN search flow from Call an API in a flow, or any flow with an Agent step that replies in JSON.
#1. Break it on purpose
In the HN search flow, open the HTTP step and change the path of the kept value nbHits from nbHits to totalHits, a field the API does not return. Save and Run with rust.
Expected: the search step fails. Its card shows a failure label with the first line of the error, and the run ends Failed.
#2. Read the step
- Open Runs (or Open run details in the editor's last-run strip).
- Click the failed step.
- Overview says why: The response has no value for nbHits. Check the path in "Values to keep". The step is labelled Outcome unknown and is not retried automatically.
- Input shows the request exactly as sent.
- Output shows the response, so you can see the real field name.
#3. Follow the data
- Steps after the failure show Skipped with Not run: an earlier step failed.
- Click an arrow: No data moved: the earlier step did not complete on this path.
- Press Replay and step through the events to see the order things happened.
#4. Fix and rerun
- Back in the editor, the failed card and the step panel's In the last run section show the same error.
- Optionally use Ask an agent why it failed at the bottom of the step panel. Review its suggestion, Apply it or fix it yourself.
- Set the path back to
nbHits, Save, and Run again.
Expected: the run completes. The old run still shows its version and failure.
#5. Agent failures and retries
For an Agent step with a JSON reply, a reply missing a declared field fails with The reply did not match the fields this step asks for: …. With Attempts above 1, the step retries; the inspector shows Attempt 1, Attempt 2 and Compare, and the card says Succeeded after 1 failed attempt.
#6. Interrupted runs
Close LoCrew while a run is going, then reopen it. The run is Interrupted: LoCrew stopped while this run was in progress. Resume it to re-run the interrupted steps. Press Resume. Only the cut-off steps run again; completed steps keep their results.
#What the failure labels mean
| Label | Retry helps? |
|---|---|
| Failed | Yes |
| Ran out of time | Maybe; raise the time limit |
| Cannot succeed as it is | No; fix the cause |
| Outcome unknown | Check first; it may have taken effect |
| Stopped | It was cancelled |