dsh-auto-compact
Run the following command in DeepSeek Harness:
dsh plugin install songoao25/dsh-auto-compact
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install songoao25/dsh-auto-compact in your terminal to install; the full source is at https://github.com/songoao25/dsh-auto-compact . Restart DeepSeek Harness after installation to activate the plugin.
About this plugin
DeepSeek Harness ships its automatic context compaction with an 80% trigger threshold. For models with two-hundred-thousand or even one-million token windows, that timing is often far too late, and long sessions quietly become sluggish before anyone notices why. dsh-auto-compact closes that gap by dropping the trigger to 75% and letting you fine-tune the policy per model, so history is tidied up while there is still comfortable headroom.
It injects the compaction policy directly into user-installed agent presets, preserves the most recent 20 percent of the window verbatim, and ships sensible per-model overrides such as a 70 percent trigger for GPT-5.6 (272K context) and a 65 percent trigger for DeepSeek V4 (1M declared context). The whole process is idempotent, auto-backs up every modified preset, rolls back with a single command, never touches read-only factory presets, and guarantees that a failed summary preserves the original history rather than silently dropping context.
If you run long multi-turn sessions on large-context models, manage several agent presets, or simply want a predictable compaction cadence across your stack, this plugin turns context management from reactive cleanup into proactive maintenance without rewriting a line of Harness source code.
Use Cases
- Trigger compaction earlier on large-context models to stay responsive
- Unify compaction policies across multiple agent presets instead of manual tuning
- Tune trigger thresholds per model window size for flexible context management
Best For
- Heavy users running long multi-turn sessions on large-context models
- Harness users managing multiple agent presets who want a consistent experience
- Developers who prefer proactive context management over reactive cleanup
Related Plugins
A method pack that makes AI coding agents plan against your real baseline, prove completion with fresh evidence, and reduce reworks and unsafe changes.
Turns the DeepSeek Harness session into a captain that builds a durable sub-agent team, splits goals into dependency-aware tasks, and coordinates work via direct messages and a live Web UI.
Gives coding agents design judgment, letting Claude Code, Cursor, and 70+ agents generate and iterate high-quality UI, presentations, and graphics right from the terminal.
Run the Pi ecosystem's plugins on DeepSeek Harness, unmodified, via a compatibility layer that implements Pi's public extension ABI on DSH's native services.