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

# Runs

> Find any run, see what each of its steps did, and replay or cancel it.

Nelkap records every run as it happens, with its payload, its status, and each of its steps. You can see what any run did and why it stopped, without adding a single log line to your code.

## Find a run

Runs are listed newest first, with their workflow, project, trigger, status, start, end, duration, and number of steps. Narrow the list down by:

* Workflow, tag, trigger, or status.
* Period: the last hour, 24 hours, 3 days, 7 days, 15 days, or 30 days.
* Project, chosen at the top of the page.

For example, to see the failed runs of a customer this week, filter by their tag, by the Failed status, and by the last 7 days.

The overview gives the big picture: the number of projects, workflows, runs, and events, the success rate of recent runs, and the last runs to start.

## Read a run

Open a run to see everything about it:

* Its payload, as your workflow received it.
* Its error, if it failed: the message your code threw, or the reason Nelkap stopped it.
* Its ID, its tags, and the event that started it, if any.
* When it was created, sent to your app, started, and ended, and how long it took.
* Its status. A waiting run also shows the key it's waiting on.

Below, each step is listed in the order it was saved, with its kind, its score if it's a score, when it started and ended, and how long it took. Open a step's details to see what it returned, or the error it threw.

## Run statuses

| Status | What it means |
| - | - |
| Pending | The run is due, and waits for its turn to go to your app. |
| Ready | The run is on its way to your app. |
| Running | Your app is running it. |
| Sleeping | The run is paused until its time is up. |
| Waiting | The run is paused until its event arrives. |
| Completed | Your workflow finished. |
| Failed | Your workflow threw an error, or Nelkap stopped the run. The reason shows on the run's page. |
| Canceled | Someone canceled the run, or its workflow was removed, before it could finish. |

## Replay a run

Replay an ended run to run it again, for example once you've fixed the bug that made it fail. Nelkap starts a new run of the same workflow, with the same payload and tags, and its trigger shows as Manual. Every step runs again from the start, and the original run stays as it was, so you can compare the two.

* You can replay a run that completed, failed, or was canceled.
* Its workflow must still be registered.
* A run started by an event is replayed with the event's payload, as a run of its own: the replay doesn't start the other workflows that listened for the event.

A replay runs every step again, including the ones that sent emails or charged cards in the original. Make sure that's what you want, or make those steps safe to run twice. See [When a step can run twice](https://docs.nelkap.com/concepts/steps.md#when-a-step-can-run-twice).

## Cancel a run

Cancel a run to make sure it never goes on. You can cancel a run that is pending, ready, sleeping, or waiting. Once canceled, it's never sent to your app again, and its status shows as Canceled.

A running run can't be canceled, since your app is executing it. To stop a workflow's runs for good, remove the workflow from [`registerWorkflows`](https://docs.nelkap.com/concepts/workflows#one-list-for-the-whole-project): its runs that haven't started, and those sleeping or waiting, are canceled at once.

## Who can do what

Everyone in the workspace can see runs. Replaying and canceling take the Member role or above. See [Members and roles](https://docs.nelkap.com/manage/members.md).

## How long runs are kept

An ended run stays in your project, with its steps, for the history of your plan: 1, 7, or 15 days after it ends. Runs that are still going are kept for as long as they last. To keep runs longer, [export them](https://docs.nelkap.com/manage/exports.md). See [Limits](https://docs.nelkap.com/limits.md#by-plan).


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