Skip to content

tool_memory_detail_list always empty — how does tool memory get populated? #116

Description

@jackyfan01

Title: tool_memory_detail_list always empty — how does tool memory get populated?

Summary

/search/memory always returns tool_memory_detail_list: [] even with includeToolMemory: true and toolMemoryLimitNumber: 6 configured. After multiple conversations with tool calls (web fetch, file read, etc.), no tool memory is ever created on the cloud side.

Environment

  • Plugin version: 0.1.13
  • Platform: OpenClaw (JVS Claw v2.3.1, Windows)
  • Node: 24.14.1

Config (plugin)

{
  "recallEnabled": true,
  "addEnabled": true,
  "includeToolMemory": true,
  "toolMemoryLimitNumber": 6,
  "includePreference": true,
  "includeAssistant": true,
  "captureStrategy": "full_session",
  "relativity": 0.65,
  "memoryLimitNumber": 10,
  "preferenceLimitNumber": 6
}

.env

MEMOS_CAPTURE_STRATEGY=full_session
MEMOS_INCLUDE_ASSISTANT=true
MEMOS_RECALL_FILTER_ENABLED=true

Observed behavior

  1. Regular memory (memory_detail_list) and preferences work correctly — items are created and recalled.
  2. tool_memory_detail_list is always empty in every /search/memory response.
  3. Log consistently shows tool_memory 0->0 in recall filter results:
    [memos-cloud] recall filter applied: memory 3->0, preference 0->0, tool_memory 0->0
    
  4. Conversations include tool usage (web fetch, file operations) with full session capture enabled.

Questions

  1. How is tool memory populated? The plugin's agent_end hook sends /add/message with conversation messages. Is tool memory extracted server-side from these messages, or does it require a separate API call / different message format?

  2. Are there any prerequisites for tool memory to work? (e.g., specific plan tier, server-side feature flag, message format with tool_call/function role messages?)

  3. Should the plugin send tool_calls / function role messages? Currently pickFullSessionMessages and pickLastTurnMessages only capture user and assistant role messages (index.js lines 173-215). Messages with role: "tool" or role: "function" are silently dropped. Could this be the reason tool memory is never populated?

Suspected root cause

Looking at the source code, both pickLastTurnMessages() and pickFullSessionMessages() filter messages to only include role === "user" and role === "assistant". Any role === "tool" or function call metadata in messages is discarded before sending to /add/message. If the MemOS Cloud server relies on seeing tool/function messages to extract tool memory, this would explain why it's always empty.

Expected behavior

After conversations involving tool usage, tool_memory_detail_list should contain relevant entries when queried with include_tool_memory: true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions