openclaw - 💡(How to fix) Fix memory_search never dispatches to QMD backend on 2026.3.12 [3 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#49351Fetched 2026-04-08 00:56:08
View on GitHub
Comments
3
Participants
4
Timeline
7
Reactions
0
Author
Timeline (top)
commented ×3closed ×1locked ×1mentioned ×1

memory.backend: "qmd" is configured correctly and the gateway logs qmd memory startup initialization armed for agent "main" at startup, but memory_search tool calls never actually dispatch to QMD. The gateway silently falls back to the builtin backend.

Error Message

  • qmd search "query" returns results (or "No results" without error)

Root Cause

memory.backend: "qmd" is configured correctly and the gateway logs qmd memory startup initialization armed for agent "main" at startup, but memory_search tool calls never actually dispatch to QMD. The gateway silently falls back to the builtin backend.

Fix Action

Workaround

Using memory.backend: "builtin" with memorySearch.query.hybrid configuration works correctly for BM25 + vector search.

Code Example

"memory": {
     "backend": "qmd",
     "citations": "auto",
     "qmd": {
       "includeDefaultMemory": true,
       "update": { "interval": "5m", "debounceMs": 15000 },
       "limits": { "maxResults": 6, "timeoutMs": 4000 },
       "scope": {
         "default": "deny",
         "rules": [{ "action": "allow", "match": { "chatType": "direct" } }]
       }
     }
   }
RAW_BUFFERClick to expand / collapse

Description

memory.backend: "qmd" is configured correctly and the gateway logs qmd memory startup initialization armed for agent "main" at startup, but memory_search tool calls never actually dispatch to QMD. The gateway silently falls back to the builtin backend.

Environment

  • OpenClaw version: 2026.3.12
  • QMD version: 2.0.1 (installed via npm install -g @tobilu/qmd)
  • Node.js: v22.22.0
  • OS: Ubuntu 24.04 (x86_64, no GPU — CPU-only inference)
  • Install: native (no Docker)

Steps to Reproduce

  1. Set memory.backend: "qmd" in openclaw.json with full memory.qmd config block per docs:
    "memory": {
      "backend": "qmd",
      "citations": "auto",
      "qmd": {
        "includeDefaultMemory": true,
        "update": { "interval": "5m", "debounceMs": 15000 },
        "limits": { "maxResults": 6, "timeoutMs": 4000 },
        "scope": {
          "default": "deny",
          "rules": [{ "action": "allow", "match": { "chatType": "direct" } }]
        }
      }
    }
  2. Restart gateway
  3. Verify QMD CLI works independently:
    • qmd status shows 19 files indexed, 37 vectors embedded
    • qmd search "query" returns results (or "No results" without error)
    • qmd update and qmd embed complete successfully
  4. Send a message via Telegram or chat completions API that should trigger memory_search
  5. Check gateway logs

Expected Behavior

Gateway log should show QMD search execution after the model invokes memory_search.

Actual Behavior

  • Gateway logs only show qmd memory startup initialization armed for agent "main" at startup
  • No QMD search activity appears in logs at any point
  • The model either answers from bootstrap context without calling memory_search, or the search silently falls back to builtin
  • No errors or warnings logged — the fallback is completely silent

Relationship to #9645

This was reported as fixed and #9645 was closed on 2026-02-14. However, user @drundoor reported on 2026-02-18 (after closure) that the bug persists on 2026.2.15–2026.2.17, with diagnostic data showing the provider field misleadingly reports "qmd" even when FallbackMemoryManager has silently switched to builtin.

This report confirms the same behavior on 2026.3.12 — the bug was not fixed by the changes that closed #9645.

Workaround

Using memory.backend: "builtin" with memorySearch.query.hybrid configuration works correctly for BM25 + vector search.

extent analysis

Fix Plan

To fix the issue with QMD not being used for memory_search calls, follow these steps:

  • Update the openclaw.json configuration to include the provider field in the memory.qmd block:
    "memory": {
      "backend": "qmd",
      "citations": "auto",
      "qmd": {
        "provider": "qmd",
        "includeDefaultMemory": true,
        "update": { "interval": "5m", "debounceMs": 15000 },
        "limits": { "maxResults": 6, "timeoutMs": 4000 },
        "scope": {
          "default": "deny",
          "rules": [{ "action": "allow", "match": { "chatType": "direct" } }]
        }
      }
    }
  • Restart the gateway to apply the changes.
  • Verify that QMD is being used for memory_search calls by checking the gateway logs for QMD search execution.

Code Changes

No code changes are required, only configuration updates.

Verification

To verify that the fix worked, check the gateway logs for QMD search execution after sending a message via Telegram or chat completions API that should trigger memory_search. The logs should show QMD search activity.

Extra Tips

  • Ensure that the QMD CLI works independently and that the qmd status and qmd search commands return the expected results.
  • If issues persist, try setting the memory.backend to "builtin" with memorySearch.query.hybrid configuration as a temporary workaround.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING