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. TypeSafe is hosted; LM Studio and Ollama support native local System One decisions without a cloud key.
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 System One
LM Studio 0.4.26+ supports /v1/systemone. Load a decision model such as Jev-Style 0.8B v3 and use its loaded model ID.
{
"$schema": "https://opencode.ai/config.json",
"plugins": [{
"package": "github:overbit/fast-jev-compaction-opencode",
"options": {
"backend": "systemone",
"localModel": "YOUR_LOADED_DECISION_MODEL_ID"
}
}]
}LM Studio default: http://127.0.0.1:1234/v1/systemone.
For Ollama 0.35+, run ollama pull tev1:0.8b and configure:
{
"plugins": [{
"package": "github:overbit/fast-jev-compaction-opencode",
"options": {
"backend": "systemone",
"localBaseUrl": "http://127.0.0.1:11434/v1",
"localModel": "tev1:0.8b",
"maxStateTokens": 1200,
"maxRequestTokens": 1800
}
}]
}Tev1 0.8B is designed for short inputs; use smaller state/request limits as shown. Larger models may support more context.
Native System One scores multiple retention questions per request. For older chat-only models, the legacy backend: "local" still supports top_logprobs.
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 System One endpoint is reachable, the requested model is a decision model, and its loaded context is large enough. The legacy chat backend additionally requires 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?
Yes. Use backend: "systemone" with LM Studio 0.4.26+ or another compatible System One server and the identifier of a loaded decision model. The legacy backend: "local" chat path is still intended for v1 models.