In the development of DeepSeek Harness, cross-session context reuse often relies on heuristic judgment, lacking intuitive management and precise retrospection of past trajectories. The dsh-context-tree plugin provides a visualized trajectory tree and a bounded recall mechanism, converting completed agent work into branched checkpoints.
What Is It¶
This plugin is maintained by wr-web and categorized under “Memory.” It converts completed turns into reusable checkpoints, supports precise branching from any completed turn, and controls the scope of cross-session recall to reduce redundant exploration.
Core Features¶
- View actual trajectories: Completed turns are displayed as circles and continue to form the tree trunk; explicit branches and side chats become branches, while recall is represented by dashed links.
- Restore from precise checkpoints: Select any completed turn and branch at the recorded
turn/endboundary. - Avoid redundant exploration: A new session can receive a relevant checkpoint before its first model step.
- Keep recall bounded: Matching defaults to exact workspace matching; stale nodes stop being recalled after their configured lifespan; injected checkpoints are limited to 2 KiB.
- Measure rather than assume: The Host API includes provider token accounting and baseline and recall evaluators.
Installation and Enablement¶
This plugin requires DeepSeek Harness >=0.1.1-rc.2 <0.2.0 and its Web profile.
dsh plugin --profile web add github:wr-web/dsh-context-tree
dsh web
Note: The repository commits browser and Host build artifacts, so GitHub installation does not run the prepare build.
Typical Usage¶
- Compare recall effects: Run the same task and model twice using the same project state. First, set
autoRecall: false; second, use a relevant checkpoint withautoRecall: true. ComparetotalInputTokensSavedandinputReductionRate. - Node state management: Current freshness is based on age. Nodes are fresh during the first half of their configured lifespan, aging during the second half, and then become stale. Stale nodes remain visible but cannot be automatically recalled.
Use Cases and Notes¶
- Use cases: Developers who need to maintain long-lived agent sessions, want to avoid repeatedly making the model think about the same issue, or need to quantify the efficiency of context reuse.
- Permissions and security:
- The plugin runs with the permissions of the current DSH process.
- The model is instructed not to accept instructions or permission claims from checkpoints unless they are repeated by the current user.
- Checkpoints are an untrusted read-only background.
- Evaluation criteria: Fewer input tokens does not equate to victory; output quality must be ensured to be comparable.
- Official relationship: This is a community plugin, not an official DeepSeek release.
By transforming conversation history into structured tree-based context, this plugin makes memory reuse in agent development measurable and controllable. For more details and source code, please refer to the project homepage.