Skip to content

Opencode Context Pruner

An OpenCode plugin that asks Jev, per tool call, whether the call and its result are still needed, then drops or truncates them in the outgoing request while leaving your saved history untouched.

Stars
4
Language
TypeScript
License
MIT
Published by
Community
Author
hoshinodis
Last verified
Oct 2026

About this project

Continuous, verbatim context pruning for OpenCode, powered by TypeSafe Jev.

Quoted from the project's README. Read the full README.

Highlights

  • Each tool call gets two noul questions, keep the call and keep the result, and the verdict is cached per tool_use_id so turns add no cost.
  • Default mode prunes only compaction requests, where no prompt cache is reused afterwards anyway, instead of invalidating a warm cache every turn.
  • keepThreshold defaults to 0.15 rather than upstream's 0.5 because measured old calls score 0.11-0.23, making truncate-the-result the usual outcome.
  • Decisions are applied to clones, which tests enforce, so persisted history and the UI keep every original message.

Watch out

In the default compaction-only mode the plugin does nothing until the runtime compacts, so the context saving is deferred by design. Verdicts are cached per tool_use_id for the rest of the session, and re-judging needs the rejudge option set away from never. It requires a recent OpenCode V2 beta and leans on hook shapes that differ by runtime, including recognising the synthetic compaction prompt by signature when the compaction hook is absent. Jev can be wrong, and the JSONL decision log is the only audit trail. src/vendor is a copy of the upstream source that you re-copy by hand to update. Copy reviewed against the repository README on 2026-10-04, not from running it.

Questions about this entry

Short answers drawn from the linked project or page.

More Jev resources like this

20GitHub stars
TypeScript SDK and CLI coding agent where Jev only picks options while your code runs effects, building programs as syntax trees.
Jev Agents & MCP#community#awesomejev#catalog-import
22GitHub stars
Runnable agent harness that moves pick, score and yes-no loop choices to Jev or Laya in milliseconds while reserving the language model for writing, compiling DECISION.md into executable questions.
Jev Agents & MCP#community#jevbest#catalog-import
35GitHub stars
Diff-aware test selector that sends the git diff to Jev with one question per test, then prints the native filter flags and hands them to vitest, jest, node, bun, Playwright, cargo, or go test.
Jev Agents & MCP#community#jevbest#catalog-import
13GitHub stars
Pi extension that classifies each task with Jev over OpenRouter and routes it to a Pareto-optimal model balancing measured quality, cost, and latency under a role policy.
Jev Agents & MCP#community#jevbest#catalog-import
15GitHub stars
Node CLI that lints a file tree against fuzzy natural-language rules in one Markdown file, judging each matched file with a swappable TypeSafe-backed judge.
Jev Agents & MCP#community#jevbest#catalog-import
106GitHub stars
Decision layer exposing Jev's typed yes-no, choice, and score answers to DeepSeek Harness and MCP hosts, offline by default with every network transmission disclosed per feature.
Jev Agents & MCP#community#jevbest#catalog-import
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai