Introduction

Long DSH sessions eventually fail because every request re-uploads the entire conversation. As the conversation grows, re-uploading the full history on every request can trigger context limits or transfer failures. dsh-hypercompact solves this with local compaction: when a session exceeds a byte limit, it locally compacts old history in milliseconds without calling an LLM, keeping the request body at a reasonable size.

Plugin Overview

It is a plugin for DeepSeek Harness (DSH), maintained by mrbeandev, released under the MIT license.

It provides deterministic, zero-LLM, byte-budget context compaction. Its core value is “byte-exact recall”: compacted history can be restored verbatim by the agent through the recall tool, without regeneration.

Core Features

  • Deterministic, zero-LLM, byte-budget context compaction: Compaction is rule-based and deterministic, consuming no LLM resources.
  • Byte-exact recall of compacted history: Compacted history can be restored exactly, ensuring no loss of context information.
  • Locally compacts old history in milliseconds: Compaction runs locally and completes in milliseconds.
  • Keeps request small when session grows past a byte limit: Automatically controls request size to prevent exceeding the limit.

Installation and Enablement

Installation requires three steps: add the package, create a preset, and restart to select the preset.

1. Add the plugin package

Add the plugin to the target profile:

dsh plugin --profile web add dsh-hypercompact

2. Create the Hypercompact preset

Run the preset creation script. The script copies the DSH built-in standard preset and replaces the compaction engine with dsh-hypercompact:

node ~/.dsh/profiles/web/node_modules/dsh-hypercompact/scripts/create-preset.mjs

The script automatically handles the preset path based on the DSH version (for example, ~/.dsh/hypercompact/preset-hypercompact/ or ~/.dsh/.agent-presets/hypercompact/).

3. Restart and use

  1. Restart DSH (dsh web).
  2. Create a new session and select Hypercompact (standard) in the preset selector.
  3. Enter /hypercompact in the session to check status, or enter /compact to manually trigger compaction.

Compatibility and Notes

DSH Version Requirements

  • Supported range: DSH >=0.1.5-rc.2 up to <0.3.0.
  • 0.3.0 and later: The plugin refuses to load at startup unless allowUntestedHarness: true is set in the configuration.
  • 0.1.5-rc.1 and earlier: Not supported.

Node.js Version

The plugin requires Node.js ^22.19.0 or >=24.0.0.

Summary

dsh-hypercompact addresses context management in long sessions. Through local, deterministic, byte-level compaction, it controls request body size without sacrificing information integrity. It is suitable for developers who need long conversations or large histories in DSH.

GitHub repository | plugin directory