Introduction

The core idea of DeepSeek Harness (DSH) is “everything is a plugin.” When building agents for long-term memory or complex tasks, limited context windows are a practical constraint. Currently, DSH or other harnesses rely on threshold-triggered passive compaction, and the model cannot intervene in this process. The meta-compaction plugin aims to change this pattern and give the model control over its own context.

What Is This

dsh-compaction-meta is a meta-compaction plugin. Its core value is: allowing the model to decide when and how to compact its own context. It plans to turn “editing its own context” into an action that the model can invoke directly, replacing threshold-triggered passive compaction.

The plugin is currently in its skeleton stage—not yet implemented. The implementation plan is in the top comment in src/index.js.

Core Features

The plugin plans to provide the following capabilities:

  1. context_list: List the current context. It provides a numbered view with grouping by turn/invocation, prefixes and suffixes, and token estimation, helping the model locate intervals in its memory.
  2. context_compact: Replace a specified interval with model-authored text. The replacement follows the official compaction transaction, including checkpoint markers, balanced tool-call pairing, and log reconstructability.
  3. Disable passive compaction: Through configuration, prevent thresholds from triggering, so the model alone decides when compaction occurs.
  4. Companion skill: Provide a companion skill that teaches the model when and how to use the above capabilities.

Installation and Enablement

Install in DeepSeek Harness:

dsh plugin --profile <name> add dsh-compaction-meta

Or install from GitHub:

dsh plugin --profile <name> add "github:DViridescent/dsh-compaction-meta"

Typical Usage

This package is the third provider for compaction seam, alongside compaction-basic (passive threshold trimming) and compaction-instant. In the isolate: { compaction: true } group of a preset, it is used to replace basic.

Use Cases and Notes

Because it is in its skeleton stage, it is recommended to read the source code carefully before installing (the implementation plan is at the top of src/index.js). The plugin runs with the permissions of the current DSH process, so make sure you understand the source code and license.

Conclusion

This plugin provides an interface for future long-term learning agents to exert metacognitive control over context.