billion-context-dsh: A DSH plugin where the model decides when to compact context
tyan66666/billion-context-dsh
Model-driven context management for DeepSeek Harness: the LLM decides when and what to compress into high-fidelity summaries, with decompress and context search so long tasks survive hard truncation.
billion-context-dsh is a context management plugin for DeepSeek Harness that returns the decision of when and what to compress from a hard cap to the model itself. It targets long conversations that get hard-truncated and early messages silently dropped, letting the model write high-fidelity summaries that keep file paths, decisions and error messages while compressed ranges become recoverable checkpoint nodes. It ships four model tools, compress, decompress, search_context and acp_status, and acts as the global compaction backend across all modes with automatic window detection and tools and nudge on by default.
How to Install
dsh plugin --profile web add billion-context-dsh- Category
- Data & Knowledge
- Platform
- DSH Plugin
- Author
- tyan66666
- Distribution
- Plugin
billion-context-dsh Key Features
billion-context-dsh Repo Summary
What Does It Do?
Billion-Context is a DSH plugin for DeepSeek Harness that hands the decision of when and what to compress to the model itself. It solves the problem of long conversations being hard-truncated and early messages silently dropped: the model calls a compress tool to write high-fidelity summaries that keep file paths, decisions and error messages while reclaiming context space. Compressed ranges become recoverable checkpoint nodes, with the original text kept in an append-only session log, so very long tasks are far more likely to finish.
Core Features
- Model-driven compaction: summaries are written by the model itself, with no second LLM summarization call, so timing and scope stay under model control.
- Advisory, not mandatory: the automatic policy only nudges, leaving whether and when to compress to the model.
- Persistent and recoverable: compressed ranges become checkpoint nodes, decompress restores the original text, and search_context finds details inside a block.
- Four model tools: compress, decompress, search_context and acp_status cover compaction, recovery, retrieval and status self-verification.
- Lean context throughout: each request uses only a small, refined context instead of one large uniform compaction, so detail does not decay and token usage drops.
- Global mounting: it acts as the DSH compaction backend across all modes (standard, code, minimal, cordis and custom presets), with automatic window detection and tools, command and nudge enabled by default.
How to Use This Plugin?
After enabling it in DSH, open a new session and let the model call acp_status or run /acp-prune status to confirm the mount. During normal conversation the model decides when to call compress on a range of context; use decompress to bring the original text back and search_context to look up details inside a compressed block. To adjust behavior, override the default config with a compaction-acp line of the same id in your profile patch, for example by setting modelContextLimit; when omitted, the real model window is detected automatically. Maintained by Tyan66666 under the MIT license, the plugin reuses the acp-kernel compaction core with an adapter layer rewritten for the DSH durable-surface model, and it remains a beta release not intended for production use.
How to Troubleshoot This Plugin?
Two backends registering ctx.compaction in the same realm will conflict, so mounting ACP requires disabling the host compaction-basic at the same time; bundle installs already include that fallback. If it fails to work on an older DSH, the session replace operation protocol fields were renamed with stricter validation and this engine only emits the new shape, so upgrade DSH before installing this release. When installing from a git source and build scripts are blocked, use the committed prebuilt artifacts instead, which need no build step.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: tyan66666/billion-context-dsh. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
