COMMUNITY OBSERVEDMetric claims: AUTHOR REPORTEDSOURCE AUDITED🤖 Jev Agent

pi-jev-compaction

Automatic context clearing for Pi, without losing the conversation.

Overview & result

A Pi extension asks Jev which older tool outputs are unlikely to be needed, masks them from model-facing context, and keeps the originals retrievable through `jev_read` without rerunning commands.

From the original post

Keep the conversation. Clear stale tool output. Get the original back without running the command again.

— Nour

How Jev fits in the loop

  1. At model/tool boundaries, collect bounded excerpts from older large tool outputs after the configured context threshold.
  2. Ask Jev whether each output should remain available; protect recent context and mask only low-keep-probability outputs.
  3. Keep original session messages intact and expose `jev_read` to recover a masked result.

How to reproduce

  1. Install with `pi install git:github.com/nourhelmi/pi-jev-compaction` and set `TYPESAFE_API_KEY`.
  2. In Pi, inspect `/jev-status` and test `jev_read` recovery before relying on output clearing.

Why this build matters

A concrete context-management boundary: Jev judges relevance while Pi preserves original evidence and controls the model-facing context.

Limitations

  • Works in Pi, not standalone Claude Code or Codex CLI.
  • Credential redaction is heuristic; mocked tests do not establish live relevance quality.

Patterns