#2405·MemOS

fix: DSH 0.1.7 (session format v4) rejects memos recall messages — "format v4 message requires a producer-owned source kind"

Author: PasitearkoCreated Sep 24, 2026Updated Sep 28, 2026
Labelstypes:bugarea:pluginai:pr-readystatus:in-progress

Pre-submission checklist | 提交前检查

  • I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
  • I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
  • This issue is specific to MemOS and not a general software issue | 该问题是针对 MemOS 的,而不是一般软件问题

Bug Description | 问题描述

fter upgrading DeepSeek Harness (DSH) from 0.1.5-rc.2 to 0.1.7-rc.1, the DeepSeek Harness adapter stops working: the web UI shows 本轮运行失败 on every message, and the underlying error is

format v4 message requires a producer-owned source kind

DSH 0.1.7 introduced session format v4, which retires the bare kind: "plugin" message source. Every message must now carry a producer-owned kind (for example plugin:memos-local-memory), and the old kind: "plugin" + plugin pair is rejected outright:

// @deepseek-ai/dsh-session-format-v3-to-v4 if (... typeof value["kind"] !== "string" || value["kind"].length === 0 || value["kind"] === "plugin") throw new SessionFormatError("format v4 message requires a producer-owned source kind");

The adapter still writes the retired v3 shape for the messages it injects, so the turn fails the moment the recall message is persisted.

Expected: memory recall keeps working on DSH 0.1.7 exactly as it does on 0.1.5-rc.2.

How to Reproduce | 如何重现

1.Install DSH 0.1.7-rc.1 and enable @memtensor/[email protected] in a profile's dsh.profile.bundles.

2.Start dsh web and open a session that has at least one memory hit, so the agent/pre-step recall injection fires.

3.Send any message → the turn fails immediately with the error above.

The session log stops right after turn/start, i.e. during agent/pre-step, before any assistant output is produced. Every later message fails the same way.

Reverting DSH to 0.1.5-rc.2 with no plugin change fixes it immediately, which points at the source-kind shape rather than at the recall logic itself.

Environment | 环境信息

Python version: not applicable — this report concerns the DeepSeek Harness adapter (adapters/deepseek-harness/), not the Python package.

Operating System: Windows 11

MemOS version (pip show memoryos): not applicable; plugin version is @memtensor/[email protected] (current npm latest)

Node.js: v24.20.0

DSH: 0.1.7-rc.1 (the release that ships @deepseek-ai/dsh-session-format-v3-to-v4 and the v4 admission check). Reproduces on 0.1.7-rc.1; does not reproduce on 0.1.5-rc.2.

Additional Context | 其他信息

Root cause — two message sources still use the retired shape:

apps/memos-local-plugin/adapters/deepseek-harness/index.ts:387-392 (the recall message built for agent/pre-step):

createRecallMessage: (text) => createUserMessage({ content: [{ type: "text", text }], source: { kind: "plugin", plugin: DEEPSEEK_HARNESS_PLUGIN, // "memos-local-memory" form: "recall", }, }),

apps/memos-local-plugin/adapters/deepseek-harness/host-llm.ts:369:

source: { kind: "plugin", plugin: HOST_LLM_MESSAGE_SOURCE },

The recall message is appended in bridge.ts:273 (messages: [...decision.messages, this.createRecallMessage(context)]), is persisted as a durable user/message event, and is therefore subject to the v4 admission check.

Evidence from the session logs

On 0.1.5-rc.2 the recall rows are stored as {"kind":"plugin","plugin":"memos-local-memory","form":"recall"} (9 occurrences in a single session).

DSH's own v3→v4 migration rewrites those rows into the producer-owned shape {"kind":"plugin:memos-local-memory","form":"recall"} — same metadata, only the identity form changes.

New runtime writes never reach the log at all: the session file ends at turn/start.

Suggested fix (identical to what DSH's producerKind() derives when migrating the old rows, so it stays readable on 0.1.5 as well):

// adapters/deepseek-harness/index.ts source: { kind: plugin:${DEEPSEEK_HARNESS_PLUGIN}, form: "recall" }

// adapters/deepseek-harness/host-llm.ts source: { kind: plugin:${HOST_LLM_MESSAGE_SOURCE} }

No other plugin-side change is required: the v4 check only rejects the bare plugin kind (and empty/missing kinds), and the plugin's own message filters match on source.kind === "user".

Willingness to Implement | 实现意愿

  • I'm willing to implement this myself | 我愿意自己解决
  • I would like someone else to implement this | 我希望其他人来解决