Introduction

DeepSeek Harness (DSH) faces context-space limitations when handling long conversations. The default compression mechanism clears uncompressed context after reaching a threshold, causing loss of historical conversations. dsh-session-archive-plugin provides a supplemental layer: it automatically archives the session before compression and supports full-text search of historical records after compression.

Plugin Overview

This is a DSH plugin maintained by honyKing, categorized as “Memory.” It packages the session-archive skill into an official DSH bundle plugin. After installation, it provides two model tools and one packaged skill, without manually configuring the ~/.agents/skills directory.

Installation and Activation

After installation, you must restart dsh web for the tools to take effect.

# GitHub(推荐)
dsh plugin --profile web add git+https://github.com/honyKing/dsh-session-archive-plugin.git

# Gitee(国内镜像)
dsh plugin --profile web add git+https://gitee.com/xiyoudada/dsh-session-archive-plugin.git

Core Features

archive_session Tool

This tool decodes the complete log of the current DSH session (zstd format) into a readable archive. It generates a plaintext jsonl file and a Markdown summary, saved to the session_archives/ directory in the workspace.

  1. Supports idempotent operations: automatically skips when new data is below the threshold (default 1MB).
  2. Supports the statusOnly parameter: only queries the current context usage percentage.

search_archive Tool

This tool performs full-text search over historical conversations.

  1. Prioritizes searching session_archives/*.md files.
  2. If no match is found, automatically decodes recent session logs for direct scanning.
  3. Supports multi-word AND logic, limit to restrict the number of results, and the deep parameter.

Skill Integration

The plugin registers the session-archive skill via the skill-filesystem provider. After compression, the model can proactively fall back to searching this skill to retrieve historical information.

Configuration and Dependencies

Configuration Items

The plugin supports overriding default configuration in a profile’s cordis.patch.yml:

- id: session-archive
  config:
    scriptsDir: skills/session-archive/scripts
    pythonBin: python
    timeoutMs: 120000
    reArchiveGapMb: 1

Environment Dependencies

  1. Requires a Python environment.
  2. Node.js version must be ^22.19.0 or >=24.0.0.
  3. Peer dependencies are @deepseek-ai/cordis, @deepseek-ai/dsh-tools, and @deepseek-ai/schemastery.

Notes

  1. After installation, you must restart dsh web.
  2. The plugin runs with the permissions of the current dsh process; you should inspect the source code and license before installation.