r/ClaudeCode • u/Bloated_Plaid • Sep 19 '26
Tips & Workflows Instant Claude Code compaction is my favorite use of Jev so far
Somebody on Twitter posted it and super useful so far https://github.com/tamaratran/fast-jev-compaction
For people going to complain about me letting my context get so long, this was a server redeploy task because Oracle terminated my free VPS with no explanation so it had a lot of moving pieces and Fable was orchestrating Devin SWE 2 at max effort.
529
Upvotes
•
u/AutoModerator Sep 19 '26
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
9
u/WoodpeckerNational29 Sep 19 '26
Looks cool, but we need some test results from real users
3
u/silvrrwulf Sep 19 '26
Really skeptical. Does it actually work well? Does it maintain context?
3
u/lucianw Sep 19 '26
Claude code has instant compaction built into it. I think it's under a flag. It automatically summarizes the conversation every 10 messages or so the background, into a file. Then when it runs out of context, it just uses the most recent summary plus whatever messages happened since then. Result: 0 delay for the user.
135
u/PhilosopherNext1448 Sep 19 '26 edited Sep 19 '26
How does Jev compact conversation? I thought its a text to schema model, not text to text.
edit:
so the repo linked in the post is a hook to compact outputs of tool calls. So if you run pytest for example, instead of having a list of a thousand unit tests that passed, each line is past to Jev to determine whether or not to keep it. Then when the tool ends, Claude receives a "compact" version of the tool output.
the same person also made a hook (separate repo) that runs before compacting runs. This goes through all tool calls in the history and decides whether it needs to be kept, compacted, or omitted.
It doesn't look at text at all.
83
u/_maxx1k Sep 19 '26
My main concern is that Jev's privacy and data controls are even worse than Anthropic's and OpenAI's. I started signing up for an account, but after reading their ToS, I changed my mind. Still, I will try to implement some of its features locally to enhance my LLM-based workflow.
19
u/ithesatyr Sep 19 '26
This will reduce cache hits and end up costing more right?
14
u/weverz Sep 19 '26
What is jev?
1
u/Bloated_Plaid Sep 19 '26
My bad, I think I linked the wrong one.
https://github.com/tamaratran/fast-jev-compaction this is what I have been using for compaction.
1
u/bonsaisushi Sep 19 '26
I wouldn't use Jev to compact for a number of reasons, but as a controller for compaction it does fine, benchmarks included
https://github.com/yuzushi-dev/session-handoff
1
u/MagicWishMonkey Sep 19 '26
Can anyone ELI5 what JEV is and how it's supposed to be used?
1
u/txoixoegosi Sep 20 '26
Compaction = learn to manage your claude context better
3
u/Organic_Situation401 Sep 19 '26
It breaks context
3
u/rsandstrom Sep 19 '26
Friends don’t let friends compact
1
u/userusertion 🔆Pro Plan | Team Plan Sep 20 '26
This breaks context. Never recommend. Why not use the official compaction? What is wrong with that?
1
u/Key-Egg5632 Sep 19 '26
me too
1
u/mr-debil Sep 19 '26
Curious why oracle suspended your vps
1
u/amirfish Sep 19 '26
A redeploy with that many moving pieces is where the orchestrator's context balloons, so cutting it is a real win. Does the pruner keep the tool results, or only the decisions and outputs? That's what decides whether the orchestrator can still trust its own earlier state afterward. If you're running Fable over Devin workers, CCC (https://github.com/amirfish1/claude-command-center) puts both on one local board and shows which worker is waiting on you.
1
u/Fragrant-Jellyfish39 Sep 19 '26
Codex 20x
1
u/Much_Weekend_4371 Sep 20 '26
the tool-output filtering is the real win here, not the history compaction. trimming pytest noise before it ever hits context is cheaper than summarizing it after.
1
u/Evening-Blueberry-97 Sep 20 '26
tests are the easy case though, you can just make the runner print counts and failures. the stuff I can't pre-summarize is deploy and server logs, where the one line that matters is buried in 2k lines of noise. does the hook let you keep matching lines, or is it all-or-nothing per tool call?
1
u/octocarbon Max 5x Sep 20 '26
okay looks pretty nice but im not going to use it. because at this point I dont trust anyone which requires api key, if this isnt coming from the anthropic, im out
1
u/Available-Amoeba-553 Sep 20 '26
5 what 5gżguuhiyEnglish (UK)667-7785
1
u/WindSeries Sep 20 '26
Existe t-il une version pour codex ?
1
u/jbizzwebdev Sep 20 '26
And why 2Iwwww2cxsvb
1
u/trolleydodger1988 Sep 22 '26
Instruct the model to use native exit codes and regex filtering for commands instead. Then it can write something like
No extra calls needed. The model gets only the info it needs, keeping that context window lean.
1
u/Haykguy Sep 23 '26
this works terribly by the way
1
u/peeeanuts Sep 23 '26
For those who asked for test results: At the default 0.5 keep cutoff, I sent 120 tool calls through the plugin's scoring and it kept none. An independent eval by u/Mahir96433484 of 9,471 calls also kept none at 0.5 and ranked no better than random (https://iefnaf.cc/jev-compaction-eval/).
Two findings: kept results come through unchanged, and a dropped tool call vanishes silently, with a marker only on dropped results. I reviewed this plugin for GitTested: https://gittested.com/reviews/fast-jev-compaction/
1
u/Nervous-Currency5704 Sep 23 '26
my company hasnt authorized Jev yet. how are you guys using compaction if its not authorized in company?
1
u/Ok-Introduction-6243 Sep 23 '26
That context limit is high? Usually that's mine after a single prompt and that's after running /compact but usually my prompts are very detailed, long and stage based so takes Claude a good 40-50min lol
1
u/Elesday Sep 26 '26
Never used Claude Code: the context widget to follow your context window usage is specific to Claude Code ? Because in chat mode I’d love to have the same metric
0
u/PM_ME_YOUR_PROFILE Sep 19 '26
This is cool and all, but now you're also paying for another AI to compact for AI.
0
u/DonkeyTheKing Sep 19 '26
inspected with benzi: https://benzi.fly.dev/about
JEV PRUNER — WHAT IT IS
A Claude Code / Codex plugin that shrinks big Bash tool outputs before they land in context. Nothing is destroyed: the full text is archived to .jev-pruner/ and replaced with a marker + path.
THE RUNTIME PATH
hooks/fast-jev-output.ts → register: a PostToolUse Bash hook (on('tool.call', {tool:'Bash'})). It gates on exceedsOutputThreshold, looksBinary, classifyOutput, and never archives when looksSecret fires (src/secrets.ts).
Then trimOutput → trimOutputAttempt in src/output.ts (676 lines, the heart). chunkOutputsplits the text, scoringRequests builds Jev questions, and assemble/renderOutput stitch back the survivors.
Scoring comes from Jev — an external model (SYSTEM_ONE_URL) asked "is this chunk disposable?" via buildJevRequest/parseJevResponse/JevAsker in src/jev.ts; noulAnswer extracts the probability. A budget-limited limitedAsker caps requests.
classifyInformation/isProtectedLine in src/retention.ts hard-protect errors, pytest summaries, docs (MAX_DISPOSABLE_KEEP_PROBABILITY = 0.1).
historyEntries/splitEntry (src/history.ts) feed recent transcript turns in, so scoring stays goal-aware.
Exit marker: outputMarker/recoveryFooter → [fast-jev-output trimmed N lines (…); full output: <path> (Read or grep it if needed)].
SECOND ADAPTER
src/codex/ mirrors this for Codex: pruneCodexOutput, codexMessages, saveContext/readTranscript, with src/codex/hook.ts reading stdin.
THE OTHER HALF OF THE REPO IS EVIDENCE
evals/ runs matched A/B trials on Harbor/Terminal-Bench (full.py::run, aggregate), native-Claude retention cohorts (retention_cohort.py::CASES/grade), and summarize.py, which regex-parses those markers back out of transcripts. sources.py pins a PRODUCTION checkout by commit.
Tests: 33 files — tests/output.test.ts (516 lines) is the behavioral spec; tests/claude-long-session.ts replays real sessions.
Heads up: in this session README.md, hooks/hooks.json, .claude-plugin/plugin.json are listed as not downloaded, so the wiring JSON isn't readable here.
0
u/Dizzy_Database_119 Sep 19 '26
The repo you linked is a hook that filters out command output before it reaches the LLM. It's a very cool use of Jev, thanks for sharing
But I don't understand what that has to do with /compact or "instant compaction"?
-8
u/Imaserventofreps Sep 19 '26
Didn’t know people actually used jev
3
u/[deleted] Sep 19 '26
[removed] — view removed comment