-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
memory_search fails in non-default agent session while CLI --agent search works; current session resolves inconsistently #93199
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-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm 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: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.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: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
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-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm 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: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.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: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Summary
In a non-default agent session (
agent:explore:main), the built-inmemory_searchtool appears to use the wrong/ambiguous current-session context and fails, even though the same agent's memory index and embeddings are healthy andopenclaw memory search --agent exploreworks.This makes memory recall unreliable for non-default agents and is especially confusing because different built-in session tools disagree about what the current session is.
Environment
2026.6.6exploreexplore: custom providerM6-> resolved asopenai-compatiblenvidia/nv-embed-v1What I verified
1) The actual current conversation is in
exploreUsing session tools:
sessions_history(sessionKey="current")returns:sessionKey: "agent:explore:main"So the live conversation really belongs to the
exploreagent.2)
session_status(current)disagreessession_status(sessionKey="current")reports:Session: mainSo at least one built-in tool resolves/displays
currentdifferently fromsessions_history.3)
explorememory backend is healthyopenclaw memory status --deep --agent explorereports:Provider: openai-compatible (requested: M6)Model: nvidia/nv-embed-v1Indexed: 59/59 files · 673 chunksEmbeddings: readySemantic vectors: readyVector dims: 40964) CLI memory search for
exploreworksCommand:
openclaw memory search --agent explore --query "M6 embeddings" --max-results 5 --jsonThis successfully returns hits from
memory/2026-06-15.mdin theexploreworkspace.5) Built-in
memory_searchtool fails in the same conversationCalling the built-in tool with the same topic:
{"corpus":"memory","maxResults":5,"minScore":0.1,"query":"M6 embeddings"}returns:
{ "results": [], "disabled": true, "unavailable": true, "error": "memory_search timed out after 15s", "warning": "Memory search is unavailable due to an embedding/provider error.", "action": "Check embedding provider configuration and retry memory_search." }This error is misleading because the embedding/provider configuration for
exploreis already healthy and the CLI search succeeds.Expected behavior
In a live session whose actual session key is
agent:explore:main:memory_searchshould resolve the active agent asexploreexploreworkspace/index/provideropenclaw memory search --agent explorereturnssession_status(current)should not collapse or misreport that session as plainmainActual behavior
sessions_history(current)says the current session isagent:explore:mainsession_status(current)saysSession: mainmemory_searchfails/times out in that same session--agent exploreworks fineWhy this looks like a bug
From the installed runtime code, the memory tool path appears intended to resolve the agent from the tool session key:
resolveMemoryToolContext()indist/tools-C_JRyDeX.jsresolveSessionAgentIds()indist/agent-scope-MrLta7Pq.jsresolveSessionAgentIds()should resolveagent:explore:mainto agentexplore.So this looks like one of these:
memory_searchis not receiving the correctagentSessionKey/runSessionKeyin this live webchat routemainsession_status(current)andmemory_searchare not using the same current-session resolution rulesReproduction outline
exploreopenclaw memory status --deep --agent exploreopenclaw memory search --agent explore --query "..."sessions_history(sessionKey="current")session_status(sessionKey="current")memory_searchsessions_history(current)resolves toagent:explore:mainsession_status(current)may reportmainmemory_searchfails or times out while CLI--agent exploresearch worksImpact
This breaks reliable memory recall for non-default agents and makes diagnosis confusing, because the failure message suggests an embedding/provider problem even when the real issue is session/agent context resolution in the tool runtime.