Repo3 days ago

fast-jev-compaction Hit 4,700 Stars in Three Days and Its npm Install Line Returns a 404

A Claude Code compaction plugin went from nothing to 4,700 stars in three days. We cloned it, built it and measured 86.7% transcript reduction on a real session, then discovered the install command in its README points at a package that was never published.

The WJS Desk

Sep 21, 2026 ยท 8 min read

Photo by Tima Miroshnichenko on Pexels

The repository was created on September 17. When we pulled the GitHub API three days later it had 4,700 stars, 259 forks and 54 open issues. The last commit was two days old.

The pitch is the kind that gets starred on sight. Claude Code's compaction replaces your old turns with an LLM-written summary, and summaries lose things: the exact error string, the file path, the constraint you set forty minutes ago. fast-jev-compaction never rewrites anything. It scores every tool call and every tool result, drops the ones that are done with, and leaves everything it keeps byte for byte identical.

We cloned it and spent an afternoon on it, because a design that good usually has something expensive hiding under it.

What it actually is

It is 957 lines of TypeScript in src/, a 310-line Claude Code hook in hooks/, and 582 lines of tests. It has zero runtime dependencies. The only entries in package.json are four devDependencies: TypeScript, vitest, tsx and node types. npm install finished in 1.5 seconds.

The core idea is that the model never sees your tool output. It sees a skeleton of the conversation where every result has been swapped for a note like ok, 4213 chars (omitted), and then it answers two yes-or-no questions per tool call. Here is one, exactly as the library builds it:

call_t1 {
  "type": "noul",
  "instructions": "Tool call t1 (Read) should stay in the history:
    knowing this call was made, with its input, still matters
    for what the assistant does next"
}

The answers come back as calibrated probabilities from Jev, TypeSafe's "System One" model, which returns typed decisions instead of text. Three outcomes follow from the two probabilities: keep the call and its result verbatim, keep the call but truncate the result to its first 300 characters, or delete both.

We ran it on a real transcript

We built a session out of this site's own repository: eight Read calls pulling in the real contents of our draft gate, our push script, our trending fetcher and our CLAUDE.md, wrapped in the message shape Claude Code actually emits. That came to 18 messages and 36,154 characters of content.

We do not have a TypeSafe API key, so we implemented the library's JevAsker interface and answered the questions ourselves with fixed probabilities. That means every number below measures the plumbing, not Jev. We say more about that gap in a moment, because it is the whole review.

Decision forcedMessagesCharsReductionLocal time
Keep everything18 to 1836,154 to 36,1540.0%1 ms
Keep calls, truncate results18 to 1836,154 to 7,35979.6%1 ms
Drop calls and results18 to 1236,154 to 4,80486.7%0 ms

All three tiers behave exactly as documented, and the local work is free. The number we found most persuasive is not in that table: to make decisions about a 36 KB transcript, the state it shipped was 1,016 estimated tokens in a single request carrying 12 questions. Stripping results out of the state is what makes the whole approach affordable, and it works.

The build side is equally clean. tsc --noEmit passed for both the library and the hook, and all 29 tests passed in 292 milliseconds.

 โœ“ tests/hook.test.ts (6 tests) 5ms
 โœ“ tests/fast-jev-compaction.test.ts (23 tests) 13ms
 Test Files  2 passed (2)
      Tests  29 passed (29)

One thing we could poke at without a key: the token estimator, which counts by character class rather than tokenising and claims to land 2 to 18 percent above Jev's real count. On our transcript it read 13,831 where OpenAI's o200k tokenizer read 11,217, about 23 percent high. Different tokenizer, so not a refutation, but the direction matches the intent. Overestimating is the safe way to be wrong when you are trying to stay under a 32k ceiling.

The install instructions do not work

The README opens its usage section with npm install fast-jev-compaction. We ran it. The npm registry returns Not found: there is no published package under that name, at any version.

The hidden cost of adopting this: the library half is not installable, and the plugin half needs three things most people do not have. Jev is in early access behind a waitlist. Function hooks are an early-access Claude Code feature needing CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 on 2.1.274 or newer. And the default code path posts your conversation state to api.typesafe.ai, which we confirmed the direct way: our first run called out and came back with a 401.

That last point deserves plain language. The state is stripped of tool output, but it still contains your prompts, the assistant's replies, your file paths and your tool inputs, and it is sent to a third party on every compaction. For a lot of codebases that is the end of the conversation.

What it does not do

  • It cannot shorten text. Only tool calls and results are candidates. If your context is bloated by long assistant prose, this removes none of it.
  • It has no tokenizer. Every ceiling is enforced against a character-count heuristic.
  • It throws rather than degrades. A Jev failure, a malformed answer, a missing key or a history too big to fit all raise, and the caller decides what to do. The Claude Code hook falls back to the built-in summary; a library user has to write that themselves.
  • It resends the full state with every request. A history near the 25k state ceiling costs one full request per handful of questions.
  • It is not published anywhere. No npm, no releases, no tags.

Two open issues are worth more than that list, because they come from people who did have a key and did run it against jev-latest.

Issue #56, filed by 0xsline on September 18, reports that keepThreshold: 0.5 makes the "keep" outcome effectively unreachable, because keepResult and keepCall come back on different scales while decideCall compares both to the same number. Their summary: "Jev's ranking is correct and very stable; only the absolute calibration is off." The consequence they describe is the bad one, that the compactor truncates results it just ranked as most important, "including the file the agent is about to edit." We noticed the same shape from the other side: our stub had to answer the two questions asymmetrically on purpose to reach the middle tier at all.

Issue #65, filed by orangewk the morning we wrote this, is worse and more interesting. When a call is dropped, the assistant's narration around it stays, with no marker left behind. So after compaction the model reads a run of its own turns describing work with no tool calls attached, and it continues the pattern. In their session, "for 22 minutes after /compact it produced 9 consecutive assistant turns reporting completed work without calling a single tool. None of the reported artifacts existed."

A compaction strategy that never rewrites anything still managed to teach a model to hallucinate its own work.

That is a one-line fix in principle, since the drop-result path already leaves a note and the drop-call path does not. It is also the sharpest argument we have seen that lossless is not the same as safe.

Who made it, and does that matter

Two contributors. One is tamaratran, with 13 commits. The other is devin-ai-integration[bot], with 17.

The log is starker than the split suggests. Almost every substantive commit is authored by "Devin AI": the initial library, the compaction model, the result truncation, the state fitting, the README, the macOS demo app. The human's commits are overwhelmingly merges of Devin's pull requests, plus one real fix titled "Fix mod API key fallback and doubled log prefix." The project went from empty to feature-complete inside about 24 hours on September 17.

"An agent wrote it" is not a criticism on its own, and the code is legitimately good: clean module boundaries, injectable transport, real tests, no dependencies. The bus factor is the concern, and it is one. One person is merging, the thing producing the code does not answer issues, 54 are open, and nothing has been pushed in two days.

The saving grace is size. At 957 lines, no dependencies and MIT, this is small enough to vendor. If the repo goes quiet, copying src/ into your own tree is a realistic afternoon, which is not true of most things with 4,700 stars.

Verdict

We could verify everything except the part that matters. The pairing logic, the state fitting, the batching, the three tiers, the rebuild, the tests, the reduction ratios, all real and all good. Whether Jev actually knows which tool result you will need in twenty minutes is the entire product, and it sits behind a waitlist where no outsider can evaluate it. The two people who could are both in the issue tracker saying the calibration is wrong.

Adopt today if you already have Jev access, you are on Claude Code 2.1.274 or newer with function hooks enabled, and your transcripts are not sensitive. Set keepThreshold yourself rather than trusting the 0.5 default, and read issue #56 first.

Wait if you were going to npm install it, because you cannot. Wait if your code is under NDA, because the state leaves your machine. Wait if you want the drop-call marker from issue #65, which we would treat as a blocker.

What would change our mind: a published package, a marker on dropped calls, and a threshold fix or a calibration note. All three are small, and none landed in the two days after the star spike.

Your turn

Our 86.7% came from a stub that answered every question the same way, which tells you about the plumbing and nothing about real sessions. So: what does your actual /compact cost you? If you have run a long agentic session recently, check your context before and after, and tell us the ratio and whether anything important vanished. Real numbers from real transcripts are the only way anyone finds out whether verbatim pruning beats summarising.

If you like this flavour of checking, our piece on the 21,000-star repo whose central claim we could not verify is the same problem in a different costume: a lot of stars, a gated component, and no way for an outsider to test what is being promised.

Share

4,700 stars in three days. We built it, ran all 29 tests and measured 86.7% context reduction on a real transcript. Then we tried the README's npm install line and got a 404. #ClaudeCode #OpenSource #TypeScript

Never miss a ship

The best stuff that shipped this week, delivered every Thursday. Free, no spam. We read all the boring stuff so you get the fun parts.

Keep reading