ancha logs prints the events of a run: run_started, then trial_started and trial_finished for each trial. With --follow, it keeps printing new events until the run ends and exits with the run’s exit code. Use it to watch a run started with ancha run --detach.
Example
Output
logs --follow exits 1. With --json, the same events print as NDJSON, one object per line, the same objects ancha run --json prints. See For coding agents for their fields.
latest is the newest completed run. Without one, logs latest exits 2 with no finished run yet and the hint ancha logs <run id>; ancha run --detach prints one. If you passed --out to ancha run, pass the same --out here.
Pressing Ctrl-C stops logs only; the run keeps going. ancha wait prints progress and then the run’s summary instead of the raw events, and ancha status prints one line with the run’s state.
Exit codes
Without--follow: 0 when the run exists. With --follow: the run’s own exit code, 0 to 4, or 3 when the run’s worker stopped reporting and the outcome is unknown. 2 for an unknown run id or no finished run.