lifeodyssey/dsh-compressor

The streamlined porting of Headroom compresses the output of the tool and reduces the context by up to 20% without affecting the model context cache and Agent performance.

dsh-compressor is a slim port of Headroom that compresses tool output and cuts up to 20% of context without affecting the model's context cache or agent performance. A tool run leaves a long log/JSON/diff of which only a small part is useful: the plugin shortens that output before the next turn, keeps the original on disk, leaves the already-sent prefix alone so the cache stays valid, and gives the agent a tool to pull the full context back. Crushers wired in today are Log, Smart, Text, Search and Diff; Code-aware (tree-sitter) and Kompress (ONNX long prose) crushers are listed as not yet wired in.

Coding & Development ★ 1 updated 2026-08-15 — untested
View on GitHub ↗

Install

dsh plugin --profile web add dsh-compressor

npm dsh-compressor 0.1.0 verified 2026-09-02 (repository field → github.com/lifeodyssey/dsh-compressor; README bilingual EN/zh). Install per README: dsh plugin --profile web add dsh-compressor. Plugin code lives in plugins/dsh-compressor (Node 22+, pnpm). Compressor code comes from Headroom; this plugin is MIT while crates/headroom-* remain Apache-2.0.

Compatibility

DSH web profile; Node 22+ (plugin); crushers wired today: Log / Smart / Text / Search / Diff.

Details

Recent updates

Headroom-port output compression (Log/Smart/Text/Search/Diff crushers); cache-safe prefix preservation; original kept on disk; full-context pull-back tool.

FAQ

How does it keep the context cache valid?
It leaves the already-sent prefix alone — only the pending tool output is shortened before the next turn, and the original stays on disk.
Which crushers are wired in?
Log, Smart, Text, Search and Diff; code-aware (tree-sitter) and Kompress (ONNX, long prose) are listed as not wired in yet.
Where does the code come from?
Compressor code comes from Headroom (this repo is the plugin distribution); the plugin is MIT and crates/headroom-* remain Apache-2.0.

Alternatives

KitDoesIt/dsh-compaction-instant · YuanyuanMa03/dsh-funnel · JohnXu22786/context-pruner

More plugins in Coding & Development

Browse more in Coding & Development

Guides for Coding & Development plugins