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

# critiqor finalize — Generate Diagnosis and Open Dashboard

> critiqor finalize stops an active monitoring session, runs the diagnosis engine, saves a diagnosis report, and launches the local dashboard.

`critiqor finalize` is the command you run after your OpenClaw session has ended. It closes the active monitoring session, merges all collected evidence, runs the Critiqor diagnosis engine, and — unless you pass `--no-dashboard` — automatically opens the local results dashboard in your browser.

Call it once per session, any time after `critiqor monitor openclaw` has returned (or even if OpenClaw is still running and you want to cut the session short).

## Syntax

```bash theme={null}
critiqor finalize [OPTIONS]
```

## Options

| Option            | Default      | Description                                                |
| ----------------- | ------------ | ---------------------------------------------------------- |
| `--runs-dir TEXT` | `runs`       | Directory containing run artifacts                         |
| `--no-dashboard`  | *(flag)*     | Finalize without opening the local dashboard               |
| `--host TEXT`     | `127.0.0.1`  | Dashboard host                                             |
| `--port INT`      | `0` *(auto)* | Dashboard port — `0` picks an available port automatically |

## What happens when you run it

1. **Loads the active session** from `runs/active_session.json`.
2. **Reads lifecycle events** from the run's event log JSON.
3. **Reads plugin evidence** from `runs/<run_id>/session.json` written by the Critiqor OpenClaw plugin.
4. **Merges both event sources** and writes a combined session summary for the run.
5. **Runs the diagnosis engine** — detects failure causes, scores reliability dimensions, and builds the causal graph.
6. **Writes `runs/<run_id>/diagnosis.json`** with the full structured diagnosis.
7. **Removes `runs/active_session.json`**, marking the session as completed.
8. **Starts the local dashboard** and opens it in your default browser (skipped if `--no-dashboard` is set).

## Output

```
Stopping observer...
Finalizing evidence...
Generating diagnosis...
Diagnosis saved: runs/run_001/diagnosis.json
Starting local dashboard...
Dashboard run: run_001
Critiqor dashboard: http://127.0.0.1:54321/?run_id=run_001
```

The URL remains accessible for as long as the dashboard process is running. Use `critiqor dashboard` to relaunch it later.

## Troubleshooting

**"No active Critiqor monitoring session found."**
: There is no `runs/active_session.json` in the current `--runs-dir`. Either no session has been started yet, or it was already finalized. Start a new session with:

```bash theme={null}
critiqor monitor openclaw
```
