claude-code-jev-prune
Local proxy for Claude Code that uses Jev to remove stale tool results from the context once it reaches about 120K tokens, failing open.
Overview
Jev Prune keeps long Claude Code sessions sharp by removing old tool results, such as big file reads and long terminal output, that no longer matter to the current work. Your terminal history stays the same; only the context sent to Claude shrinks. It runs on your machine as a small proxy between Claude Code and Anthropic, launched with jev-prune in place of claude.
Pruning happens automatically when context reaches about 120K tokens, on your next prompt, and never while Claude is mid-task; you can also type /jev-prune to prune now. Jev decides which tool results are stale. If TypeSafe is slow or down, requests go through unchanged. It re-enables on-demand MCP tool loading behind the proxy and never prunes results that load tools. Several terminals can share the proxy, which restarts if it crashes, and it reports how much was pruned.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Is this old tool result still relevant to the current work?(inferred) | yes · no |
How it works
- Run jev-prune instead of claude
- Proxy forwards traffic to Anthropic
- At ~120K tokens, Jev judges stale tool results
- Stale results are removed from the outgoing context
- Report pruned amount at session end
Strengths
- Smaller context without losing terminal history
- Fails open if TypeSafe is down
- Keeps tool-loading results intact
Caveats
- Requires a local proxy in the request path
- Needs a TypeSafe key
Getting started
git clone https://github.com/j-ctang/claude-code-jev-prune && cd claude-code-jev-prune && npm link, then run jev-prune in your project.At a glance
- Type
- Project
- Status
- beta
- Language
- JavaScript
- Runtime
- local proxy (Node 20+)
- Has code
- yes
Use cases and integrations
How curated lists describe it
Jev Prune for Claude Code: lossless context pruning, compaction and filtering.
wh000wh000/awesome-jev-live
Frequently asked questions
Does it change my chat history?
No, only the context sent to Claude.
When does it prune?
Around 120K tokens on your next prompt, or when you type /jev-prune.
What if TypeSafe is down?
Requests pass through unchanged.
Related projects
- winnow★ 110
Calibrated context sieve for Claude Code: Jev judges each block of large tool output and hides confident-no blocks behind recallable stubs.
Projectbeta Claude Code /fc command where Jev picks which old tool outputs to keep whole; the rest are trimmed and saved to files.
ProjectbetaTypeScriptLocal compaction proxy for Claude Code and Codex that compacts more often with local rules and keeps full history searchable.
ProxybetaGoClaude Code (and Codex) plugin that trims long Bash output chunk by chunk with Jev before it reaches the model, without summarising.
PluginbetaTypeScriptScores installed Claude Code skills against the current project with Jev and hides irrelevant ones via skillOverrides.
Agent skillbetaJavaScriptAgent skill that has Jev pick the few relevant lines from big logs before your coding agent reads them, with a reversible reduce and ledger.
ProjectbetaPython