Debug Failed and Degraded Runs from Traces
Use a run's trace to find which component raised an error, including errors in runs that still returned an answer. You can also open a component from a trace in Builder and re-run it with the original input.
Prerequisites
You need a deployed pipeline that has run at least once. For an overview of the Traces view, see Trace with Built-In Traces.
Investigate a Degraded Run
To spot runs that need attention, even ones that returned an answer, check the run status in the History tab of a pipeline's Analytics. Each run has one of these statuses:
success: The run returned a result and no component in its trace raised an error.degraded: The run returned a result, but at least one component in its trace raised an error that was caught further up the pipeline. Part of the run didn't work as intended, so check it.failed: The run ended with an error and didn't return a result.
To find out why a run is degraded, open its trace, go to the Spans section, and filter spans by status to find the component that raised the error. Then open the span to see the error details and the related logs.
Runs recorded before the degraded status was introduced keep their original status.
Find a Failed Tool Call in a Trace
An Agent can pass a failed tool call back to the LLM as an error result instead of raising it. In that case, the tool's span is marked as an error with the error type ToolInvocationError, and the run is degraded even though the Agent recovered and returned an answer. This way, you can spot tool failures that would otherwise be hidden behind a successful answer. The span's error message contains the error the tool returned. If content tracing is off, the message is Tool '<name>' failed, where <name> is the name of the tool. This applies to pipelines that use Haystack 3.4.0 or later. Runs on earlier Haystack versions don't mark failed tool calls as errors.
If an Agent returned an answer but a tool it called failed, find the failed call to see why it failed.
- In Haystack Enterprise Platform, go to Pipelines, open the pipeline, and go to Analytics > Traces.
- Open the trace of the run. A tool failure that the Agent recovered from shows a successful trace with an errored span.
- In the Spans section, filter spans by status to show the errored spans. The failed tool call appears as a root-cause span.
- Click the span to see its error type,
ToolInvocationError, and the error message from the tool.
The error message tells you whether the tool received wrong arguments, hit a timeout, or failed for another reason, so you know whether to fix the tool configuration or rerun the request.
A trace has its own status, success or failed, so a degraded run can show a successful trace with an errored span.
Run a Component from a Trace
If a component failed or produced unexpected results in a recorded trace, you can open it directly in Builder and re-run it with the original trace input. This lets you reproduce a specific run, experiment with different inputs, and debug issues.
- In Haystack Enterprise Platform, go to Pipelines and open a pipeline.
- Go to Analytics > Traces and open a trace.
- In the trace detail view, open the span for the component you want to investigate. If the trace contains a failed component, the failed span is selected automatically.
- Click Run in Builder on the span.
The Builder opens and the component run widget appears.

- Click Fill input from trace to run the component with the input recorded in the trace and click Run Component.
- To restore the original trace input at any time, click Fill input from trace in the widget.
- To go back to the trace and re-select the component, click Back to trace.
While you're working in Builder with a trace as context, you're in the inspecting a trace mode. To stop the trace session and return to normal Builder mode, close the inspecting trace indicator.
Related Information
Was this page helpful?