Introduction¶
When running Agents in DSH, the context usually only covers the most recent few turns of the current session. It becomes difficult to trace what was done, decided, or trial-and-errored earlier once the session changes or the context is compacted. Common workarounds include handwritten notes, external vector databases, or asking the model to answer “from memory”—all of which are disconnected from the host session logs, and make it hard for the Agent to proactively query its own history during a conversation.
Below is an introduction to the community plugin dsh-recall (maintainer liu-zhengdong): it serializes every turn on the DSH side into a searchable Run, generates summaries asynchronously in the background, and provides tools and the /runs command for both Agents and humans to browse the same archive. The plugin is categorized as “Memory”. Repository: GitHub, Directory Page: skillhub.cn. The DSH ecosystem is “everything is a plugin”; the community directory is an independent site with no official affiliation with DeepSeek or Hunyuan.
What is this¶
dsh-recall is a memory-type plugin for DeepSeek Harness: upon completing a turn, it archives a Run (start/end time, working directory, status, goal, summary, etc.). It does not copy message body text—the text remains held by the host session logs and is read back via ctx.sessionQuery.readSession() during retrieval. The behavioral contract is ported from pi-experiencev2, while the storage and injection mechanisms are rewritten for the DSH plugin interface. Compared to pi-experiencev2, the Run boundary is turn/start → turn/end (one turn = one Run), the interface side features /runs, a recall settings page, and a left-side review session. Configuration is written in the profile’s cordis.patch.yml (schemastery Config).
Core Functions¶
Archiving and Summarization¶
When turn/end is submitted, the boundaries of that turn are collapsed from the session log and written to the run_archive storage domain. The review session itself is not archived and does not generate summaries; its process and reports reside in the separate dream storage domain.
After archiving, the model is called asynchronously via a queue to generate a Chinese overview; if summarization fails, only a summaryError is recorded, but the archiving proceeds normally. The current package version is 0.2.11 (subject to the repository’s package.json).
Retrieval, Expansion, and Deletion¶
| Tool | Function |
|---|---|
recall |
Search by keyword / Run ID / time / working directory; returns matching summaries and bodies, paginated |
recall_message |
Read the full text of a message by r3/m2; returns raw JSON if format=raw |
forget |
Batch delete Runs upon explicit user request; rejects the entire batch if an unknown ID is encountered |
dream |
Query saved audit reports, fixed material scopes, and sources |
dream_complete |
Submit an audit report with sources from a review session and complete upon normal termination |
recall searches for literal keywords within summaries and bodies; tool results and cards are phrased as “historical evidence”—a saved record does not equate to task success.
New Session Startup Index¶
When the main Agent starts a new session, it can collect the most recent Runs in the current directory into an index segment and inject it into the context only once. Injection does not occur in scenarios involving sub-agents, forked sessions, review sessions, resumed existing sessions, clearing, or compaction. If the current directory does not have enough Runs to meet the configured count, it will not supplement from other directories.
Auto-Review (Auto-Dream)¶
After accumulating 30 unorganized Runs globally (threshold is configurable), an independent review session is automatically started: it reviews this batch of experiences, writes what is worth remembering long-term into memory, and leaves an auditable report. The process and results can be viewed under “Review” (复盘) on the left side. For details, see the repository documentation Auto-Review.
/runs Command¶
In DSH, you can input directly:
/runs Most recent Runs in the current directory
/runs search <keyword> Search current directory
/runs all Most recent Runs in the whole library
/runs r12 Expand the message list of a specific Run
/runs r12/m3 Read a specific message
/runs summary r12 View only the summary of a specific Run
/runs debug Diagnostic info (count, tombstones, summary failures)
If the input does not match any of the above formats, the entire line is treated as a keyword search in the current directory.
Installation and Activation¶
This package is not published to npm, so add dsh-recall will fail. The official installation methods are as follows:
# From GitHub
dsh plugin --profile <profile> add github:liu-zhengdong/dsh-recall
# Local checkout (for development)
dsh plugin --profile <profile> add /abs/path/to/dsh-recall
The package declares dsh.bundle.patch; after adding, the package name is appended to that profile’s dsh.profile.bundles. You can confirm the configuration is hooked up using the following command:
dsh --profile <profile> --dump-config | grep -B2 -A6 dsh-recall
package.json declares compatibility with DSH 0.2.0-rc.2 and 0.2.1-rc.2; the Node engine requirement is ^22.19.0 || >=24.0.0. License: MIT.
Configuration Essentials¶
Configuration fields are located in the profile’s cordis.patch.yml. Common items are as follows (see README for full instructions):
| Field | Default | Description |
|---|---|---|
overviewLimit |
200 |
Target Unicode character count for each Run summary (1–2000) |
noSummary |
false |
Disable Run summarization |
summaryProvider / summaryModel |
"" |
Must be filled simultaneously to specify a summary model; if both are empty, the current session routing is used; filling only one is considered a configuration error |
autoDream |
true |
Trigger auto-review when threshold is reached |
dreamThreshold |
30 |
Auto-review threshold (1–1000), max 30 items per batch |
dreamProvider / dreamModel |
"" |
If both empty, uses host default; if both filled, specifies the review model |
startupRecall |
true |
Whether to inject recent Run index in a new session |
startupRecallCount |
10 |
Number of Runs to inject (1–100) |
startupRecallScope |
cwd |
cwd for current working directory only; all includes all directories and labels the directory |
Data Storage Location¶
<dsh home>/storages/run_archive/
runs/<sessionId>__<turn>.json
tombstones/<sessionId>__<turn>.json
The storage domain name is run_archive, and the backend is determined by the profile’s storage-domain (default json). Review-related data is in the separate dream storage domain.
Typical Usage¶
- Add the plugin to the profile using the commands above, and confirm
dsh-recallappears indump-config. - Complete several turns in normal conversation to let the plugin archive automatically; use
/runsto view recent Runs in the current directory, or/runs search keywordto search. - When the Agent needs to query history itself, rely on the model calling
recall/recall_message; for expanding a single message example: passr12/m3torecall_message. - When global unorganized Runs reach
dreamThresholdandautoDreamis true, pay attention to the “Review” (复盘) on the left and the audit reports returned by thedreamtool; changes to long-term memory files are based on the audit report records and are not insiderun_archive.
Use Cases and Notes¶
Suitable for: Long-term coding, troubleshooting, and multi-turn decision-making under the same DSH profile, where you want the Agent to be able to retrieve “what it has done on this machine in this directory before,” and optionally organize batch Runs into long-term memory.
Notes:
- The plugin runs with the current dsh process privileges. Before installation, please read the source code and the MIT license to ensure the archiving and review behaviors comply with your requirements.
- It does not store copies of message bodies. After deleting a Run (
forget), a tombstone remains, and sequence numbers are not reused. - Community directory star counts and other info are subject to the site display (GitHub stars were 0 at the time of writing). Version updates require the maintainer to bump the
versioninpackage.jsonand push a tag; the marketplace side compares version numbers first.
Conclusion¶
dsh-recall connects “one Run per turn + summary + retrieval + optional auto-review” to the DSH session lifecycle, turning execution history into queryable evidence for the Agent rather than notes scattered outside the context. To learn more, open the Directory Page and the GitHub Repository README.