> 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/guides-and-quickstarts/evaluations-and-observability/debug-a-recorded-run.md).

# Debug a recorded run

Run traces show what happened at each step of a workflow execution. Use them to locate an error, inspect the values involved, and verify a correction.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FH2KG97X9Nu2xGrA4Fw7S%2FG078.mp4?alt=media&token=6e74e327-d33b-4749-9745-e11ac11fdd43>" %}

## Before you start

Begin with the run identified in [Inspect project analytics](https://docs.stackai.com/guides-and-quickstarts/evaluations-and-observability/inspect-project-analytics.md). If you are responsible for operations but do not build the workflow, capture the run time, first failing node, error, expected result, and reproducible input for the workflow owner. Let that owner make and test the correction rather than guessing at unfamiliar node settings.

## Inspect a failed execution

Open the execution in Analytics and review its status, duration, input, and Flow progress.

<figure><img src="https://1957915746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FzRir8InJJzrZGziYHaM9%2Ffailed-run.png?alt=media" alt="Failed run with a populated input and Code error traceback" width="485"><figcaption><p>The failed run records the submitted input and identifies Code as the failing node. Output is N/A because the run stopped before producing a final result. Read the exception in Errors before changing downstream steps.</p></figcaption></figure>

Establish which run you are investigating before selecting a node.

Select the failing node in Flow progress to inspect its recorded values and use Locate error to find it in the workflow. If node-level values are unavailable, use the run-level input and error shown above. Do not interpret an empty trace field as proof that the original input was empty.

## Compare it with a successful run

Open a successful execution of the same workflow and compare its recorded input and output.

<figure><img src="https://1957915746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FaUbnBFwWoDvtLr8jajmP%2Fsuccessful-run.png?alt=media" alt="Successful run with populated input and calculated output" width="485"><figcaption><p>A separate successful run records both the submitted input and the returned calculation. Compare the actual output as well as the status; a Success badge alone does not establish that the result is correct.</p></figcaption></figure>

Select individual nodes when their recorded details are available. Check the values returned to downstream steps, not only the final run status.

## Correct and verify the workflow

Return to Workflow and inspect the current node configuration.

![Current workflow node configuration](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/zO6Jaj3RiwjAUnSZd0A6/assets/g078-g078-05-editor.png)

Correct the cause identified in the run details rather than changing unrelated settings.

Run the corrected workflow with identifiable input and inspect the result.

![Retest with identifiable input](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/5s4Fs3jvbcGjYD9D4ylb/assets/g078-g078-06-retest.png)

Use the new execution to confirm the correction.

Open the new execution in Analytics and compare its stored output with the live result.

![New execution record in Analytics](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/SPKmop5ySxsAwVwIyCgh/assets/g078-g078-07-record.png)

This confirms that you are reviewing the corrected run rather than an earlier record.

## Important behavior

A run trace describes a specific execution. The current workflow draft may have changed since that execution.

Check the first failing step before changing later steps that depend on it.


---

# 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/guides-and-quickstarts/evaluations-and-observability/debug-a-recorded-run.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.
