Skip to content

Correcting or restoring one fact in a multi-fact memory rewrites the entire memory text #2527

Open

Description

@JunfengRan

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

Bug Description | 问题描述

A memory item keeps one current string, and each history entry keeps one previous string (ArchivedTextualMemory.memory). When that string contains several facts, correcting one fact or restoring an older snapshot replaces every fact in the item.

The feedback prompt tells the model to change only the wrong span and leave the other sentences unchanged. The version layer does not check that those sentences are still present. should_keep_update compares character sets. filter_fault_update runs only when at least five updates are proposed, and then it asks the model again.

Expected: correcting or rolling back one fact leaves the other facts in that memory at their latest values.

How to Reproduce | 如何重现

  1. Build one working-memory string with four facts, plus a longer daily-work passage that does not restate the visit. The facts are: the user is a primary-school Chinese teacher in Haidian, Beijing; the user prefers paper books, especially long-form nonfiction, on weekends; the user plans to visit their sister in Hangzhou in May 2026 and stay one weekend; the user's sister lives in Xihu District, Hangzhou, and they talk once a month. estimate_tokens on this string is 447. Store that whole string as the single history snapshot.

  2. Correct only the job, to a middle-school math teacher in the same district. Call MemFeedback._single_update_operation with memory_version_switch off and operation["text"] set to the full replacement string. The node memory field becomes that entire string. The other three facts are present only because they were copied into the replacement.

  3. Later change only the plan, to a Chengdu teaching conference in August 2026, again by writing the whole string.

  4. Restore the snapshot by writing history[0].memory through the same update. The stored text is the original string. The Chengdu plan is gone together with the job correction. The preference and the sister fact are the snapshot sentences, not values merged from the current text.

  5. From the original string, delete only the Hangzhou-visit sentence and leave the job, the preference, and the sister fact. should_keep_update returns true. The character-set change ratio is 0.0949, below the 0.2 gate used when the estimate is at least 200 tokens. standard_operations keeps the operation as UPDATE. The following write stores the text without the visit.

  6. Repeat the job correction with memory_version_switch on and no provider for memory_version.apply_feedback_update. The fallback assigns the whole new string. The fields written to the node do not include history, and the existing snapshot list stays at length 1.

Environment | 环境信息

  • Python version: 3.12.15
  • Operating System: Darwin 27.0.0 arm64
  • MemOS version: MemoryOS 2.0.33

Additional Context | 其他信息

This shape is already in the shipped prompts. The chat extraction example puts a meeting, a timeline, and a deadline concern into one value. The feedback example updates the employer inside a memory that also says the user has a good relationship with his wife, and it relies on the model to copy that second sentence into the new text.

Open and closed issues were checked for rollback, memory version, and feedback text updates. None report this. The feedback module doc describes archiving the old memory and writing the new one. It does not describe a per-fact snapshot.

Willingness to Implement | 实现意愿

  • I'm willing to implement this myself

Activity

  1. added
    area:memory记忆存储、检索、更新、召回逻辑
    status:needs-designNeeds design discussion before implementation | 开发前需要方案设计
    types:bugSomething isn't working | 功能异常
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:memory记忆存储、检索、更新、召回逻辑status:needs-designNeeds design discussion before implementation | 开发前需要方案设计types:bugSomething isn't working | 功能异常

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions