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

# Follow, steer and stop an agent run

> Find an Ankra AI agent run in Activity, read what it did, answer what it waits for, and stop it, from the portal, the CLI or MCP.

Every time an [AI agent](https://docs.ankra.ai/platform/ai-agents.md) starts - to work a ticket, investigate a watch that fired, or on its schedule - Ankra records an agent run: what it read, what it did and what it reported. This guide finds a run, reads it, answers what it waits for, and stops it. It takes a few minutes.

## Before you start

* **A role that can read agent runs** (the `runs.read` permission). Without it, **Activity** is not in the **Ankra AI** menu, and an agent task link reads **Your role cannot read agent runs.**
* **Organisation admin access and permission to operate runs**, to stop a run. Without them, **Stop run** is greyed out and the run page reads **Stopping a run requires organisation admin access and permission to operate runs.**

## 1. Find the run

> [tab] Portal
>
> Open **Ankra AI → Activity** (`/next/ai/agent-runs`). **Agent runs** lists the latest runs, newest first, with each run's **Task**, **Status**, **Environment**, **Duration** and when it **Started**.
>
> Narrow the list:
>
> * **Run views**: **All runs**, **Active**, **Needs review**, **Waiting for a person**, **Failed** or **Completed**, each with its count.
> * **Environment** for one cluster, **Run state** for one status, and **Search loaded runs** for a task name, a ticket number or text in the outcome.
>
> Search, counts and filters cover the runs loaded on the page. **Load more runs** loads 25 more, up to 100.
>
> You also reach a run from elsewhere:
>
> * a ticket's **Work** tab, under **Agent runs**, with **View run details**;
> * **Ankra AI → Overview**, under **Recent agent results**;
> * a link in a pull request comment, a check run or a notification. Such a link opens the agent's newest run. Until the agent has run, it reads **This agent task has not run yet** and checks again every few seconds.

> [tab] CLI
>
> ```bash theme={null}
> ankra agents runs
> ankra agents runs --status awaiting_user --status running
> ankra ai tasks runs "<agent name>"
> ```
>
> `ankra agents runs` lists the organisation's runs, newest first, with their **RUN ID**, **AGENT**, **STATUS**, **STARTED**, **FINISHED** and **OUTCOME**. `--task <task-id>` keeps one agent's runs.

> [tab] MCP
>
> `list_agent_runs` lists the organisation's runs, newest first. See [MCP tools](https://docs.ankra.ai/platform/mcp-tools.md).

**You should see** the run you are after in the list. Open it from its task name.

## 2. Read what it did

The run's page names its agent as **Ankra agent**, says when it started, and opens with what the run came to:

| Heading | Status | What it means |
| - | - | - |
| **Waiting to start** | Queued | The run is waiting to begin |
| **Work is in progress** | Running | The agent is working now |
| **Waiting for a person** | Waiting for a person | The run is parked on a question or an approval, and resumes once it is answered |
| **A plan is ready for review** | Waiting for a person, with **Plan to review** | The agent drafted a plan on its ticket that waits for your decision |
| **The run failed** | Failed | The run ended with an error |
| **Run completed** | Completed | The run finished. A completed run has not necessarily resolved its ticket |

A run can also read **Cancelled**, **Expired** or **Skipped**.

Below it, **Run activity** shows each step as **Readable activity**: what the **Ankra agent** wrote, each **Tool activity**, each **User message** and each **Platform observation**. **Technical view** shows the same record as JSON. The activity refreshes on its own while you watch, and **Load more activity** reads further.

**Run details** beside it gives the **Agent**, **Task**, **Environment**, linked **Ticket** and its **Ticket owner**, the **Duration** (for a live run, the time since it started, including any wait), **Turns recorded** and **Tool calls**. **Record identity** holds the run's id, its task id and its recorded status.

> [tab] CLI
>
> ```bash theme={null}
> ankra agents run <run-id>
> ankra agents transcript <run-id>
> ```
>
> `ankra agents run` prints the run in full: its agent, status, start and finish, goal status, session, trigger, outcome and turns. `ankra agents transcript` reads its session transcript; `--since <sequence>` returns only the events after one you have read.

> [tab] MCP
>
> `get_agent_run` returns one run in full, and can include the tail of its session transcript.

## 3. Answer what it waits for

A run that reads **Waiting for a person** resumes once a person answers. Where you answer depends on what it waits for:

* **A plan** - **Review change** opens the plan on its ticket. See [Plans, review and approval](https://docs.ankra.ai/platform/ai-board.md#plans-review-and-approval).
* **A choice** - **Open ticket** opens the ticket on the agent's question. Pick an option and press **Send decision to Ankra**. See [Answering a choice](https://docs.ankra.ai/platform/ai-board.md#answering-a-choice).
* **A production change** - the change waits under **Proposed production changes** on the ticket, and in [Needs you](https://docs.ankra.ai/platform/activity-inbox.md).
* **A failed run** - **Open ticket to steer the next step** opens its ticket. A comment under **Add context** wakes the agent with your instructions.

**You should see** the run move on from **Waiting for a person** once your answer is recorded.

## 4. Stop it

Stopping a run stops its next activity. Work it has already done is not undone, and its ticket stays open.

> [tab] Portal
>
> 1. On the run's page, press **Stop run**. It shows only while the run is queued, running or waiting for a person.
> 2. Read **Stop this run?** and press **Stop run**, or **Keep running** to leave it.
>
> On a ticket, **Request stop for this run** on the **Work** tab does the same.

> [tab] CLI
>
> ```bash theme={null}
> ankra agents cancel <run-id>
> ```
>
> The run and its session become `cancelled`, and Ankra interrupts the turn in flight within seconds, without pausing the agent itself. `ankra ai tasks stop "<agent name>"` pauses the agent as well.

> [tab] MCP
>
> `cancel_agent_run` cancels a live run and its session. Organisation admins only.

> [!WARNING]
>
> Stopping a run does not undo what it already changed. Check its **Run activity** and the ticket's **Recorded changes** before you decide what to do next.

**You should see** **The platform recorded the stop. Check the activity for work already performed.** and the run's status change to **Cancelled**.

To stop every agent at once, use **Pause autonomous actions** or **Stop all AI**. See [AI Autonomy](https://docs.ankra.ai/platform/ai-autonomy.md#stop-ankra-ai).

## Verify

Open **Ankra AI → Activity** and choose **Active**. A run you stopped is no longer in that view; under **All runs** it reads **Cancelled**. From the CLI, `ankra agents run <run-id>` prints `Status:   cancelled`.

## What can go wrong

| What you see | What it means |
| - | - |
| **The run changed. Refresh and review its current state before stopping it.** | The run moved on while you were deciding. Press **Refresh run**, read its state, and stop it again if it is still going |
| **The stop could not be confirmed. Your run has not been marked as stopped here. Refresh its activity before trying again.** | Ankra did not confirm the stop. Press **Refresh run** before you try again |
| **This run is not available** | The run is not visible to your role, or it no longer exists. Return to **Agent runs** |
| **No runs match this view** | No loaded run matches the view, state or search. Filters apply to the recent runs loaded on the page |
| **No readable activity was returned for this run.** | The run has recorded no activity you can read |

## Next steps

* [AI agents](https://docs.ankra.ai/platform/ai-agents.md) - the agents behind runs, and how to pause one
* [Set up the ticket desk](https://docs.ankra.ai/guides/ticket-desk.md) - tickets the Ankra agent works
* [Watch for a problem](https://docs.ankra.ai/guides/ai-watching.md) - investigations that run when an alert fires


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