Skip to content

Receipt 0.4.0 — session health

Choose a tag to compare

@noah-thing noah-thing released this 30 Jun 20:05

Receipt now keeps your agent sharp, not just cheap. 🧠

receipt health     # is the current session still sharp?

Long AI-coding sessions get worse before they hit any limit — context rot, lost-in-the-middle, instruction drift, looping, and lossy auto-compaction set in while the window still has room. Built from a six-agent research sweep (RULER, lost-in-the-middle, Chroma's context-rot study, the multi-turn "lost in conversation" finding, and Anthropic's context-engineering guidance), receipt health reads the same local ledger and scores the latest session for:

  • context fill — by % and absolute tokens (big windows degrade by absolute size)
  • session length & age — multi-turn drift past ~12 turns; accumulation slowdown past ~2h
  • cache reuse — low reuse means the context is churning
  • auto-compaction cascades — each summary loses precise detail
  • looping — retries that re-send everything for nothing

…then tells you the move to make before quality drops: /compact (proactively at 50–60%), /clear between tasks, a fresh session with a handoff, or /rewind out of a loop.

It never tells the agent to think or write less — every suggestion refreshes context to preserve full capability. The live gauge also rides in receipt statusline and receipt fuel. Research, signals, and thresholds: docs/SESSION-HEALTH.md.

Deterministic and local — no API key, nothing leaves your machine. 89 tests, typecheck clean. MIT.