AI product Open source

fast-jev-compaction

fast-jev-compaction is an npm library and Claude Code plugin that compacts tool-call history without rewriting the original text. It pairs each tool call with its result, sends the conversation state and questions about each non-pinned call to Jev, and then keeps the call and result, keeps only the call while truncating the result, or removes both according to Jev's scores. Recent messages and the first message are pinned; state fitting progressively truncates inputs, abridges long text, collapses older messages, and reduces old tool calls to one-line records so requests fit within configured token estimates. User and assistant text is never removed or shortened in the returned transcript, and retained content stays verbatim. The package exposes compaction, decision, batching, state-fitting, and transport-building functions, while the Claude Code hook replaces built-in compaction and falls back to Claude Code's summary when Jev fails or reduction is insufficient. It uses the TypeSafe API by default and requires a TypeSafe API key.

View repository Mentioned in 2 videos ↓

What fast-jev-compaction is used for

2 uses taken from transcripts — each links to the moment in the video.

  • Compacts Jev tool-call context without rewriting the original text. It scores calls and results, deleting only those no longer needed.

  • Compacts long coding-agent sessions by asking Jev which previous tool calls and results still matter, dropping or shortening stale items while preserving retained text word for word. It is available as an npm library and plugin.

Videos mentioning fast-jev-compaction

2 in the library.