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

# Runs and logs

> List past commands, run in the background, follow output and cancel.

Every command ProofPod runs in the cloud is recorded as a **run**, with an id
such as `run-19f3a2c4d5e6f7a`. A run keeps its output, status, usage and cost,
so you can review it, follow it from another terminal, or cancel it.

## Listing runs

```console theme={null}
$ pp runs            # the 15 most recent runs
$ pp runs -n 50      # more
```

Each row shows the run id, its status, the command, the workspace, the wall
time, the cost and when it started. The status is `ok` for exit code 0,
`exit N` for any other exit code, `timeout`, `out of memory`, `cancelled` or
`error`, or the current state of a run still in progress.

The same list, with usage over time, is in the
[dashboard](https://proofpod.dev/app/).

## Reading a run's output

```console theme={null}
$ pp logs run-19f3a2c4d5e6f7a       # print the output so far
$ pp logs -f run-19f3a2c4d5e6f7a    # follow until the run ends
```

stdout and stderr are replayed to the matching stream. With `-f`, `pp logs`
exits with the run's exit code, so it can stand in for the original command in
a script. Ctrl-C stops following without cancelling the run.

## Running in the background

```console theme={null}
$ pp --detach lake build
run-19f3a2c4d5e6f7a
$ pp logs -f run-19f3a2c4d5e6f7a
```

`--detach` (`-d`) uploads your sources, starts the command and prints its run
id. The command keeps running after you close the terminal.

Source files a detached command changes are not synced back to your machine,
since nothing is waiting for it. Use a normal, attached command for anything
whose changes you want locally, such as `pp lake update`.

## Cancelling

* **Ctrl-C** in the terminal running the command cancels it in the cloud and
  waits for it to stop. Press it again to stop waiting immediately.
* **`pp cancel RUN_ID`** stops any of your runs, including detached ones.

A cancelled command exits with 130.

## Concurrent commands

A workspace runs one command at a time. A second command started while the
first is still running waits for it:

```console theme={null}
proofpod: waiting for another command in this workspace to finish
```

This mirrors Lake, which takes a lock on the build directory, and it keeps the
usage meter attributable to one command. If the second command asks for
different limits or versions than the running one, it is refused rather than
queued; wait, or stop the first with `pp cancel`.

Different workspaces (different projects, or different machines) run
independently. An account can run 8 commands at once. To run several commands
in parallel within one project, give each its own
[named workspace](https://docs.proofpod.dev/guide/sync.md#workspaces).


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