Skip to content

pi-jev-compact

Selective verbatim context compaction for Pi: Jev scores each tool call and result, with optional stricter pruning of assistant prose.

Pluginbeta

Overview

pi-jev-compact is selective, verbatim context compaction for Pi using TypeSafe's Jev. Jev is asked per tool call whether the call and its output still matter, and what is no longer needed is deleted; everything else remains byte-identical, and no LLM writes a summary. It borrows the two-noul-per-call design, state fitting and decision mapping from fast-jev-compaction and the Pi session_before_compact integration from pi-vcc.

By default only tool calls and results are candidates. Because long sessions are dominated by assistant prose, /jev-compact text adds prose as candidates under a stricter threshold, since dropped reasoning cannot be recovered by rerunning a tool; user messages are never candidates. On a synthetic 1,860-message window, enabling prose raised reclaimed space from 15.5% to 33.5%. The README states 85 tests pass using fakes and that live runs work, but the quality of Jev's decisions has not been measured against a reference. It is independent of TypeSafe and the Pi authors.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes this tool call still matter?yes · no
Yes / noDoes this tool output still matter?yes · no
Yes / noDoes this assistant message still matter (opt-in, stricter threshold)?yes · no

How it works

  1. Run /jev-compact.
  2. Collect the live window and pair tool calls with results.
  3. Ask Jev keep questions; optionally include prose.
  4. Delete unneeded items; keep the rest verbatim.

Strengths

  • No paraphrasing of kept content.
  • Optional prose pruning reclaims more space.
  • Honest about unmeasured decision quality.

Caveats

  • Decision quality not benchmarked.
  • Dropped prose cannot be recovered.

Getting started

Install the extension into Pi, set your TypeSafe key, then run /jev-compact.

At a glance

Type
Plugin
Status
beta
Language
TypeScript
Runtime
Pi extension
Has code
yes
Has tests
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

Can it remove assistant text?

Only if you opt in with /jev-compact text, under a stricter threshold.

Are user messages ever removed?

No.

Has accuracy been measured?

No, the README says decision quality has not been measured against a reference.

Related projects

  • Codex plugin that builds handoff packets by asking Jev whether each old read-only tool record should stay, keeping retained text verbatim.

    ProjectbetaJavaScript
  • Agent plugin that asks Jev whether the session is at a safe boundary to /compact and can trigger it on Pi and Claude Code.

    PluginbetaTypeScript
  • Pi extension where Jev judges each completed tool call and result before compaction, keeping key evidence verbatim in the summary.

    PluginbetaTypeScript
  • Oh My Pi extension that truncates tool calls and results Jev scores as no longer needed, while keeping all user and assistant text verbatim.

    PluginbetaTypeScript
  • Pi extension that prunes stale tool calls with two Jev yes/no questions each, keeping text verbatim and leaving summaries to Pi.

    PluginbetaTypeScript
  • Pi port of fast-jev-compaction using Pi's context hook, with a savings gate against low-value pruning and retained status notes.

    PluginbetaTypeScript