Skip to content

v0.3.1 — Compaction usage, retry waits and cache ratios

Choose a tag to compare

@RobertKoval RobertKoval released this 10 Sep 13:02

Extends the existing metrics collector without new dependencies, tables, daemons or tracing infrastructure.

  • Collect Pi-reported compaction usage and immutable cost snapshots for workers and optionally the main agent. Compactions remain separate operations, not invented single model calls.
  • Measure observed worker retry backoff, preserve each assistant attempt's reported usage, and retain tasks until Pi fully settles.
  • Compute cache-read ratios for reviewed Pi 0.85 OpenAI, Codex and Anthropic adapters. Unknown/custom providers, incomplete counters and legacy records remain N/A. Mixed daily aggregates disclose missing coverage.
  • Show compactions, retry waits and cache ratios in the existing dashboard and exports.

Validation: 109 offline tests; installed-Pi smoke; browser verification; live two-Pi test with four worker calls and two real compactions. Collected token/cache totals matched actual session logs, same-PID reuse was preserved, and workers exited after cleanup. Independent review approved.

Boundaries: hidden SDK HTTP retries and main-agent retry backoff remain unobservable through these interfaces. Worker RPC compaction lacks extension provenance, so model/provider attribution stays unknown while usage and project/session/worker attribution are retained. No prompts, summaries, error text or tool arguments are persisted.

Update with pi update git:https://github.com/RobertKoval/pi-persistent-subagents, then open a fresh Pi session. Avoid /reload during active worker work: it terminates workers.