Show recent run history, or one run's steps and errors

Usage: barca history [OPTIONS] [RUN_ID]

Arguments:
  [RUN_ID]
          One run in detail: its fields, the steps it recorded (the first 1000, failed steps always; --limit and --all change it), and each failed step's error, traceback and how its worker ended

Options:
      --reconcile <RUN_ID>
          After verifying a run stopped, record it as interrupted; refuses a proven live owner

      --status <STATUS[,...]>
          Only runs with one of these statuses (comma-separated): success, failed, cancelled, error, running, interrupted; not_successful is every one but success and running

      --target <NAME>
          Only runs whose target or job is this node (a function name or node id); runs of every node (`all`) are left out

      --triggered-by <TRIGGER[,...]>
          Only runs started this way (comma-separated): manual, api, schedule, client

      --not-triggered-by <T[,...]>
          Without the runs started this way (comma-separated): schedule hides the cron ticks and keeps the runs that recorded no trigger

      --search <TEXT>
          Only runs whose run id, target or job contains this text, whatever its case

      --activity
          Instead of the runs: how many started in each of the last 24 hours (UTC), by status and by what started them, with each hour's median time and leading failure, counted over every recorded run; takes --status, --triggered-by, --not-triggered-by, --search

      --since <WHEN>
          Only runs started at or after this: a duration back from now (30m, 24h, 7d, 2w), an RFC 3339 time or a UTC date (2026-10-22)

      --until <WHEN>
          Only runs started before this, written as --since is: with it, a window

  -l, --limit <LIMIT>
          Maximum recent runs (default: every run in JSON, 10 in a human table); with a RUN_ID, the most steps listed (default 1000)

      --all
          Show every recorded run (no limit); with a RUN_ID, every step it recorded

      --json
          Emit JSON on stdout (the default when stdout is not a terminal)

      --pretty
          Emit human-readable output (the default when stdout is a terminal)

      --fields <FIELDS>
          Select JSON fields as a comma-separated list; implies --json

          [possible values: run_id, command, files, target, job, status, steps_total, steps_executed, steps_cached, attempts, started_at, finished_at, elapsed_seconds, triggered_by, scheduled_at, schedule_id, client_run_id, failure, failed_node, error, principal, trigger_reason, cancellation, line, now]

      --env <ENV>
          Use a separate cache and history for this environment

      --server [<URL>]
          Use a server (URL or configured); get/run execute its deployed code

      --local
          Run on this machine; ignore a configured server and this project's barca serve

  -h, --help
          Show concise command help

      --examples
          Show all command examples without running anything

Examples:
  barca history                # last 10 in a terminal, every run as JSON when piped
  barca history -l 25          # last 25
  barca history --all          # every recorded run
  barca history --reconcile RUN_ID --json   # record a verified-stopped run as interrupted
  barca history --json         # {runs: [...], total, truncated, hint?}, even in a terminal
  barca history --pretty       # the table, even when piped
  barca history --fields run_id,status,elapsed_seconds,attempts   # JSON with only these keys per run
  barca history --fields run_id,triggered_by,scheduled_at   # what started each run (manual, api, schedule, client)
  barca history --fields run_id,job,status   # what each run was for: `all` or its resolved node ids
  barca history --env dev      # runs recorded in another environment
  barca history --server -l 20 # the runs of the configured barca server (barca docs server-mode)
  barca history --local        # this machine's runs, even with a server configured
  barca history --status failed            # failed runs only, each with its failing step and error
  barca history --status failed,interrupted --since 24h   # what went wrong in the last day
  barca history --target clean             # runs whose target or job is clean
  barca history --triggered-by schedule    # runs started by a cron tick (manual, api, schedule, client)
  barca history --not-triggered-by schedule   # every run but the schedule's, also the ones that recorded no trigger
  barca history --status not_successful --not-triggered-by schedule   # what went wrong in the runs someone started
  barca history --search daily_report      # runs whose run id, target or job contains the text
  barca history --since 2026-10-22T08:00:00Z --until 2026-10-22T09:00:00Z   # the runs started in one hour
  barca history --status running           # runs in progress, each with the nodes it is executing now
  barca history --status running --json --fields run_id,now   # {running: [...], queued, keys, groups, line} per run
  barca history --activity                 # the last 24 hours, hour by hour: runs by status and by trigger, median time, leading failure
  barca history --activity --json          # {activity: {since, until, hours: [...], total, excluded, summary}}
  barca history --activity --not-triggered-by schedule --server   # a server's activity without its schedule's runs, and what that left out
  barca history --activity --status not_successful --search daily_report   # when the runs of one target went wrong
  barca history --since 2026-10-22T08:00:00Z --json   # runs started at or after a time
  barca history 7f30b3e9       # one run: its steps, attempts, artifacts, errors and tracebacks
  barca history 7f30b3e9 --json   # {run, steps: [...], steps_page: {total, truncated}, hint?}
  barca history 7f30b3e9 --limit 50   # one run's first 50 recorded steps (failed steps always listed)
  barca history 7f30b3e9 --all --json # every step the run recorded
  barca history --status failed --json --fields run_id,failed_node,error   # why each run failed

More: barca docs agents, barca docs cache
