Skip to content

KitDoesIt/dsh-compaction-instant

70Last commit Aug 14, 2026

dsh-compaction-instant DSH plugin

dsh-compaction-instant is a drop-in replacement for compaction-basic that compresses shadowed history in milliseconds by using a deterministic text compiler instead of a model. It keeps only original tokens, marks every cut with a durable seq pointer, and requires no LLM calls. The package also includes recall and search tools for lossless recovery of elided content, and a /recall command for human users.

How to install the dsh-compaction-instant DSH plugin

dsh plugin --profile web add dsh-compaction-instant

Copying does not run this command. Review the repository and version before installing the dsh-compaction-instant DSH plugin.

dsh-compaction-instant DSH plugin data source

dsh-compaction-instant DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-compaction-instant DSH plugin can do

  • LLM-free compaction — never invokes a model, no summarizer prompt or latency
  • Near-lossless output — only original tokens, every cut points to its durable seq
  • Instant single-pass deterministic compile, no network or KV-cache concerns
  • Contract-exact drop-in for compaction-basic — same events, provenance, and failure vocabulary
  • Built-in recall tool and search tool for restoring elided content from the session log
  • Human-facing /recall command for keyword/regex search across the durable log
  • Configurable via settings card on web/desktop profiles (since 0.1.4)
  • Compatible with optional toolResultPruner service

Where the dsh-compaction-instant DSH plugin fits

  • Reducing token spend in long agent sessions without losing information
  • Compacting conversation history to keep context within model limits
  • Enabling cost-effective context management in DSH-based applications
  • Recovering elided tool results or text via recall tools during a session
  • Debugging compaction behavior with debug logging and configurable thresholds

Who the dsh-compaction-instant DSH plugin is for

  • DSH users who need efficient context management for long-running agent sessions
  • Developers building agents with deep context windows and high token consumption

dsh-compaction-instant DSH plugin limitations

  • Tokenizer is character-class heuristic (ASCII runs, digit runs, per-char for others), not exact model tokenizer
  • Tool results are not included in the checkpoint output — only seq pointers, requiring recall for full content
  • Compaction only compresses the shadowed history region, not the retained tail
  • Settings card is only available on deployments that compose the settings domain (standard web/desktop profiles)
  • The engine uses a separate token meter (chars/4 + block overhead) for shrink guarantee, which coexists with the heuristic tokenizer

dsh-compaction-instant DSH plugin: from the repository README

Quoted from the KitDoesIt/dsh-compaction-instant README, the upstream source of the dsh-compaction-instant DSH plugin. Copyright remains with the original authors.

Instant, near-lossless context compaction for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) — a **drop-in replacement for `@deepseek-ai/dsh-compaction-basic`** that replaces LLM summarization with the deterministic conversation-compiler principle of [lllyasviel/VCC](https://github.com/lllyasviel/VCC). A compaction compresses a shadowed history span in **milliseconds, with zero model calls**, keeping **original tokens only** — no paraphrase, no hallucination, no summarizer cost. Everything that is cut is still recoverable through `(seq N)` pointers into the durable session log. ## Key features - **LLM-free** — compaction never invokes a model. No summarizer prompt, no inference latency, no token spend; the compile is deterministic text processing, so a million-token history compresses in milliseconds. - **Near-lossless** — output contains only original tokens; every cut is marked and points at its durable `seq`, and prior checkpoints are copied verbatim. - **Instant** — a single deterministic pass over the shadowed nodes; no network, no model, no KV-cache concerns. - **Contract-exact drop-in** — same seam, events, provenance and failure vocabulary as `compac

Read the full READMERepository license: MIT

dsh-compaction-instant DSH plugin questions

How do I install dsh-compaction-instant?

Run `npm install dsh-compaction-instant` in your DSH project. Then replace the `compaction-basic` row in your plugin configuration with `compaction-instant`. The alias install ensures every built-in preset loads it unchanged.

What is the difference between compaction-instant and compaction-basic?

compaction-basic uses LLM summarization to compress history, which costs tokens and latency. compaction-instant is a drop-in replacement that uses a deterministic text compiler — it never calls a model, compresses in milliseconds, and keeps only original tokens. The interfaces, events, and configuration are identical.

Can I still recover content that was compacted away?

Yes. Every cut is marked with a pointer to its durable seq. The package provides a `recall` tool (model-facing) and a `/recall` command (human-facing) that restore the exact original content from the session log. The `search` tool also allows keyword/regex search over the entire durable log, including elided content.

Does compaction-instant work with all DSH profiles?

It works as a drop-in replacement in any DSH deployment that uses compaction-basic. The settings card (for user configuration) is only available on web/desktop profiles that compose the settings domain. Without a settings service, the engine uses only the plugin row's cordis config.

How accurate is the tokenizer for multilingual content?

The tokenizer is a character-class heuristic: ASCII runs and digit runs count as one token each, punctuation is per-character, whitespace is free, and other code units are per unit. For CJK, it counts 1 token per code point. Truncation is always at code-point boundaries, so emoji and astral characters are safe. This is not a perfect model tokenizer, but it is designed to be conservative for multilingual content.