DeepSeekSoftwareShipping codeAI score · 80/100AI-assisted edit · no obvious prompt-injection riskGitHub

Install the memory-fish plugin for DSH to preserve raw dialogue outside context compression

Install plugin → configure data directory → back up / migrate memory library → manage library binding and injection policy

Some experienceStepsWorkflowTip
Who
DeepSeek Harness (DSH) users who lose conversational details after long-context compaction
You get
Retain daily raw dialogue fragments outside DSH's automatic compaction summaries, and selectively inject them in later turns to reduce compression-induced amnesia
You need
SQLite

Constraints

Requires DSH installed with command-line access. Install via `dsh plugin`; data defaults to an SQLite database under the plugin directory. Optionally set `FISH_MEMORY_HOME` to relocate storage. Sessions without an explicit library binding default to the `scratch` trial library.

What they did

The author created the dsh-fish-memory plugin for DeepSeek Harness, adopting a 'store by day, retrieve by time' design. It saves raw dialogue memories outside DSH's automatic compaction mechanism and selectively injects them in later turns to preserve tone, pauses, and emotional details that compaction summaries lose.

How it went

The author reports that the plugin avoids duplicate injection via probe-state.json or a time-based fallback, uses a heat mechanism to manage memory activity, and tracks injected IDs per session in seen.json. No quantitative effectiveness data is reported.

Worth knowing

Documented limitations from the source: keyword search uses bigram tokenization rather than a full tokenizer—adequate for Chinese but less so for English; precise recall of a single memory from months ago is not a strength and should use search instead of injection; memory compaction triggers a model call every five turns, incurring cost; seen.json has no expiration cleanup and will grow as sessions accumulate. The plugin itself only reads; writes are handled by an external storage layer, so plugin crashes do not affect stored memories.

Steps

  1. Install the plugin

    Run the install command in your terminal, or manually place the repository into your profile's local-plugins directory and update package.json. Tables are created automatically on first start.

    Setup guidance · Source text。Execute in command-line terminal

    dsh plugin --profile desktop add dsh-fish-memory
  2. Confirm data storage location

    Data defaults to `<plugin-dir>/data/memory.db`. To change location, set the `FISH_MEMORY_HOME` environment variable. The directory contains memory.db, seen.json, probe-state.json, and logs/.

  3. Back up data

    Periodically copy the entire `data/` directory. It is recommended to stop DSH before copying the SQLite file to avoid write conflicts. Use Copy-Item on Windows or cp -r on macOS/Linux.

  4. Migrate or export partial libraries

    To move to another machine, copy the entire data/ directory. To migrate only some libraries, use sqlite3 .dump with grep, or manually filter and copy via the admin page.

  5. Manage library bindings

    Each memory belongs to a library (lib). Sessions without a binding default to the `scratch` trial library. Bind a specific session to the `default` main library via SQL against the meta table or through the admin page.

  6. Understand injection mechanics and limits

    The plugin uses the last compaction time as a boundary: memories from before compaction may be injected; those after are not re-injected. Without probe-state.json, it falls back to 'do not inject memories from the last 24 hours'. At most one memory is injected per turn, with a heat threshold of 0.62, and a per-session cap of 300 injected IDs tracked in seen.json.

Prompt you can copy

Reference prompt · Editorial suggestion。Confirm the destination, input variables and output format before use.

This block is the prompt. Ads are never placed here.

dsh plugin --profile desktop add dsh-fish-memory

No prompt needed — just follow the steps.

Source

安装 memory-fish,把原话按天存在上下文外避免压缩失忆 · sanyue4621-svg · GitHub · 2026-10-31T08:58:04Z

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related