Skip to content

fast-jev-compaction for OpenCode

OpenCode V2 port of fast-jev-compaction that asks Jev or a local Jev-style model which old tool outputs still matter.

ProjectprototypeMIT

Overview

fast-jev-compaction-opencode brings Jev-guided context compaction to OpenCode V2. Instead of having a generative model rewrite old history into a summary, it asks a decision model which completed tool calls and outputs, such as source reads, searches, test output, logs, listings and diffs, are still useful. Retained user and assistant text and tool output are copied into the checkpoint verbatim, and the newest messages are pinned.

It ports the core approach of tamaratran/fast-jev-compaction to the OpenCode plugin API with two backends: hosted TypeSafe Jev and a working LM Studio backend using the Jev-Style 2B v1 classifier; a 0.8B variant is documented but not yet wired up. The strategy is intentionally conservative and fails open, falling back to OpenCode's native compaction when classification fails or the reduction is too small. It is marked experimental and has CI.

What the decision model decides

TypeQuestionAnswers
Yes / noIs this completed tool call and its output still useful?yes · no

How it works

  1. Collect completed tool calls and outputs
  2. Ask Jev or the local classifier which still matter
  3. Write retained items verbatim into the checkpoint
  4. Fall back to native compaction on failure or small gains

Strengths

  • Local backend option via LM Studio
  • Fails open to native compaction
  • Preserves exact paths, commands and errors

Caveats

  • Experimental
  • 0.8B local model not yet supported

Getting started

Install the plugin into OpenCode V2 per the README and configure hosted Jev or an LM Studio endpoint.

At a glance

Type
Project
Status
prototype
Language
TypeScript
Runtime
OpenCode V2 plugin
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • The fast-jev-compaction approach ported to OpenCode: stale tool history is pruned rather than rewritten by an LLM.

    MrJev/awesome-jev

Frequently asked questions

Can it run without TypeSafe?

Yes, with the Jev-Style 2B v1 classifier in LM Studio.

What happens on failure?

It falls back to OpenCode's native compaction.

Is it stable?

No, it is marked experimental.

Related projects

  • Enhancement pack for MiniMax Code CLI on local DGX Spark hardware, including a Jev-style local decision browser agent and context patches.

    MCP serverprototype
  • Self-hosted Go gateway for LLMs and decision models that prunes context, and audits and calibrates Jev or open-rlcd decisions.

    ServicebetaGo
  • Recursive language model layer for coding agents that keeps inputs in a local evaluator, with optional Jev judge_many for typed calls.

    ProjectbetaRust
  • Pre-message hook that keeps or drops SKILL.md files before the first model call, using local overlap or Jev keep/drop judgments.

    HookbetaPython
  • OpenCode port of fast-jev-compaction that prunes stale tool calls from outgoing requests verbatim, by default only on compaction.

    HookbetaTypeScript
  • OpenCode plugin that compacts sessions by Jev keep/drop judgments per tool call instead of LLM summaries, falling back if unhelpful.

    ProjectbetaTypeScript