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

# Agent Runs & Approvals

> What happens when a workflow agent runs: statuses, test runs, how approvals work, and what you get at the end of each run.

Every time an [agent](https://docs.clarityq.ai/automations/workflows-and-agents.md) runs, it gets its goal and the workflow's records, works on its own, and reports the result in its delivery channel. This page covers what you see along the way.

## Run Statuses

| Status | What it means |
| - | - |
| **Running** | The agent is working. |
| **Waiting for approval** | The agent asked to make a change and is waiting for an answer. |
| **Completed** | The agent finished. This includes a run that found nothing to do. |
| **Failed** | The run could not finish. For example, an app was no longer available, or the agent hit an error. |
| **Stopped** | The run was stopped, or it was still waiting for approval when the agent's next run started. |
| **Skipped** | A scheduled run did not start, because the agent's previous run was still working or the workflow's records were being updated. |

A run that stays open for more than 5 days is ended as **Failed**. Time spent waiting for approval counts.

## Run Now and Test Runs

**Run now** starts a real run right away. It is available on active agents. If the agent has a run waiting for approval, ClarityQ asks before starting a new one, because starting it closes the waiting request as not answered.

### Test Runs

**Run a test** lets you check an agent before it works for real. It also works on a paused agent. If the agent has apps, you choose how the test behaves:

| Option | What happens |
| - | - |
| **Discard everything** | Nothing is posted to the delivery channel and nothing is sent to your apps. Every change the agent wants to make is answered as discarded, and the agent carries on. You see everything it would have proposed. |
| **Send for real** | The agent asks for approval and sends what is approved. Its messages are marked as a test. |

In both cases the workflow's records are not updated, so a test doesn't affect what the agents remember.

Test runs appear in the **Results** tab, marked as a test.

## Approvals

An agent asks for approval before a change when the app is set to **Ask before every change**, or when your admin set that action to **Asks first**. See [Apps and Approvals](https://docs.clarityq.ai/automations/workflows-and-agents.md#apps-and-approvals). It asks for one change at a time.

### Where the Request Appears

* **In the run's chat in ClarityQ**, as a card with **Approve** and **Reject**.
* **In the agent's Slack or Mattermost channel**, as a message that says the agent asks for your approval. It explains the change, shows exactly what will be sent and to which app, and has **Approve**, **Discard**, and **View Chat** buttons.
* **By email**, if the agent delivers by email. The email links to the run. You answer in ClarityQ, not in the email.

### Who Can Answer

* **In ClarityQ:** the workflow's owner.
* **In Slack or Mattermost:** anyone in the channel who has a ClarityQ account with access to the agent's workspace. ClarityQ matches people by email, or by the account they linked with `/clarityq connect`.

The first answer counts. After that the request is closed, and the message shows who approved or discarded it and when.

### After an Answer

* **Approved:** the agent sends the change and continues from where it stopped.
* **Discarded:** the agent doesn't send the change and doesn't propose it again in that run.
* **No answer:** the run stays **Waiting for approval**. When the agent's next run starts, the request is closed as not answered and that run becomes **Stopped**.

If an approved change can't be sent to the app, the agent's **If sending fails** setting decides what happens: it is kept and asked again on the next run, or dropped. The delivery channel gets a line saying which.

## What You Get at the End of a Run

The agent posts one line to its delivery channel, or sends one email, when a run ends:

| The run | What you get |
| - | - |
| Finished and did something | A summary of what the agent did |
| Found nothing to do | A line saying it ran and found nothing to do |
| Failed | The reason. The agent stays active and runs again on its schedule |
| Was skipped | A line saying the agent did not run, and why |
| Was stopped | Nothing new. An open approval request is marked as cancelled |

Slack and Mattermost messages have a **View Chat** button that opens the run in ClarityQ.

## The Run Page

Open a run to see its status, when it started and ended, and the agent's full conversation. The **Log** lists the approval requests and changes of the run in order: what was asked and where, who approved or rejected it, and what was sent.

Click **Stop** to end a run that is running or waiting for approval. Its waiting approval request is closed, and nothing more is sent.

Anyone in the workspace who can use Ask Anything can open a run from its link. Only the workflow's owner can stop it or answer its approval requests there.

## Where Runs Show Up

* **The workflow's page** lists the real runs of all its agents under **Runs**.
* **The Results tab** under **Automations** lists your task runs and your agent runs together. Use the **Types** filter to see only tasks or only agents.
* **The [Usage Dashboard](https://docs.clarityq.ai/admin/usage-dashboard.md)** counts agent runs under their own type, **Agent**.


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