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.
How Jev fits in the loop
- At model/tool boundaries, collect bounded excerpts from older large tool outputs after the configured context threshold.
- Ask Jev whether each output should remain available; protect recent context and mask only low-keep-probability outputs.
- Keep original session messages intact and expose `jev_read` to recover a masked result.
How to reproduce
- Install with `pi install git:github.com/nourhelmi/pi-jev-compaction` and set `TYPESAFE_API_KEY`.
- 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.