pi-fast-jev-compaction
Pi extension that prunes stale tool calls with two Jev yes/no questions each, keeping text verbatim and leaving summaries to Pi.
Overview
@joelhooks/pi-fast-jev-compaction is a Pi 0.85.1 extension that keeps conversation text verbatim while pruning stale tool history using TypeSafe Jev. It is deliberately layer one only: it does not summarise, rewrite or create memory, and when pruning cannot free enough context, Pi's built-in summary compaction takes over.
It sends a compact view of tool calls and surrounding conversation to /v1/systemone and asks two noul questions per eligible call: keep the call, and keep its result. Decisions are monotonic: keep, drop_result (keep the call and a deterministic head of the result) or drop_call (remove both). The first and recent messages are pinned, decisions are stored as append-only custom session entries and rebuilt on reload, resume or fork, and only the context sent to the model is filtered; the JSONL session file is never rewritten. Settings cover thresholds, pinned message count, token budgets, compaction trigger percentage, minimum reduction and cooldown. The key can come from an environment variable or a helper command and is never logged.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Keep this tool call? | yes · no |
| Yes / no | Keep this tool result? | yes · no |
How it works
- At the compaction trigger, build a compact state of tool calls and context.
- Ask two noul questions per eligible call.
- Apply keep, drop_result or drop_call monotonically.
- Fall back to Pi summary compaction if not enough is freed.
Strengths
- Conversation text stays verbatim.
- Session file never rewritten.
- Decisions persist across reloads and forks.
Caveats
- Targets Pi 0.85.1 and Node 24.18.
- Requires a TypeSafe key.
Getting started
pi install git:github.com/joelhooks/pi-fast-jev-compaction and export TYPESAFE_API_KEY.At a glance
- Type
- Plugin
- Status
- beta
- Language
- TypeScript
- Runtime
- Pi extension
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Context management: Pi extension that keeps conversation text verbatim while pruning stale tool history with Jev, falling back to Pi's own summarization only when pruning cannot free enough room.
yibie/awesome-jevA Pi extension that prunes stale tool history verbatim and falls back to Pi summary compaction when needed.
logicrw/awesome-jev-projectsPi extension that prunes stale tool history and leaves summary compaction to Pi when pruning is insufficient.
cobanov/awesome-jevPi extension: verbatim context compaction with TypeSafe Jev decisions.
hellogumbo/awesome-jev
Frequently asked questions
Does it summarise?
No, it only prunes tool history; Pi's own summary compaction handles the rest.
Are my session files changed?
No, only the context sent to the model is filtered.
How is the key handled?
From an environment variable or a helper command, cached in memory and never logged.
Related projects
Codex plugin that builds handoff packets by asking Jev whether each old read-only tool record should stay, keeping retained text verbatim.
ProjectbetaJavaScriptAgent plugin that asks Jev whether the session is at a safe boundary to /compact and can trigger it on Pi and Claude Code.
PluginbetaTypeScriptPi extension where Jev judges each completed tool call and result before compaction, keeping key evidence verbatim in the summary.
PluginbetaTypeScriptOh My Pi extension that truncates tool calls and results Jev scores as no longer needed, while keeping all user and assistant text verbatim.
PluginbetaTypeScriptPi port of fast-jev-compaction using Pi's context hook, with a savings gate against low-value pruning and retained status notes.
PluginbetaTypeScriptSelective verbatim context compaction for Pi: Jev scores each tool call and result, with optional stricter pruning of assistant prose.
PluginbetaTypeScript