Introduction¶
In the DeepSeek Harness (DSH) ecosystem, agents maintain contextual consistency through long-term memory. As sessions accumulate, memory data can easily become fragmented, redundant, or outdated. The dsh-dream plugin is designed to address this issue. It replicates the autoDream behavior of CC-HAHA and focuses on background memory consolidation. Unlike the “casual notes” function handled by dsh-memory, dsh-dream periodically deduplicates recent sessions and existing memory, updates outdated information, removes contradictory content, and prunes indexes.
Plugin Positioning¶
This is a standalone memory consolidation plugin maintained by the developer yihefeikong-rgb. It does not modify the code in dsh-memory; instead, it coexists with it and shares the same storage directory.
Core Features¶
- Background Periodic Consolidation: By default, the plugin silently triggers a consolidation process after 5 sessions have accumulated or 24 hours have passed since the last consolidation. During cold start (the first launch), it only records the time and does not run immediately.
- Manual Trigger: Supports manual triggering via the command line or a tool. You can send the
/dreamcommand (withallorcurrentparameters), or call thememory_dreamtool within an agent. - Four-Stage Consolidation Flow: A forked subagent executes orientation, collection of recent signals, consolidation, and index pruning, then outputs action JSON and persists it safely.
- Safety Mechanisms: Supports atomic overwrites and historical version snapshots (retaining the latest 20), uses a
.dream-lockfile to prevent concurrency conflicts, and confines all write operations to the memory directory.
Installation and Activation¶
To install the plugin, use the official command. After installing or modifying the configuration, the DSH process must be restarted.
dsh plugin --profile web add C:\Users\huangxinyang\.dsh\plugins\dsh-dream
Configuration¶
Configuration can be completed through the DSH settings panel (written to ~/.dsh/settings.yaml) or by editing cordis.patch.yml. Changes take effect only after a restart.
| Option | Default | Description |
|---|---|---|
enabled |
true | Master switch for automatic background dreaming |
minHours |
24 | Minimum interval between consolidations (hours) |
minSessions |
5 | Minimum number of new sessions since the last consolidation |
triggerMode |
hybrid | hybrid = time or content volume, whichever is reached first / gates = fixed interval only / volume = content volume only |
minVolumeChars |
30000 | Content-volume trigger threshold (estimated character count of recent session text pending consolidation) |
scanIntervalMinutes |
10 | Background gating check interval (minutes) |
scopes |
auto | auto = recently active projects + general / all = all / current = current project + general |
maxDigestChars |
60000 | Maximum length for recent session digest (characters) |
maxMemoryChars |
80000 | Reference upper limit for memory body (characters) |
maxTokens |
8192 | Maximum subagent consolidation output; 0 = not passed, determined by the host/model |
agentTimeoutMs |
900000 | Total timeout for the dreaming subagent (milliseconds) |
agentTools |
[] |
List of read-only tools available to the dreaming subagent |
provider / model |
huoshang / deepseek-v4-flash-ga-260731 |
Model used for consolidation inference |
manualOnly |
false | true = only manual/tool triggers are allowed |
storageDir |
~/.dsh/memory |
Memory storage directory (shared with dsh-memory) |
Usage¶
- Start DSH Web:
dsh web - Manually consolidate the current scope:
/dream - Manually consolidate the full scope:
/dream all - Manually consolidate the current project scope:
/dream current - Agent invocation: invoke the
memory_dreamtool on the agent side.
Notes¶
- The plugin runs independently and does not modify
dsh-memory. - It shares the
~/.dsh/memory/directory, and its file format is compatible with theMEMORY.mdindex. - The consolidation inference process uses the Huoshang model (huoshang).
- Ecosystem context: This plugin is hosted in the community directory and on GitHub, and has no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
dsh-dream provides DSH users with automated memory management capabilities. By combining silent background consolidation with manual triggering, it effectively maintains the memory store’s tidiness and accuracy.