Skip to content
OpencodeView

Cache metrics

What the scanner materializes per session, and what every downstream lens queries.

These fields are computed once by the scanner and stored in the derived cache. Anything not listed here is read from the source at request time or not collected at all.

Canonical source ↗

What gets measured per session

Materialized by the scanner into the derived cache, and queried by everything downstream.

Tokens

  • input
  • output
  • reasoning
  • cache read
  • total per session and per message

Tool activity

  • tool call counts
  • tool error rate
  • per-tool error classes
  • duration p95 where sampled

Patch outcomes

  • apply_patch_ok
  • apply_patch_total
  • patch_count
  • summary_additions
  • patch precision

Context

  • compaction count
  • part counts
  • finish reasons
  • truncation detection

Time

  • latency
  • active_min — gap-clustered working time
  • activity bursts
  • total elapsed

Topology

  • is_subagent
  • delegation depth
  • parent session
  • descendant counts
  • CSV flags