omp-jev-compaction
Oh My Pi extension that truncates tool calls and results Jev scores as no longer needed, while keeping all user and assistant text verbatim.
Overview
omp-jev-compaction reduces context for omp (Oh My Pi) without rewriting or summarising anything. Every tool call and result is scored by Jev, over the TypeSafe API or OpenRouter; those judged no longer needed are truncated to a short head plus a recoverable note, while user and assistant text passes through exactly. The scoring core is vendored from fast-jev-compaction, whose hooks target Claude Code's plugin API; this package supplies the omp side.
Because rewriting the prefix invalidates prompt caches, decisions are sticky: the same replacement map is reapplied between rewrites, which happen only after the context grows by 40% and at least 15 requests pass, or after 40 requests. Replaying a 16,198-message session, the README reports 3 rewrites and 37 reuses over 40 requests with zero prefix breaks. A non-sticky mode adds a cache guard that skips sessions already served mostly from cache.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Is this tool call or result still needed in context? | yes · no |
How it works
- Score each tool call and result with Jev.
- Truncate unneeded ones to a head plus recoverable note.
- Reuse the replacement map until rewrite thresholds are hit.
- Skip reduction when the session is mostly cache-served (non-sticky).
Strengths
- No summarisation; user and assistant text untouched.
- Sticky decisions preserve prompt caching.
- Works with TypeSafe or OpenRouter.
Caveats
- Truncated tool output may be needed later (recoverable note mitigates).
- Vendored core must be re-synced manually.
Getting started
Install the plugin into omp and configure the TypeSafe or OpenRouter provider.At a glance
- Type
- Plugin
- Status
- beta
- Language
- TypeScript
- Runtime
- Oh My Pi extension
- Has code
- yes
- Has tests
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
An Oh My Pi extension that prunes tool history verbatim and reuses decisions to limit prefix rewrites.
logicrw/awesome-jev-projectsVerbatim Jev-scored context reduction for omp, over TypeSafe or OpenRouter.
hellogumbo/awesome-jev
Frequently asked questions
Does it summarise conversations?
No, it only truncates tool calls and results Jev deems unneeded.
Why are decisions sticky?
Rewriting the prefix breaks the provider's prompt cache, so rewrites are kept rare.
Which providers can score?
TypeSafe's API or OpenRouter.
Related projects
Pi port of fast-jev-compaction using Pi's context hook, with a savings gate against low-value pruning and retained status notes.
PluginbetaTypeScriptAutomatic Pi context clearing: drops superseded tool outputs for free and asks Jev about large older ones, with originals retrievable.
ProjectbetaTypeScript- 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 Codex hook that compacts large command and tool outputs, using Jev to rank which chunks matter and keeping the full output retrievable.
ServicebetaPythonLocal proxy for Claude Code that uses Jev to remove stale tool results from the context once it reaches about 120K tokens, failing open.
ProjectbetaJavaScriptClaude Code /fc command where Jev picks which old tool outputs to keep whole; the rest are trimmed and saved to files.
ProjectbetaTypeScript