Keep the context.
Not the clutter.
Context compaction that makes decisions,
not new summaries.
JEV classifies old tool calls and results. Useful history stays in its own words; what can be re-read or re-run can go.
opencode plugin add github:overbit/fast-jev-compaction-opencodeExperimental Conservative by default. Native compaction remains the fallback.
“Fix the authentication test.”48 paths · can be searched againRelevant implementation · verbatimCall + output · full contents not neededCall + beginning of output retainedStale reference · can be re-readExpected 200, received 401A smaller history.
The same retained words.
Source reads, searches, and build logs can outlive their usefulness. Rather than rewrite the conversation, the plugin asks two specific questions about each eligible completed tool call.
Does knowing this call was made still matter?
JEV evaluates the tool call and input in the surrounding conversation.
Is the full output still needed verbatim?
Large outputs are represented by bounded notes in the decision prompt.
| Classifier decision | Checkpoint outcome | What changes |
|---|---|---|
| Full result meets threshold | Keep | Call and full result stay. |
| Only the call meets threshold | Truncate | Call stays; result is shortened. |
| Neither meets threshold | Drop | Call and result are removed. |
| First or recent message | Pinned | Always retained; not a candidate. |
No useful decision? Keep the safety net.
Unanswered calls default to keep. Classifier errors or a reduction below the configured minimum leave OpenCode’s native compaction available. With few completed tool calls, there may be little to remove.
From install
to your next session.
Add the plugin, then choose where decisions run. The hosted backend needs an API key. The supported local path needs a compatible decision model with probability output.
1Add the plugin
Run this in your terminal for OpenCode V2.
opencode plugin add github:overbit/fast-jev-compaction-opencodeThe package provides both ./server and ./tui entrypoints.
2Choose your backend
Hosted TypeSafe JEV
The default backend. Set your API key; no plugin options are required.
export TYPESAFE_API_KEY=...Default model: jev-latest. Keep credentials out of committed configuration.
Local LM Studio
Load the supported Jev-Style Qwen3.5 2B v1 decision model, then set backend to local.
{
"$schema": "https://opencode.ai/config.json",
"plugins": [{
"package": "github:overbit/fast-jev-compaction-opencode",
"options": {
"backend": "local"
}
}]
}Default endpoint: http://127.0.0.1:1234/v1
Model: jev-style-qwen3.5-2b-decision-mlx
Requires logprobs and top_logprobs. Ordinary generated prose is not enough. Jev-Style 0.8B v3 is not directly supported by this adapter.
Conservative settings.
Explicit limits.
The plugin supplies a deterministic checkpoint string through OpenCode V2’s compaction hook. Retained text is not model-rewritten, but the original message structure is flattened.
This is an experimental port, not an arbitrary replacement-message API.
Explore all configuration options- Recent messages pinned
- 6
preserveRecentMessages - Keep threshold
- 0.5
keepThreshold - Minimum reduction
- 25%
minReductionRatio - Truncated result head
- 300 chars
truncateHeadChars
When something doesn’t compact.
No request reaches the local model
A classification request needs at least one completed tool call outside the pinned recent-message window. Short sessions may correctly send no request. Check the diagnostic log for candidate counts before changing your configuration.
The local classifier falls back
Check that the endpoint is reachable, the loaded context is large enough, and the model exposes logprobs and top_logprobs. Every compaction writes an outcome reason to ~/.local/share/opencode/log/fast-jev-compaction.log.
Can I use the smaller 0.8B v3 model?
Not through this plugin’s current local adapter. The v3 model needs its dedicated scoring runtime / System One-compatible API, which is not directly wired into this plugin yet.
Read the model compatibility notes