DeepSeek Harness Memory: Sessions, Compaction, Plugins

7 min read

How memory works in DeepSeek Harness (dsh): session logs, auto compaction, MCP memory overlays, and long-term memory plugins from Hindsight, Honcho, Mem0, ReMe.

DeepSeek Harness memory has two built-in parts: an append-only session log that is the source of everything the model sees, and automatic compaction that summarizes old history when the context fills. Neither survives into a new session. For memory across sessions, you add a plugin (Hindsight, Honcho, Mem0, ReMe, Nowledge Mem) or an MCP memory server.

DeepSeek Harness (dsh) is DeepSeek’s open-source agent harness: MIT-licensed, written in TypeScript, built on the Cordis plugin framework (“Everything is a Plugin”), and still a developer preview with breaking changes expected. It launched on GitHub on 13 August 2026 and had about 248,900 stars on 13 October 2026. Facts below come from its README, architecture doc and MCP memory guide, plus each plugin’s own docs, checked 13 October 2026. For Claude Code, Codex and Cursor, see AI coding agent memory.

What is DeepSeek Harness memory?

DeepSeek Harness memory is whatever dsh puts back into the model’s context: the current session’s event log, a compaction summary once that log outgrows the window, and context that plugins inject with agent.inject(). Long-term memory, meaning facts and decisions that carry from one session to the next, only exists if a plugin or MCP server provides it.

LayerBuilt in?What it holdsLasts across sessions?
Session logYesEvery event of one session, in a session.jsonl file (optionally Zstandard-compressed)No
CompactionYes, on by defaultA summary of older turns plus the recent tailNo
MCP memory overlayShipped, off by defaultWhatever the MCP server stores (Memorix, reference memory, Engram)Yes, if enabled
Memory pluginNo, install oneFacts, conversations, git history, depending on the pluginYes

How dsh handles context inside a session

The architecture doc is blunt: “The session log is the source of the context the model sees.” Each session is an append-only event log on disk. Plugins add context by injecting it, and the session log records what was injected.

When the conversation grows, the built-in dsh-compaction-basic plugin steps in. Per DeepSeek’s design notes, it runs automatically once the context passes 80% of the window, replaces older history with a summary and keeps the most recent part verbatim. If the model still rejects a request as too long, it tries one more compaction before giving up.

That keeps a long session running, but it is lossy. A decision made early in a long task survives only as a line in a summary, and it’s gone entirely when you open a new session. The trade-offs are the same ones covered in memory consolidation for AI agents.

DeepSeek’s docs don’t describe a project instructions file that dsh loads for you, the way Codex loads AGENTS.md or Claude Code loads CLAUDE.md. The AGENTS.md in the dsh repo is for people building dsh itself. If you need standing rules, put them in your model instructions or use a memory plugin that injects them.

MCP memory overlays from DeepSeek

DeepSeek’s MCP memory guide ships three reference configurations, all off by default. DeepSeek says including them “does not imply endorsement.”

ServerTested versionNeedsNotes
Memorix1.3.0Node 22.18+Works in local heuristic mode without an LLM or embedding service
MCP reference memory2026.7.4NodeLocal knowledge graph in a JSONL file; search is substring matching, “not semantic retrieval”
Engramv1.20.0Go 1.25.10+Stores in ~/.engram, detects the git project

To enable one, install the server, then pass its overlay:

1dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/memorix.cordis.yml"

To keep it across runs, merge the overlay’s insert patch into $DSH_HOME/profiles/<name>/cordis.patch.yml (one profile) or $DSH_HOME/cordis.patch.yml (all profiles). Tools then appear as mcp__<server>__<tool>. The catch with MCP memory: the model has to decide to call the tools. DeepSeek’s guide even suggests adding an instruction like “When historical information may be relevant, search memory” if the tools don’t trigger reliably. More options are in AI memory MCP servers.

Memory plugins for DeepSeek Harness

Native Cordis plugins hook into the session itself, so they can recall and save without waiting for the model to call a tool.

HindsightHonchoMem0ReMeNowledge Mem
Installnpx @vectorize-io/hindsight-coding-agents install dshdsh plugin --profile <name> add @honcho-ai/dsh-honchoBuild and add @mem0/deepseek-plugin 0.3.0 (preview)dsh plugin --profile web add @agentscope-ai/reme-dsh-plugindsh plugin --profile web add github:nowledge-co/nowledge-mem-deepseek-harness
RecallAutomatic on the first prompt (reflect by default)Automatic at session start, refreshed per turnAutomatic before each model requestOnly when the agent calls reme_searchOnce per session, plus on prompts that look like continued work
CaptureSessions plus git historyTurns, before compaction, on shutdownCompleted turnsEvery 5 turns; daily “dream” consolidation at 23:00Finished turns via the nmem CLI
Shared with other agentsYes, one bank per repo across 22 agentsYes, if they use the same workspaceNot documentedNot documentedNot documented
BackendSelf-hosted (MIT), local daemon or Hindsight CloudHoncho serviceMem0 Platform only (MEM0_API_KEY)Local ReMe server (Apache-2.0)Local Nowledge Mem or Nowledge Cloud

Sources: Hindsight Coding Agents docs, Honcho dsh guide, Mem0 DeepSeek plugin docs, ReMe dsh guide, Nowledge Mem dsh guide.

A few details worth knowing:

  • Honcho adds three tools (honcho_search, honcho_chat, honcho_remember) and /honcho commands, and redacts messages before they leave your machine. Its config lives in ~/.honcho/config.json under hosts.dsh, default workspace dsh, shared with Honcho’s other integrations. See Honcho LLM memory.
  • Mem0’s plugin adds search_memory and add_memory tools. Its docs say the host setting is “not a switch to self-hosted Mem0 OSS”, so the plugin needs Mem0 Platform.
  • ReMe injects memory guidance at session start, but memories enter the conversation “only when the agent calls reme_search.” Its daily dream job defaults to the Asia/Shanghai timezone.

Where Hindsight fits

Hindsight is an MIT-licensed memory server from Vectorize, and DeepSeek Harness is one of the 22 agents its Coding Agents package supports. One command installs it: npx @vectorize-io/hindsight-coding-agents install dsh writes a Cordis plugin row to $DSH_HOME/cordis.patch.yml (~/.dsh by default), which every dsh profile composes. It uses native dsh tools, no MCP server.

What it adds over compaction and MCP memory:

  • One memory per repo, across agents. The default bank is coding-agent::{gitProject}. A single dsh process can serve several repos, so Hindsight resolves the bank per session workspace. Claude Code, Codex, Cursor CLI and Copilot CLI working on the same repo read and write the same bank. See Codex memory and Claude Code memory.
  • It learns from git, not only chat. By default it retains commit messages (gitIngest: message); full adds per-commit diffs. It can also import past dsh sessions from $DSH_HOME/sessions, which needs Node 22.15+ to read.
  • Recall without a tool call. On the first prompt it injects a low-budget reflect answer by default, falling back to knowledge pages, then plain recall. The agent can also call hindsight_reflect for questions like “why did we drop Redis?”
  • Consolidation with evidence. Sessions become facts with time and entities, then observations: beliefs backed by quotes, refined as new sessions add evidence.
  • Long-history data. Hindsight reports LongMemEval 94.6 and BEAM 10M 64.1; Mem0’s own comparison page lists Mem0 at 48.6 on BEAM 10M. These are vendor-run numbers. Details in Mem0 vs Hindsight.
  • Model freedom. 25+ LLM providers for its own extraction, including local ones (Ollama, LM Studio, llama.cpp), and it runs fully self-hosted.

The limits: every retain calls an LLM, so writes cost more than a plain log, and the local daemon needs an LLM key. Recall adds context to the prompt; the default caps it at 2,000 tokens of observations, which you can lower. dsh has no plugin notice channel, so Hindsight’s setup messages go to the plugin log, not the UI. For a short, single-session task, compaction alone is enough.

How to choose

If you needUse
Long sessions that don’t overflowBuilt-in compaction (on by default)
A simple local store the model writes to on requestAn MCP overlay: Memorix, reference memory or Engram
Memory shared by dsh, Claude Code, Codex and other agents on a repo, self-hosted, with git historyHindsight
A model of the user and project across Honcho-connected toolsHoncho
You already run Mem0 PlatformMem0’s plugin
Local memory the agent searches only when it chooses toReMe

dsh is a developer preview, and its README warns of compatibility-breaking changes. Pin plugin versions, and check each plugin’s docs after you upgrade dsh.