-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
experimental.sessionMemory does not surface gateway-dispatched sessions in memory_search #53550
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.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:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.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
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.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:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.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
Environment
gemini-embedding-2-preview)per-peerDescription
When
agents.defaults.memorySearch.experimental.sessionMemoryistruewithsources: ["memory", "sessions"],memory_searchdoes not surface content from gateway-dispatched sessions (e.g.,openclaw_gatewayadapter sessions). Only content from.mdmemory files is returned.This creates a critical gap in multi-agent setups where an agent performs work in a gateway-dispatched session, then cannot recall that work when queried from a different session (e.g., WhatsApp DM).
Config
{ "agents": { "defaults": { "memorySearch": { "provider": "gemini", "model": "gemini-embedding-2-preview", "experimental": {"sessionMemory": true}, "sources": ["memory", "sessions"], "sync": { "sessions": { "deltaBytes": 50000, "deltaMessages": 20 } } } } } }Reproduction
openclaw_gatewayadapter for an external orchestratoragent:friday:paperclip:issue:{uuid}agent:friday:whatsapp:direct:+1234567890~/.openclaw/agents/{name}/sessions/*.jsonlmemory_searchfor content only in the gateway sessionmemory/*.mdfiles. No session transcript content.Root Cause Analysis
We traced this through three layers:
1. QMD only indexes
.mdfilesQMD config at
~/.openclaw/agents/{name}/qmd/xdg-config/index.ymlcontains:No session transcript collection. No
.jsonlpatterns. QMD has no awareness of session files.2. Session indexing pipeline doesn't execute
With
experimental.sessionMemory: trueconfigured, we see zero log output for session indexing. Nosession.*index,session.*sync, ormemory.*sessionentries in journalctl. The feature appears to be configured but not active.3. QMD timeout causes fallback
The 4000ms QMD timeout triggers a fallback to the builtin index, which also has no session awareness.
4. Gemini embedding provider interaction
We're using
gemini-embedding-2-previewas the memory search provider. It's unclear if session indexing requires a specific embedding provider or if the Gemini provider doesn't support session transcript indexing. The docs don't specify provider requirements for sessionMemory.Impact
In a multi-agent orchestration setup (e.g., OpenClaw + Paperclip AI), agents perform work in gateway-dispatched sessions. When the user asks the agent about that work via DM, the agent says "I have no record" — even though the work was done, transcripts exist on disk, and LCM stored the messages.
memory_searchExpected Behavior
openclaw_gatewaysessions) should be indexed whensessionMemory: truememory_searchfrom any session should return results from all indexed sessionsSuggestions
sessionMemoryis enabledmemory_searchwhen lossless-claw is the contextEngineRelated
lcm_grepis conversation-scoped)