# Local savings telemetry

Reckon's optional telemetry is local, metadata-only, and disabled by default.
It uses `gpt-tokenizer@3.4.0` with the `o200k_base` encoding and records:

- the actual optimized response contract, bytes, and tokens;
- an executed full-file baseline only when the operation identifies bounded
  repository-contained files;
- byte and token savings, including negative savings;
- latency p50/p95 inputs, process RSS, cold/warm operation state, success/error
  outcome, agent round trips, truncation, detail mode, and MCP schema token cost;
- freshness failures, compression-fidelity samples, indexing time, and current
  local index storage where those measurements are available;
- a one-way SHA-256-derived repository identifier for per-repository grouping.

Unknown baselines remain `null`; Reckon does not invent a full-file comparison.
Persisted records contain no source or file paths. Enable persistence for an MCP
call with `persistTelemetry: true`. Records default to 30-day retention and are
stored mode `0600` with atomic replacement. Inspect and manage them with:

```text
reckon telemetry status
reckon telemetry report
reckon telemetry export
reckon telemetry clear
```

`--retention-days 1..3650` changes the read/persistence window. `--input` and
`--output` accept only repository-contained, non-symlink paths. `clear` is the
only command that deletes the private JSONL file; report and export never do.

The default report is `.reckon/telemetry-report.html`. It includes summary,
operation, time-series, private repository, indexing-cost, latency, freshness,
and fidelity views with light/dark styling. The default machine-readable export
is `.reckon/telemetry-export.json` and labels measured, modeled, and unknown
baselines explicitly. Neither artifact needs a daemon, hosted service,
authentication, or source egress.

Telemetry never persists source, raw tool output, command text, usernames, or
absolute paths. A measured baseline is an executed, bounded, repository-local
full-file read; it is not inferred from file counts. Unsupported baselines and
metrics remain `null` or are counted as unavailable instead of being modeled.
