Introduction¶
DeepSeek Harness (DSH) adopts a plugin-based architecture, but memory management frequently encounters context window limits, lack of long-term context persistence, and cumbersome tool invocation. The dsh-memory plugin aims to solve these issues by providing long-term memory capabilities for the current workspace. It aligns with the memory interaction of Qoder / WorkBuddy / ZCode, offering index-based briefs, end-of-turn relevant recall, version chain management, and on-demand read/write.
Core Features¶
Workspace Long-Term Memory¶
Memory is persisted per current workspace. The system generates a directory name with an 8-character hash for each workspace, ensuring that same-named directories do not cross-contaminate.
Index-Based Briefs (Default)¶
At the start of a session, the most important memories are injected into the system prompt as one index per line (such as 📌 [Category] Title #tag (id)). Compared with full-text injection, this approach can reduce token consumption by 60-70%, and the model can retrieve full text through tools as needed.
End-of-Turn Relevant Recall¶
After a turn ends, the system performs local retrieval based on the user message in that turn and injects the matched memories as a “Relevant Recall” block in the next turn. This is pure local computation and does not generate extra model overhead.
Memory Tool¶
The following commands are provided: save, search, list, get, update, forget, and stats.
Version Chains and Automatic Distillation¶
It supports a version chain mechanism (supersedes); when old memories are superseded, they are archived rather than deleted, and one-click rollback is supported. Memories can be automatically distilled at the end of a turn. It supports captureMode: draft mode, placing distillation results into a pending-approval queue; they take effect after approval.
Memory Management Panel¶
In DSH Settings → Memory, you can view the memory store, timeline, health check, and approval queue.
Installation and Activation¶
The plugin does not support installation via dsh plugin --profile desktop; you must use the PowerShell script. It is recommended to back up the profile file before installation.
cd <克隆下来的 dsh-memory 目录>
pwsh -File install.ps1
After installation, you need to manually restart the DSH desktop client. The script automatically handles shims, profile manifests, and junction mounts.
Typical Usage¶
Save Memory¶
Use the memory tool to save:
memory save [title] [content]
Search Memory¶
memory search [query]
Draft Approval¶
Enable captureMode: draft in the configuration. Distillation results are placed in the pending-approval queue, and you can approve them in the settings panel.
Data Storage and Configuration¶
Storage Path¶
Memory data is stored by default in ~/.dsh/storages/dsh-memory/. The workspace directory structure is workspaces/<directory name>-<hash>/memories.json.
Repository Mirror¶
Memory is not stored in the repository by default, to prevent leakage. If you need to keep a copy in the repository, enable mirror mode in settings; the system will generate .dsh-memory/MEMORY.md in the workspace.
Dependency Configuration Notes¶
During installation, ensure that the dependency key, the bundles item, the name in cordis.patch.yml, and the client module id are all the same canonical package name (@bangbang-03/dsh-memory). If the configuration is inconsistent, the UI in the settings panel may disappear entirely.
Maintainer and License¶
This plugin is maintained by BangBang-03 and is released under the MIT License. For more details, refer to the GitHub repository.