Repository navigation
Description
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 | 问题描述
Environment
-
MemOS: self-hosted via Docker Compose
-
Services confirmed running:
- Neo4j
- Qdrant
- RabbitMQ
- memos API
-
RabbitMQ connection issue resolved
-
Search endpoint reachable
Problem Summary
POST /product/add returns:
{
"code": 200,
"message": "Memory added successfully",
"data": []
}But no memory is actually stored.
Then POST /product/search returns empty results for all memory types.
Relevant Logs
No add/update items prepared; skipping addMemory/knowledgeBaseUpdate logs
Repeated for every /product/add request.
Also search shows no stored Memory nodes.
Expected Behavior
The sentence "I like strawberry." should create at least one memory item (likely preference memory), and /product/search should return it.
Actual Behavior
API returns success, but no memory item is created or indexed.
Additional Notes
-
Happens with:
I like strawberry.My favorite fruit is strawberry.The user's favorite fruit is strawberry.
-
Also tested after RabbitMQ / Neo4j / Qdrant were fully healthy.
-
Same behavior with deprecated
mem_cube_idand newwritable_cube_ids/readable_cube_ids.
Question
Is this a known bug in current add_handler / extraction pipeline, or is additional configuration required for text/preference memory creation?
How to Reproduce | 如何重现
Add Request
import requests, json
payload = {
"user_id": "8736b16e-1d20-4163-980b-a5063c3facdc",
"writable_cube_ids": [
"b32d0977-435d-4828-a86f-4f47f8b55bca"
],
"messages": [
{
"role": "user",
"content": "I like strawberry."
}
],
"async_mode": "sync"
}
res = requests.post(
"http://localhost:8000/product/add",
headers={"Content-Type": "application/json"},
data=json.dumps(payload)
)
print(res.json())Add Response
{
"code": 200,
"message": "Memory added successfully",
"data": []
}Search Request
payload = {
"user_id": "8736b16e-1d20-4163-980b-a5063c3facdc",
"readable_cube_ids": [
"b32d0977-435d-4828-a86f-4f47f8b55bca"
],
"query": "strawberry"
}
res = requests.post(
"http://localhost:8000/product/search",
headers={"Content-Type": "application/json"},
data=json.dumps(payload)
)
print(res.json())Search Response
{
"code": 200,
"message": "Search completed successfully",
"data": {
"text_mem": [],
"act_mem": [],
"para_mem": [],
"pref_mem": [
{
"cube_id": "b32d0977-435d-4828-a86f-4f47f8b55bca",
"memories": [],
"total_nodes": 0
}
],
"tool_mem": [],
"skill_mem": []
}
}Environment | 环境信息
- MemOS: self-hosted via Docker Compose
- Services confirmed running:
- Neo4j
- Qdrant
- RabbitMQ
- memos API
- RabbitMQ connection issue resolved
- Search endpoint reachable
- Ubuntu 24.04 LTS
Additional Context | 其他信息
No response
Willingness to Implement | 实现意愿
- I'm willing to implement this myself | 我愿意自己解决
- I would like someone else to implement this | 我希望其他人来解决
Activity
MaiHHConnect commentedon Apr 19, 2026
Memtensor-AI commentedon Jun 30, 2026
🤖 AutoDev has picked up this issue and started working on it.
Task ID:
6d548ec04e483fceWorking branch:
bugfix/autodev-1493Target branch:
latest dev* branchWorkflow: opsp (analysis → coding → testing → PR)
I will post the PR link here once done. If I need more information, I will ask in the comments.
fix: mem_reader fallback dict key matches consumer in simple_struct (#…
Memtensor-AI commentedon Jun 30, 2026
✅ AutoDev task
6d548ec04e483fcecompleted.Summary: Fixed
/product/addsilently dropping memories under sync mode (#1493).Root cause:
SimpleStructMemReader._get_llm_responseinsrc/memos/mem_reader/simple_struct.pyreturned its salvage-fallback dict under the key"memory_list"(with underscore), while every downstream consumer in the same file (_process_chat_dataline 397,_process_transfer_chat_dataline 434) reads"memory list"(with space). The fallback was therefore dead code: when the LLM returned non-strict JSON for short inputs like "I like strawberry." (a common Kimi-K2 failure mode),_safe_parsereturned{}, the fallback fired but emitted the wrong key,_process_chat_datayielded zero items,text_mem.add([])wrote nothing to Neo4j/Qdrant, and/product/addstill returned 200 +data: []while the scheduler's downstreamlog_add_messagesaudit logged "No add/update items prepared". This is a duplicate of #1355 in symptom and root cause; the #1355 fix was merged on a different branch and had not propagated todev-20260624-v2.0.22.Fix: one-character key rename from
"memory_list"to"memory list"in the fallback branch (lines 288-299 ofsimple_struct.py), bringing the dead fallback back into alignment with the two consumers and the two sibling readers (multi_modal_struct.py:500,strategy_struct.py:67). Added 2 unit-level regression tests intests/mem_reader/test_simple_struct_fallback.pythat (a) pin the fallback dict key contract and (b) prove end-to-end that_process_chat_data(mode="fine")emits at least oneTextualMemoryItemwhen the LLM output is unparseable. Both tests fail red on the buggy code (verified by running them pre-fix) and pass green after the one-character change.Verification:
python3 -m pytest tests/mem_reader/test_simple_struct_fallback.py -v→ 2 passed;python3 -m pytest tests/mem_reader/ -q→ 44 passed + 2 pre-existing markitdown-extras failures (confirmed unrelated viagit stash/rerun);python3 -m pytest tests/mem_scheduler/ -q→ 61 passed + 1 skipped;ruff checkandruff format --checkboth clean on the two touched files. Committedb241194dand pushedbugfix/autodev-1493to origin. opsp artifacts (task.md, proposal.md, spec.md, design.md, verification-report.md) are written under.ai-tasks/andopenspec/changes/(excluded from the working branch via .git/info/exclude) and were synced to the siblingmemos-autodev-specsrepo at commit6e2e41bon main.Base branch:
mainBranch:
bugfix/autodev-1493Commit:
b241194PR: #1989
Assigned to: @MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller
Reviewers: @MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller
kimberly-WY commentedon Jun 30, 2026
Hit this same issue — the root cause was the missing null check before deserialization. Wrapping in a try/catch fixed it on our end.
Fix #1493: fix: /product/add returns 200 success but stores no memory…