-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
memory_search can stall a live session when the memory manager/tool-result path does not fail open #49524
Copy link
Copy link
Closed
BingqingLyu/openclaw
#993Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Reliability / session-liveness bug
Summary
A failed or stalled
memory_searchcan paralyze a live session instead of degrading gracefully.In our case, the assistant reached a
memory_searchtool call during a live Telegram turn, and the turn never completed. From the user perspective, the bot looked dead even though the gateway process and Telegram token were still fine.This is worse than “memory_search returns empty results.” It is a liveness bug: one memory tool call can wedge the whole turn.
Environment
main-telegramsources: ["memory", "sessions"]experimental.sessionMemory: trueextraPathspointing at an Obsidian/iCloud vaultopenaitext-embedding-3-smallRelevant config shape:
{ "agents": { "defaults": { "memorySearch": { "sources": ["memory", "sessions"], "extraPaths": [ "/Users/<user>/Library/Mobile Documents/iCloud~md~obsidian/Documents/<vault>" ], "experimental": { "sessionMemory": true }, "provider": "openai", "model": "text-embedding-3-small" } } } }Observed behavior
During a live chat turn:
memory_searchAdditional observations from logs / runtime:
memory sync failed (session-start): ...memory sync failed (session-delta): ...Unknown system error -11, readEINTRThis suggests the bot was not fully down; the turn pipeline got stuck around memory handling.
Expected behavior
memory_searchshould never be able to wedge the entire turn.If memory retrieval is unhealthy, the runtime should fail open and return a tool result like:
disabled: trueunavailable: trueThe assistant should then continue the turn with a degraded reply such as “memory retrieval is unavailable right now.”
Why this appears to be a real bug
Looking at the installed runtime:
memory_searchdoes catch ordinary thrown errors and returns an unavailable result.catch(...)So the dangerous path seems to be a narrower setup/runtime condition where the tool call is emitted but the normal failure result never makes it back to the model/session.
Likely areas:
getMemorySearchManager(...)MemoryIndexManager.get(...)Impact
High.
This turns a memory retrieval problem into a user-visible “bot is dead” incident.
Mitigations tried
agents.defaults.memorySearch.sync.watch = falseThis appears to help, but it is only a mitigation, not a root-cause fix.
Suggested fix
memory_searchextraPaths, session memory, watched paths) as fail-openRelated issues
This may be related to the broader family of memory integration bugs, but this report is specifically about session paralysis / liveness failure, not merely empty results.