← Back to Leaderboard
Ftamaratran

tamaratran/fast-jev-compaction

Claude Code hook and TypeScript library for pruning tool history without rewriting prose.

View on GitHub ↗
Engineering Health (Methodology)
B · 63/100
Maintenance Activity
● Updated 2mo ago
Latest Release
Rolling commits (main)
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance20/35
Fork Adoption17/25
Release Cadence6/20
License Clarity20/20
API
Total Stars
★ 8,043
24h Growth
+1
7d Growth
+13
Forks
595

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

tamaratran/fast-jev-compaction Star History (2026-09-16 - 2026-12-04) ALL-TIME STAR HISTORY (2026-09 – 2026-12) +8k in 79d · avg +102/day 8.5k 4.2k 0 2026-09-16: ★ 12026-09-26: ★ 6,8572026-10-03: ★ 7,2602026-10-10: ★ 7,5012026-10-17: ★ 7,6302026-10-24: ★ 7,7142026-10-31: ★ 7,7882026-11-05: ★ 7,8742026-11-10: ★ 7,9292026-11-15: ★ 7,9642026-11-20: ★ 7,9952026-11-25: ★ 8,0212026-11-30: ★ 8,0362026-12-04: ★ 8,043 ★ 8k 09-16 10-25 12-04

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

The repository separates a TypeScript npm library in src/ from its Claude Code integration. The marketplace metadata lives in .claude-plugin/, and hooks/fast-jev.ts adapts session.compact transcripts to the library. The Message type is a subset of Claude Code's SessionMessage. The compactor joins tool_use and tool_result blocks by tool_use_id and pins calls in the first message and the newest six messages by default.

The library builds an oldest-first scoring state from the conversation, replacing result bodies with short status and length notes while including text and tool inputs subject to fitting. Each eligible call generates two noul questions: whether the call is still useful and whether the result needs to survive verbatim. Answers feed the decision and output stages. The hook replaces the built-in summary only when the compactor succeeds and achieves sufficient reduction; otherwise it falls back.

Key Capabilities & Differentiators

The default client targets jev-latest at TypeSafe's System One endpoint. It applies a default keep threshold of 0.5 to separate call and result scores; a result that meets the threshold keeps its associated call as well. Tool results can be kept verbatim, truncated with a default 300-character head before an omission note, or removed as part of pruning. User and assistant prose stays unchanged and in order in the output, even when abridged in the scoring state.

State fitting uses a heuristic token estimate. It first shortens oversized tool inputs, then progressively abridges or collapses older unpinned entries. It throws if the state still cannot fit the default 25,000-token estimate. Questions are batched under a default estimated request ceiling of 30,000 tokens, below Jev's 32,000-token limit. Batches run concurrently and resend the same fitted state. The library exposes per-call decisions, fitting and request statistics, and a reductionRatio helper for caller-side acceptance checks.

Trade-offs & Limitations

Compared with Claude Code's built-in summary, selective pruning preserves exact wording, paths, and error text wherever it keeps the original content. The exchange is narrower coverage: prose is never shortened in the compacted output, so session histories dominated by long text may see little benefit. Because scoring sees only status and size notes for tool results, a keep probability cannot establish that the model noticed a decisive detail in the result body. Re-running a tool may also produce a different result.

Concurrency sends batches in parallel, but it does not reduce the bytes sent: each batch resubmits the fitted state, so a state near its ceiling leaves little room for questions and can raise request volume and API cost. Heuristic token budgeting is not an exact admission check. The hosted path also introduces a data boundary: message text and tool inputs may include sensitive information even though raw result bodies are omitted. MIT covers the repository code, not the hosted service's terms or data handling.

Hardware & Deployment Guide

For library use, install fast-jev-compaction on Node.js 18+ and supply TYPESAFE_API_KEY for the default client. The Claude Code path requires version 2.1.274 or newer and the early-access CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 flag. Add tamaratran/fast-jev-compaction as a plugin marketplace, install fast-jev-compaction@fast-jev-compaction, then restart or use /reload-plugins. A checkout can also be loaded with claude --plugin-dir .

The default deployment is API-backed, with no local model, GPU, or VRAM requirement. Size the local process around transcript size and concurrent requests rather than model weights. JevAsker and the request/response helpers support a custom transport, but do not provide an offline or self-hosted inference stack. Unit tests use a fake Jev; the npm demo exercises the live service. There is no GitHub release milestone listed to use as a compatibility reference.

Integration: The session.compact function hook covers /compact and automatic compaction, with built-in summary fallback.
Pairing: tool_use_id links calls to results; calls in the first message and newest six messages are pinned by default.
Scoring: Jev receives separate keep questions for the call and its result, with a default threshold of 0.5.
Request budgeting: Estimated ceilings of 25,000 state tokens and 30,000 total request tokens drive fitting and concurrent batching.
Data boundary: Raw tool results stay out of the scoring state, but conversation text and tool inputs can still be sent to TypeSafe.
Extensibility and diagnostics: JevAsker supports custom transport; result.stats reports decision counts, fitting stage, and request count.
Best For

Tool-heavy Claude Code sessions or TypeScript agents that need exact conversation text and can send the scoring state to TypeSafe. Pilot on representative transcripts to check reduction and whether important tool outputs survive.

Skip If

Prose dominates context growth, historical outputs must never be lost, or your environment cannot send transcript data to a hosted service and you do not have an approved compatible backend.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

API
npm install fast-jev-compaction
export TYPESAFE_API_KEY=...

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
fast-jev-compaction ★8k+13TypeScriptMITClaude Code hook and TypeScript library for pruning tool history without rewriti
ECC316.1k+4.2kJavaScriptMITPlugins and CLI workflows for planning, reviewing, and verifying agent-written c
ponytail204.4k+4.1kJavaScriptMITA prompt-driven coding-agent plugin for smaller changes and focused tests.
spec-kit153.8k+1.3kPythonMITA Python CLI for spec-driven coding-agent workflows and reviewable handoffs

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/tamaratran/fast-jev-compaction.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

tamaratran/fast-jev-compaction Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about fast-jev-compaction

How does the plugin replace Claude Code's compaction summary?

The function hook handles session.compact for both /compact and automatic compaction. The library pairs tool calls and results by tool_use_id, scores eligible pairs, and returns pruned messages. The hook uses those messages instead of a summary only when compaction succeeds and removes enough material; otherwise Claude Code uses its built-in summary.

Does it need a GPU, and what drives runtime overhead?

The default path uses Node.js 18+ for the npm library and calls a hosted API, so there is no local model to load and no GPU or VRAM requirement for inference. Size local memory for transcript processing and in-flight requests. For long sessions, the main operational variable is how many concurrent batches resend the same fitted state; no measured memory or latency figures are available.

Can we use it commercially or keep transcript data on our own infrastructure?

The MIT license permits commercial use of the repository code subject to its notice requirements. That license does not cover the hosted Jev service. The default client sends conversation text and tool inputs to TypeSafe, so review the service terms and your data-handling rules before deployment. JevAsker lets you supply another transport, but the project does not ship a self-hosted Jev backend.

When is this a better fit than Claude Code's built-in summary?

Choose Jev-based pruning when exact paths, commands, and user constraints matter and older tool traffic accounts for most context growth. Choose the built-in summary when long prose is the main contributor or when you need to avoid another provider dependency. For stale results that can be reproduced, dropping them may be acceptable; for one-time or changing outputs, re-running a tool is not equivalent to retaining the original result.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining tamaratran/fast-jev-compaction? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature tamaratran/fast-jev-compaction on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare