Preface¶
In DSH’s plugin-based usage model, agents often need to retain reusable experience across multiple sessions. A key challenge is: how can experience be continuously updated, and how can rollback occur on failure, rather than leaving bad state in the context.
Below we introduce dsh-continual-harness. It is a DeepSeek Harness (DSH) plugin published by jasen215, designed for self-improving AI agents, providing persistent memory, periodic review and refinement, cross-session knowledge sharing, and automatic rollback on failure.
What This Is¶
dsh-continual-harness is a DeepSeek Harness (DSH) plugin that enables agents in DSH to continuously organize and update experience across sessions.
Verified information:
- Name:
jasen215/dsh-continual-harness - Maintainer:
jasen215 - License:
MIT - README badges indicate:
Node 22+,TypeScript 6.0+ - Peer dependencies include:
@deepseek-ai/cordis ^4.0.1@deepseek-ai/dsh-agent >=0.1.0-rc.6- And other peer dependencies
Core Features¶
dsh-continual-harness provides the following capabilities:
- State Projection: Injects harness context at each step when the content digest changes.
- Automatic Review and Refinement: Triggered at turn intervals or at compaction end.
- Manual Refinement: Provides the
harness_refinetool, callable directly by the LLM, with rollback support. - Optional Command: Registers the
/refineslash command when the hostcommandscapability exists. - Memory Lifecycle: Supports
archive,unarchive,pinvia refinement metadata. - Ranking Injection: Injects ranking for the latest valid direct-user message using title, content, freshness, and tie-break rules.
- Session Wrap-up: The
harness_wrapuptool provideskeep,promote,archiverecommendations;promotionis copy-only, returning a deterministic error on conflicts. - Session Review Trajectory: Reconstructs in-session review trajectories from session logs.
- Invariant Protection: Enforced via
harness/refinementevent validation and batched failure reporting. - Explicit A/B Benchmarking: Uses the
harness_benchmarkaction tool with fixed frozen cases and code-owned decisions.
Installation and Enablement¶
First, install into the target DSH profile:
dsh plugin --profile <name> add dsh-continual-harness
Where <name> is the target profile name, to be replaced with the actual value.
For subsequent updates, use:
dsh plugin --profile <name> update dsh-continual-harness@latest
Typical Usage¶
Below are the callable capabilities provided by the plugin. Tool and command names are kept as written.
Manual refinement and rollback:
harness_refine
This tool is used for manual refinement with rollback support.
Optional slash command:
/refine
Only available when the host commands capability exists; related notes mention its dependency on @deepseek-ai/dsh-commands (when present).
Session wrap-up recommendations:
harness_wrapup
Used to obtain keep, promote, archive recommendations.
Explicit A/B benchmarking:
harness_benchmark
Used for fixed frozen cases, as well as same-round reference/candidate A/B runs; decisions are managed by code-owned decisions.
Data and Logs¶
Default shared ESP experience root:
~/.dsh/harness/
Implementation log:
continual-harness.log
This log is in JSONL format, with permissions 0600, and supports rotation. Archived entries are hidden from injection and skill materialization.
Use Cases and Notes¶
Suitable for developers already using DSH who want to add continuous experience organization and rollback mechanisms to their agents.
Since the plugin runs with the current dsh process permissions, review the source code, dependency scope, and license before installation. The plugin license is MIT.
Also, do not cobble together installation commands based on the repository name; use the dsh plugin --profile <name> add dsh-continual-harness command above.
Links¶
- GitHub:
https://github.com/jasen215/dsh-continual-harness