deepseek-harness-jev-pre-compaction
DeepSeek Harness plugin that asks Jev which tool results can be pruned early, delaying or avoiding lossy compaction.
Overview
deepseek-harness-jev-pre-compaction is a pre-compaction advisor for DeepSeek Harness. It runs before the normal compaction backend and decides which low-value tool results can be removed from the model-visible context. It never writes summaries: tool results are either kept verbatim or replaced with a short marker or an archive pointer, while the original events stay in the append-only session log.
It acts early, in a lookahead band of 70 to 80% context by default. Each evaluation asks two Jev questions: a global should_reduce (would removing low-value results now likely avoid the upcoming compaction?) and a per-candidate retain_N (should this result stay verbatim?). Recent nodes and error results are always kept; a result is truncated if retain is below 0.2, or below 0.5 when should_reduce reaches 0.6. In workspace mode originals are archived to disk with restrictive permissions and secrets are never archived. Every failure path falls through so the agent continues normally.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | should_reduce: would removing low-value tool results now likely avoid the upcoming context compaction? | yes · no |
| Yes / no | retain_N: should tool result N remain in the model context verbatim? | yes · no |
How it works
- Enter the lookahead band as context grows
- Collect eligible tool results, densest first
- Ask Jev should_reduce and retain_N
- Truncate per the tiered thresholds; archive or unload originals
Strengths
- Avoids lossy summaries by pruning instead of rewriting
- Conservative, retention-biased decision tiers
- Fails open on any error
- Originals recoverable from archive or log
Caveats
- Specific to DeepSeek Harness
- Tool outputs are sent to TypeSafe
Getting started
dsh plugin --profile my-profile add deepseek-harness-jev-pre-compaction, keeping dsh-compaction-basic enabled.At a glance
- Type
- Project
- Status
- beta
- Language
- TypeScript
- Runtime
- DeepSeek Harness plugin
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
A pre-compaction advisor for DeepSeek Harness. Runs before the standard \`compaction-basic\` backend, using TypeSafe JEV to safely prune low-value tool results from model context. Original session events stay in the append-only log; only the model-visible view is replaced with compact markers or archive pointers to reduce context bloat.
logicrw/awesome-jev-projectsA pre-compaction advisor for DeepSeek Harness. Runs before the standard `compaction-basic` backend, using TypeSafe JEV to safely prune low-value tool results from model context. Original session events stay in the append-only log; only the model-visible view is replaced with compact markers or archive pointers to reduce context bloat.
hellogumbo/awesome-jev
Frequently asked questions
Is this a compaction backend?
No, it is an advisor that prunes early; keep your normal compaction backend enabled.
What does Jev decide?
Whether pruning now helps, and whether each tool result should stay verbatim.
Can pruned content be recovered?
Yes, in workspace mode it is archived to disk; in unload mode the model can re-run the tool.
Related projects
DeepSeek Harness compaction backend that asks Jev which tool calls and outputs to keep, preserving everything else verbatim.
ProjectbetaJavaScriptDeepSeek Harness compaction plugin where Jev decides which tool results are still needed and code writes deterministic receipts.
ProjectbetaTypeScriptDeepSeek Harness port of fast-jev-compaction: Jev keep/truncate/drop verdicts per tool call replace lossy summaries.
ProjectbetaTypeScript- fast-jev-compaction★ 7,616
Claude Code plugin and npm library that replaces the compaction summary with Jev keep, truncate or drop scores for every tool call.
PluginbetaTypeScript Codex plugin that builds handoff packets by asking Jev whether each old read-only tool record should stay, keeping retained text verbatim.
ProjectbetaJavaScriptCursor CLI plugin that asks Jev keep-or-drop nouls for each tool call and result, then re-injects kept facts after compaction.
CLIbetaTypeScript