You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
memory_search and memory_get are hardcoded in the SUBAGENT_TOOL_DENY_ALWAYS constant in the sub-agent tool policy pipeline. This means no sub-agent session can use memory tools, regardless of agent-level or global configuration.
For multi-agent setups that rely on shared memory (lessons, decisions, context), this effectively blocks memory adoption for any agent work done via sessions_spawn.
Config: memorySearch.enabled: true, extraPaths configured per agent
Root cause
In pi-embedded-BaSvmUpW.js (line ~114190):
constSUBAGENT_TOOL_DENY_ALWAYS=["gateway","agents_list","whatsapp_login","session_status","cron","memory_search",// ← should not be here"memory_get",// ← should not be here"sessions_send"];
This deny list is applied to ALL sub-agent sessions regardless of depth or config.
Workaround
Adding explicit tool names to tools.subagents.tools.alsoAllow overrides the hardcoded deny (the resolveSubagentToolPolicy function filters baseDeny by explicitAllow):
Note:group:memory does NOT work here — the group shorthand is not expanded in resolveSubagentToolPolicy. Only explicit tool names work.
What does NOT work
agents.list[].tools.alsoAllow: ["group:memory"] — wrong scope (per-agent, not subagent policy)
agents.list[].tools.alsoAllow: ["memory_search"] — same issue
tools.subagents.tools.alsoAllow: ["group:memory"] — group not expanded
Why memory tools should not be in DENY_ALWAYS
Read-only tools: memory_search and memory_get are read-only with no side effects. They cannot modify state, send messages, or affect external systems.
Essential for multi-agent setups: Any serious multi-agent deployment with shared knowledge relies on memory tools for context retrieval.
Other read-only tools are allowed: read, web_search, web_fetch, pdf, image are all available to sub-agents by default. Memory tools serve the same purpose (information retrieval).
Config says enabled: memorySearch.enabled: true and full index readiness suggest the intent is for memory to be available. The hardcoded deny silently contradicts this.
Expected behavior
memory_search and memory_get should NOT be in SUBAGENT_TOOL_DENY_ALWAYS. They should follow the normal tool policy pipeline (allow/deny from agent config and tools.subagents.tools).
Steps to reproduce
Configure a multi-agent setup with memorySearch.enabled: true
Spawn a sub-agent via sessions_spawn with agentId pointing to an agent with memory indexed
Ask the sub-agent to use memory_search
Observe: tool is not available in the sub-agent runtime
Additional context
openclaw memory search --agent <id> works correctly from CLI
Direct agent sessions (Telegram, cron) have memory tools available
Summary
memory_searchandmemory_getare hardcoded in theSUBAGENT_TOOL_DENY_ALWAYSconstant in the sub-agent tool policy pipeline. This means no sub-agent session can use memory tools, regardless of agent-level or global configuration.For multi-agent setups that rely on shared memory (lessons, decisions, context), this effectively blocks memory adoption for any agent work done via
sessions_spawn.Environment
2026.3.24 (cff6dc9)memorySearch.enabled: true,extraPathsconfigured per agentRoot cause
In
pi-embedded-BaSvmUpW.js(line ~114190):This deny list is applied to ALL sub-agent sessions regardless of depth or config.
Workaround
Adding explicit tool names to
tools.subagents.tools.alsoAllowoverrides the hardcoded deny (theresolveSubagentToolPolicyfunction filtersbaseDenybyexplicitAllow):{ "tools": { "subagents": { "tools": { "alsoAllow": ["memory_search", "memory_get"] } } } }Note:
group:memorydoes NOT work here — the group shorthand is not expanded inresolveSubagentToolPolicy. Only explicit tool names work.What does NOT work
agents.list[].tools.alsoAllow: ["group:memory"]— wrong scope (per-agent, not subagent policy)agents.list[].tools.alsoAllow: ["memory_search"]— same issuetools.subagents.tools.alsoAllow: ["group:memory"]— group not expandedWhy memory tools should not be in DENY_ALWAYS
memory_searchandmemory_getare read-only with no side effects. They cannot modify state, send messages, or affect external systems.read,web_search,web_fetch,pdf,imageare all available to sub-agents by default. Memory tools serve the same purpose (information retrieval).memorySearch.enabled: trueand full index readiness suggest the intent is for memory to be available. The hardcoded deny silently contradicts this.Expected behavior
memory_searchandmemory_getshould NOT be inSUBAGENT_TOOL_DENY_ALWAYS. They should follow the normal tool policy pipeline (allow/deny from agent config andtools.subagents.tools).Steps to reproduce
memorySearch.enabled: truesessions_spawnwithagentIdpointing to an agent with memory indexedmemory_searchAdditional context
openclaw memory search --agent <id>works correctly from CLI