← Use cases

Jev compaction

Jev compaction is a different way to shrink a coding agent's context window: instead of asking a model to summarize the history, you ask Jev a yes/no question about each old item — keep it or drop it — and delete the ones it judges irrelevant. Nothing that stays is ever rewritten, so there's no lossy summary to corrupt your agent. The tools below are community projects, not TypeSafe and not us.

A long agent session fills with stale tool calls — old file reads, finished searches, superseded diffs — that crowd out the context window. The usual fix, "/compact", asks a model to write a shorter summary, which is slow, costs generated tokens, and can quietly drop or distort the detail you needed. Jev compaction removes the generation step: it sends each candidate item to Jev — TypeSafe AI's System One model — with one typed question, "is this still relevant to the goal?", and keeps or deletes it based on a calibrated probability. Everything kept is kept byte-for-byte.

bloated context every tool call + result Jev keep / drop, per item compacted context kept verbatim — no summary
Each old item becomes one typed keep/drop decision; relevant items survive verbatim, irrelevant ones are deleted — nothing is summarized.

Why not summarize?

Keep, truncate, or drop

Most implementations don't just keep-or-delete; they use Jev's calibrated confidence to pick one of three fates per item, so a borderline tool call is trimmed rather than lost:

Jev confidence it's relevantWhat happens to the item
HighKept in full, verbatim
MiddleResult truncated to a short snippet; the call itself stays
LowRemoved entirely

Pinned items — typically the first message and the most recent few turns — are never touched, so the goal and the live working set always survive compaction regardless of score.

Compaction as a safety gate too

Because the same pass is already reading every tool call, some tools reuse it to catch destructive commands — an rm -rf, a force-push, a DROP TABLE, a curl piped into a shell — and block them unless a human approves. It's the same primitive as a Jev action gate, folded into the compaction step. See /jev-computer-use for that pattern on its own.

Community tools (not ours)

These are independent, community-built projects that use Jev for compaction — none are made by TypeSafe or by us. Install by the exact repo; check the license and the code before pointing them at a real session:

Install the Claude Code plugin

fast-jev-compaction is a community Claude Code function-hook plugin. It needs Claude Code with function hooks enabled and a TypeSafe key in the environment:

# Community plugin — review it first; not published by TypeSafe or us
claude plugin marketplace add tamaratran/fast-jev-compaction
claude plugin install fast-jev-compaction@fast-jev-compaction

# Then run Claude Code with hooks on and your key set:
export CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1
export TYPESAFE_API_KEY=...   # your Jev key

From there it hooks compaction automatically: older tool calls are sent to Jev, scored on whether to keep the call and whether to keep its result verbatim, and pruned in place — pinned messages untouched.

Build your own

Compaction is a small loop you can write yourself: for each old item, ask Jev one typed question and act on the calibrated answer. It's the same POST https://jevtypesafeai.com/api/v1/decide call (official upstream POST https://api.typesafe.ai/v1/systemone) with a jv_live_ key.

// Decide the fate of one stale context item
const res = await fetch("https://jevtypesafeai.com/api/v1/decide", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${process.env.JEV_KEY}`, // jv_live_...
  },
  body: JSON.stringify({
    state: { goal, item: { tool, args, resultPreview } },
    questions: {
      keep: { type: "noul", instructions: "Is this item still relevant to the current goal?" },
    },
  }),
});
const { answers } = await res.json();
const p = answers.keep.noul;            // calibrated 0..1

if (p > 0.7) keepVerbatim(item);        // confident keep — unchanged
else if (p > 0.35) truncate(item);      // borderline — trim the result
else drop(item);                        // irrelevant — remove it

Run that over every unpinned item (in parallel — each is one fast pass), and you've compacted the window without a single summary. answers.keep.noul is a calibrated probability RLCD training makes trustworthy; tune the two thresholds against your own sessions. Context Cleaner runs this exact keep/truncate/drop decision on a single pasted item so you can see it live.

FAQ

What is fast jev compaction?

"fast-jev-compaction" is a community-built Claude Code plugin that replaces the built-in /compact summary with Jev keep/drop decisions on each tool call. Items are kept verbatim or deleted — never rewritten or summarized. It's not made by TypeSafe or by us; this page explains the pattern and links the author.

How is Jev compaction different from /compact?

/compact asks a model to generate a shorter summary of the history, which is slow and can distort detail. Jev compaction asks Jev a typed keep/drop question about each item and deletes the irrelevant ones, keeping the rest byte-for-byte — no generation, nothing paraphrased, and a calibrated confidence you can threshold on.

Does compaction lose important context?

That's the point of keeping things verbatim and pinning: the first message and recent turns are never touched, high-confidence items are kept in full, and borderline ones are truncated rather than dropped. You set the thresholds, so you control how aggressive it is.

Do I need a special model for this?

No — it's the same Jev decide endpoint as everything else. Each item is one noul (yes/no) question. You can use the community tools, or write the loop yourself against /api/v1/decide with a jv_live_ key.

See also: Context Cleaner (live demo) · Jev as an action gate · Jev MCP server · Engineering for coding agents

Compact context with one typed call

Try the keep/drop decision free in the browser — no signup — then grab a jv_live_ key and wire it into your agent.

▶ Try Jev freeGet an API key →
Jev compaction — prune agent context without summarizing it · Jev by TypeSafe AI