[0.31.0] - 2026-04-27
Changed
burn summarynow reads fromarchive.sqliteinstead of streamingledger.jsonl(#82). The default hot path callsbuildArchive()(cheap incremental tail scan after the per-invocationingestAll) and issues SQL with filters lowered to indexedWHEREclauses againstturns, replacing the per-invocation full ledger walk + stamp fold. Subagent-tree (--subagent-tree) and--by-subagent-typemodes consume the same archive-derived turn slice. Output (text +--json) is parity-preserved against the legacy reader for thebyModel,totalCost, andfidelityblocks. Two escape hatches preserve the old behavior: a new--no-archiveflag and theRELAYBURN_ARCHIVE=0env var both revert toqueryAll. If the archive path throws (corrupt sqlite, schema mismatch we couldn't recover from cleanly), the command transparently falls back to the streaming reader and surfaces the reason on stderr — the archive can never wedgeburn summary.