Skip to content

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.

PluginbetaMIT

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

TypeQuestionAnswers
Yes / noIs this tool call or result still needed in context?yes · no

How it works

  1. Score each tool call and result with Jev.
  2. Truncate unneeded ones to a head plus recoverable note.
  3. Reuse the replacement map until rewrite thresholds are hit.
  4. 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

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.

    PluginbetaTypeScript
  • Automatic 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.

    ServicebetaPython
  • Local proxy for Claude Code that uses Jev to remove stale tool results from the context once it reaches about 120K tokens, failing open.

    ProjectbetaJavaScript
  • Claude Code /fc command where Jev picks which old tool outputs to keep whole; the rest are trimmed and saved to files.

    ProjectbetaTypeScript