Why it mattersCompaction rewrites long sessions into a summary that quietly loses file paths, exact errors, and constraints, so a decision-only approach keeps the parts a later step needs.
Tamara Tran published fast-jev-compaction, a Claude Code plugin that changes how the tool trims a long session. Instead of writing a shorter summary of the past, it decides one tool call at a time whether the call and its output are still needed, and keeps everything else exactly as it was. The repository is one day old and has 1,713 GitHub stars, 81 forks and 12 open issues as of this morning. It is MIT-licensed.
How it decides what to drop
For every tool call in the transcript, the plugin sends Jev, a small classification model from TypeSafe, two yes-or-no questions: should the call itself stay, and should its full result stay. Jev sees the whole conversation, oldest first, with each result replaced by a short note about its length. User and assistant text is never rewritten.
Above the keep threshold, which defaults to 0.5, both the call and its result stay. Below it but with a positive vote on the call itself, the call stays and the result is cut to its first 300 characters. Below both, the call is removed with its result. The newest six messages are always pinned and never touched.
What is different from a summary
The built-in Claude Code compaction asks a large model to rewrite the past as prose. That summary is short but lossy: file paths, exact error strings, the one command that worked, or a constraint the user stated once can disappear even when a later step needs them. The plugin's author states that everything kept is kept verbatim, which is the point of the design.
Reduction is not free. Jev sees the entire abridged history with every request, so a session close to the state ceiling can cost one request per small batch of questions. The library exposes reductionRatio, and the README suggests skipping the swap when the ratio comes in under 25 percent, since keeping the original transcript may then be the better option.
The plugin requires Claude Code 2.1.274 or newer and the function-hooks opt-in flag, plus a TypeSafe API key. When Jev cannot prune enough or fails, the plugin falls back to the built-in summary.
For a team running long agent sessions, the tradeoff is concrete: pay for a small classification model on every compaction, keep the raw details the assistant may need again, and skip the guessing about what the summary silently dropped.
Source
Source: GitHub
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.
