# Runs and cost

> Every execution of a step, what it cost, and what it left behind.

A run is one execution of a [step](/docs/steps), and what it cost: the state it
ended in, the output as it came, the exit code of a command, the spend and
duration of an agent turn, the lane it was sent from, the folder it ran in and
the session it ran as.

A card shows its runs. That is how "the agent is doing something" becomes a
sentence with numbers in it.

## Where they are

On a card, the **Runs** section lists its own, newest first, with **Stop**
beside one that is still going. For the whole board, **Runs** in the board
toolbar opens the list of every run, filtered by **Lane**, **State**, **From**
and **To**.

The empty states are three different sentences, because they are three
different situations: no lane runs anything yet, nothing has run yet, or
nothing matches the filter you set.

<!-- Screenshot — the Runs list with a failed run expanded. -->

## The states

| State | What it means |
|---|---|
| `running` | still going |
| `ok` | the step finished and reported an answer |
| `failed` | it ran and did not |
| `cancelled` | somebody stopped it |
| `lost` | the app closed while it was running |

`lost` is the honest cost of having no daemon: a run in flight belongs to the
window that started it, and at the next launch those rows are closed rather
than left saying they are still working. Your terminals are not affected — they
are tmux sessions, and they outlive the window.

## Cost

Every agent step declares a [spending cap](/docs/agent-steps), and what the
turn actually spent is written on the run and added up on the card. A command
step costs nothing of its own; so does starting a
[session](/docs/session-steps), and what you then spend driving that session by
hand is not read back — the card counts its runs and is quiet about the rest.

[Usage](/docs/usage) has the totals by day, model and project, and,
project-scoped, this project's cards by what their runs cost.

Secrets devpit handed out — a [profile's](/docs/profiles) environment, the
account token, the hook secret — are taken out of a run's output before it is
stored. That is not detection: a secret the command read from a file or fetched
itself is one devpit never saw, and it passes through.

## What it proves

A run also records the circumstances it happened in, so a green row can answer
*green on which code*. Expanding a run opens that panel — see
[Reading a check](/docs/checks).
