> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug a run

> Debug a run to find where a crew stopped and why.

You debug a run to find where a crew stopped and why. The **Debug** tab shows the crew as it ran, so you can see which
task failed and what it produced.

## Prerequisites

Before starting this task, ensure you have the following:

* Required roles: `nx1_crew` or `nx1_crew_admin`.
* A crew that contains at least one run.

## Debug a run

> [tab] Web portal
>
> Perform these steps to debug a run:
>
> 1. Log in to NexusOne.
>
> 2. On the top navigation bar, hover your mouse over **Agents** and then select **Crews**.
>
> 3. Click **Runs**. A list of crews that contain runs appears.
>
> 4. In the list, click the crew whose run you want to debug.
>
> 5. In the list of runs, click the run, and then click the **Debug** tab. The tab has the following areas:
>
>    * **This run's tasks**: On the left, a list of the tasks with how long each took. Click a task to select it.
>    * **Tool calls**: On the left, below the tasks, the tools the agents used. Each is marked **ok** or with how
>      many calls failed.
>    * **Canvas**: In the middle, the crew as it ran. You can't change it. Click a task to select it.
>    * **Selected task**: On the right, the agent that did the task, how long it took, and what it produced.
>
> 6. Click the task that failed. The panel shows the agent that did the task and **Raised here, so the run stopped.**
>
> 7. Fix any cause outside the crew, such as a model or tool that was unavailable. Then, in the same panel, click
>    **Rerun this task**. NexusOne starts a new run from that task and reuses the results of the earlier tasks.
>
> > [!NOTE]
> >
> > NexusOne keeps tool calls for one day. For an older run, the tool calls aren't kept.

> [tab] REST API
>
> Use the following API endpoints to debug a run:
>
> * [Get run](https://docs.nx1cloud.com/api-reference/endpoints/crew-runs/get-run.md)
> * [List a run's tasks](https://docs.nx1cloud.com/api-reference/endpoints/crew-runs/list-a-runs-tasks.md)

## Additional resources

* For a high-level overview of crews and how they're used in NexusOne, refer to
  [Crews](https://docs.nx1cloud.com/documentation/agents/overview/crews.md).
* To rerun a task from the **Tasks** tab instead, refer to
  [Restart a run at a task](https://docs.nx1cloud.com/documentation/agents/tasks/runs/restart-a-run-at-a-task.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.