ChatGPTClaudeGrok / X / CursorGemini

dsh-live-compact: A Compress-As-You-Go Context Plugin for DeepSeek Harness

merkyorlynn/dsh-live-compact

Memory & ContextVerified
Listed on 2026-11-03
Page last updated 2026-11-23

Live Compact is a DSH plugin that compacts finished turns in place, preserving the prefix cache instead of waiting for the 80% threshold to trigger heavy compaction.

dsh-live-compact is a context compaction plugin for DeepSeek Harness that shifts compression from waiting until the window is nearly full to cutting as work happens. It targets the familiar long-task problem where context keeps refilling, every full compaction calls the model, takes over ten seconds, and costs money. At the end of each turn the plugin slices the turn that just finished without calling the model, leaves everything before the cut untouched so prefix cache hits stay intact, and keeps context pinned at a lower level so the heavy compaction can be postponed. Cut content is kept in a plain-text local directory, and a spine cut entry in the log confirms it is active.

How to Install

install
dsh plugin --profile web add github:merkyorlynn/dsh-live-compact

Replace --profile with the profile name you actually run (see ls ~/.dsh/profiles/): usually web in the browser UI, desktop or desktop-NNN in the desktop app.

Category
Memory & Context
Platform
DSH Plugin
Author
merkyorlynn
Distribution
Plugin

dsh-live-compact Key Features

In-place cut after each turnKeeps prefix cache hitsNo model call, millisecond cutsDelays heavy compaction
Listed on dsh-plugin.org

dsh-live-compact Repo Summary

What Does It Do?

Live Compact is a DSH plugin for DeepSeek Harness that compresses context as work happens instead of waiting for the window to fill up. It solves the problem of long tasks repeatedly hitting the roughly 80% threshold, where each full compaction calls the model, takes over ten seconds, and costs money. The plugin cuts the turn that just finished once context passes about 20K tokens, without calling the model, and leaves everything before the cut untouched so prefix cache hits stay at their original level. As a result, context stays pinned at a lower level and the heavy compaction can be postponed as long as possible.

Core Features

  • Compress as you go: cuts the just-finished turn once context exceeds roughly 20K tokens, with no model call and millisecond-level latency.
  • Preserves prefix cache: text before the cut point is never modified, keeping cache hit rates at the same level as the original setup.
  • Delays heavy compaction: context is held down continuously, so the big compaction can be pushed far back; even if it fires, the small cuts remain and context does not refill quickly.
  • Plain-text shadow log: cut content is written to a local shadow directory, append-only, for later inspection.
  • Verifiable effect: a spine cut entry in the long-task log confirms the cut actually took effect.

How to Use This Plugin?

After enabling it in DSH, just run long tasks; the plugin decides automatically at the end of each turn whether to cut, with no manual trigger. Check the log afterwards for a spine cut entry to confirm compaction is active. Note that DSH-TUI is not supported yet because its preset still points to the original compaction, and cut content is stored in a local shadow directory that only grows, so clean it up periodically. The plugin is maintained by MerkyorLynn under the MIT license.

How to Troubleshoot This Plugin?

If no spine cut entry appears in the log after installation, the cut is not taking effect; verify the host version requirement against the official instructions and retry. If it has no effect inside DSH-TUI, that is because its preset still points to the original compaction, so switch to a supported runtime.

This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: merkyorlynn/dsh-live-compact. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.

Install, update, and uninstall this plugin in the Plugin Market of DeepSeek Harness's DSH Plugin Hub
ChatGPTClaudeGrok / X / CursorGemini

DSH Plugin FAQ