AI Agent Hub
Back to plugins
🤖

dsh-compaction-cacheaware

Model Inference Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install Zhuchen00123/dsh-compaction-cacheaware

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install Zhuchen00123/dsh-compaction-cacheaware in the terminal to install; the full source is hosted at https://github.com/Zhuchen00123/dsh-compaction-cacheaware .

About this plugin

The default compaction-basic in DSH fires on multiple soft, snip, and force thresholds, so long conversations trigger the summarizer repeatedly, inflating both latency and token cost. dsh-compaction-cacheaware ports the Reasonix cache-aware compaction architecture into a standalone DSH plugin: a single trigger ratio (default 0.85) replaces the multi-threshold scheme, each compaction transaction yields exactly one structured checkpoint of stable prefix plus one summary plus a recent tail, and the raw session log always remains the source of truth with only the model-visible projection replaced at the surface.

The summarization policy is deliberately tightened. One summarizer call per transaction with no application-layer retry loop keeps costs predictable. The summary follows the Reasonix six-heading structure (Standing facts and constraints, Goal, Decisions and rationale, Files and code, Commands and outcomes, Errors and fixes, Pending and next step), making the output information-dense and easy to parse downstream. Checkpoint acceptance is bounded: the normal path requires the compacted result to stay under half the window, while the exceptional fixed-prefix path demands at least 25 percent savings, eliminating wasted compression cycles.

This plugin suits developers running long sessions in DSH who want to cut summarizer calls and token overhead significantly, as well as teams already familiar with Reasonix compaction semantics who want to reuse that behavior inside DSH presets. It is fully modular: once mounted in a preset compaction realm it replaces compaction-basic automatically, does not touch any other plugin, preset, or host file, and includes a realm self-check that logs a warning and stands down automatic listeners if another compaction engine takes over, preventing silent racing.

Use Cases

  • Long conversations repeatedly trigger multi-threshold compaction, inflating latency and token cost
  • Replace compaction-basic with a single-ratio trigger inside a DSH preset
  • Require one summarizer call per transaction and a structured checkpoint to cut redundant overhead

Best For

  • Developers running long DSH sessions who care about compaction latency and token spend
  • Teams already using Reasonix compaction semantics and wanting to reuse them inside DSH presets
  • Engineers who manually manage backend mounting inside a DSH preset compaction realm