tamaratran /fast-jev-compaction
Claude Code plugin that replaces the compaction summary with Jev decisions: every tool call and result is scored in one fast request, stale ones are dropped or truncated, everything kept stays verbatim.
★ 7,937⑂ 581
7,937
stars
+12+105+520
581
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions
README
fast-jev-compaction
Claude Code plugin that replaces the compaction summary with Jev decisions:
every tool call and result is scored in one fast request, stale ones are
dropped or truncated, everything kept stays verbatim. Also usable as an npm
library.
What and why
Most context compaction asks an LLM to summarize old turns. A summary is
lossy: a file path, exact error, constraint, or command can disappear even when
it matters later. This library never rewrites anything. It only deletes tool
calls and tool results Jev says are no longer needed, and it asks Jev while
showing it the whole conversation. User and assistant text stays verbatim and
in order.
The repository is both an npm package (src/) and a Claude Code plugin
(hooks/, .claude-plugin/) that uses the package to replace Claude Code's
built-in compaction summary with the original messages.
How it works
1. Every tool_use is paired with its tool_result by tool_use_id. Calls in
the first message or in the newest preserveRecentMessages messages are
pinned and never touched.
2. The state sent to Jev is the whole conversation so far, oldest first,
with every tool result replaced by a short note (ok, 4213 chars (omitted)).
Tool inputs are included, texts are included, nothing is summarized.
3. The state is fitted into maxStateTokens (25k by default) in stages, each
applied only if the previous one was not enough: tool inputs truncated to
1000, then 200, then 60 characters; long texts abridged to head + tail,
oldest non-pinned messages first; old non-pinned messages collapsed to a
[… N chars omitted …] note; old tool calls reduced to one line each
(t12 Read file_path=src/a.ts → ok 480ch); old call-less messages left
out; runs of old call-only messages folded into one entry. If it still
does not fit, compaction throws. Tokens are estimated without a tokenizer (a
word per six letters, half a token per digit, ~one per other symbol),
calibrated to land a little above the counts Jev reports.
4. For every non-pinned call Jev gets two noul questions: should the call
stay (knowing it was made, with its input, still matters), and should the
result stay verbatim (its contents are still needed and re-running the
tool would not do).
5. Questions are split into as many requests as needed so state plus questions
stays under maxRequestTokens (30k by default, under Jev's 32k request
limit). The same full state is resent with every request; requests run
concurrently and their answers are merged.
6. Decisions per call, against keepThreshold:
- keepResult ≥ threshold → keep call and result;
- else keepCall ≥ threshold → keep the call, truncate the result to its
first truncateHeadChars characters plus a one-line note;
- else → remove the call together with its result.
7. The message list is rebuilt: a message that loses all its content is
removed, untouched messages are returned as the same objects, and no result
is ever left withou相关报道 (7)
blog.csdn6568星只用7天,但增速已经转缓:fast-jev-compaction 的GitHub曲线,道出了开源爆款的“退烧规律“2026-10-19blog.csdn6568★ 只用了 7 天,但增速已经转缓:fast-jev-compaction 的 GitHub 曲线说明什么?2026-10-09科技行者Jev一夜爆红:一个只会做选择题的AI模型,怎么就火了2170个项目2026-10-0753AI一万字Jev 工程实践长文:把 Agent 的“判断题”从大模型里拆出来2026-09-30智源社区刚刚,Jev全网解禁!1.2亿Token限时免费用2026-09-22投资界刷屏了,前OpenAI研究员做的Jev,大家为啥抢着用?2026-09-20搜狐网Jev 把 Agent 上下文压缩变成了选择题2026-09-20
News & coverage (5)
xGenAI on X: "@typesafeai run fast-jev-compaction: https://t.co/pU1vge6N3v"2026-09-21xtamara on X: "run fast-jev-compaction: https://t.co/htDJNJnLaa"2026-09-17Analytics India MagazineMicrosoft Revamps Copilot With Home, Code and Autopilot Capabilities2026-09-26HackerNoon101 Real-World Examples of How to Use Jev2026-09-21KuCoinNew AI model Jev gains popularity for rapid decision-making in agent systems2026-09-19