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

> ## Agent Instructions
> These docs describe the Ancha CLI, npm package @ancha-labs/cli version 0.1.4, and the hosted workspace at app.ancha.io. Coding agents should start at https://docs.ancha.io/coding-agents. Run the CLI as `ancha` after `npm install -g @ancha-labs/cli`, or as `npx -y @ancha-labs/cli@0.1.4` without installing. Pass --json for machine-readable output, or set ANCHA_JSON=1. Every command ends with a `next:` line naming the next command. Exit codes: 0 pass, 1 a check failed or a comparison regressed, 2 usage, config or authentication error, 3 infrastructure error, 4 unimplemented endpoint with --strict.

# ancha status

> Show the lifecycle state and progress of a foreground or detached ancha run.

`ancha status` reports where a run is: running, finished or failed, and how many trials are done. It works for runs started with `--detach` and for runs still in the foreground in another terminal.

```bash theme={null}
ancha status [options] <id>
```

| Argument | Description |
| - | - |
| `id` | Run id |

| Option | Description |
| - | - |
| `--out <dir>` | Run directory (default: .ancha/runs) |

## Example

```bash theme={null}
ancha status run_20261031-070757_e0649a40912674ba
```

```text Output theme={null}
run_20261031-070757_e0649a40912674ba running 2/3
```

```bash theme={null}
ancha status run_20261031-070757_e0649a40912674ba --json
```

```json Output theme={null}
{"version":1,"runId":"run_20261031-070757_e0649a40912674ba","state":"finished","pid":90176,"startedAt":"2026-10-31T07:07:57.945Z","updatedAt":"2026-10-31T07:07:58.478Z","completedTrials":3,"totalTrials":3,"exitCode":0}
```

`exitCode` appears once the run has finished, and is the code `ancha run` would have returned. If a detached worker stops sending heartbeats for 15 seconds, observers report it as failed or uncertain. To see the run's events instead of one line, use [`ancha logs`](https://docs.ancha.io/cli/logs).

## Exit codes

`0` when the run exists. `2` for an invalid run ID:

```text Output theme={null}
error[USAGE]: invalid run id
hint: use the run id returned by run
```


## Related topics

- [ancha run](https://docs.ancha.io/cli/run.md)
- [Troubleshooting](https://docs.ancha.io/troubleshooting.md)
- [ancha logs](https://docs.ancha.io/cli/logs.md)
- [Attempts and runs](https://docs.ancha.io/concepts/attempts-and-runs.md)
- [Results in your workspace](https://docs.ancha.io/cloud/results.md)


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