Tamara Tran's fast-jev-compaction Stops Claude Code From Forgetting Critical Tool Output
A new open-source Claude Code plugin uses TypeSafe's Jev decision model to prune agent context per tool call instead of summarizing it away.
- Tamara Tran open-sourced fast-jev-compaction, a Claude Code plugin replacing summary-based compaction with Jev keep/drop decisions.
- Uses TypeSafe's Jev System One model to score every old tool call and result in parallel.
- Surviving messages stay verbatim: no paraphrasing of file paths, errors, or commands.
- Ships as both an npm package and a Claude Code function hook, MIT licensed.
- Falls back to Claude Code's built-in summary if Jev fails or can't reduce enough.
- Similar Jev-based compactors are appearing for OpenCode and general agent loops.
fast-jev-compaction prunes Claude Code history without paraphrasing it
Claude Code compacts a long transcript when it approaches the context limit, replacing earlier turns with a generated summary. That summary can omit an error string, file path, shell command, or constraint needed later. Developer Tamara Tran has published fast-jev-compaction, an MIT-licensed plugin that uses TypeSafe’s Jev model to score historical tool calls for retention. User and assistant messages remain verbatim, while tool calls and results can be kept, truncated, or removed.
Tran distributes the project as both an npm package and a Claude Code function hook. When /compact or auto-compaction runs, the hook asks Jev which tool interactions still matter, applies those decisions in code, and invokes Claude Code’s built-in summarizer if Jev fails or removes too little.
Why classification fits compaction
TypeSafe describes Jev as a model for software-directed decisions. It returns typed choices, scores, and probability distributions that programs can consume directly. The company calls it a System One model trained with Reinforcement Learning for Calibrated Decisions, or RLCD. A request supplies shared state alongside several structured questions.
fast-jev-compaction maps that interface onto context management. Jev answers narrow retention questions for each eligible tool interaction, and deterministic TypeScript applies the results. Retained text stays exact because the model never generates replacement prose.
A pruning pipeline with guardrails
The library preserves all user and assistant text in its original order. Its pruning scope covers paired
This story is for Pro members
You've reached the end of the free preview. Upgrade to AlphaSignal Pro to read the full article - and everything else behind the paywall.