Skip to content

QMD backend: fallback is permanent, never recovers after timeout #9705

@jmworks

Description

@jmworks

Summary

QMD backend falls back to builtin and never recovers, even after gateway restart and increasing timeout.

Environment

  • OpenClaw version: 2026.2.3-1
  • OS: macOS (arm64)
  • QMD: installed via bun (/Users/jmworks/.bun/bin/qmd)

Config

"memory": {
  "backend": "qmd",
  "qmd": {
    "command": "/Users/jmworks/.bun/bin/qmd",
    "limits": {
      "timeoutMs": 120000
    }
  }
}

Steps to Reproduce

  1. Configure memory.backend = "qmd"
  2. First memory_search call triggers QMD query
  3. QMD times out (downloading/loading models takes ~3 minutes on first run)
  4. OpenClaw logs: [memory] qmd memory failed; switching to builtin index
  5. After timeout extended to 120s and gateway restarted, QMD is never called again
  6. All subsequent memory_search calls immediately fallback to builtin (which then fails due to no API key)

Expected Behavior

After gateway restart with longer timeout and models pre-downloaded, QMD should be attempted again.

Actual Behavior

Once QMD fails, OpenClaw seems to permanently skip QMD and go straight to builtin fallback, even after:

  • Increasing timeoutMs from 4000 → 30000 → 120000
  • Copying models to correct XDG cache location
  • Multiple gateway restarts (SIGUSR1 and full process restart)

Logs

2026-02-05T15:11:04.707Z [memory] qmd query failed: Error: qmd query ... timed out after 4000ms
2026-02-05T15:11:04.707Z [memory] qmd memory failed; switching to builtin index
...
2026-02-05T15:29:20.473Z [memory] qmd query failed: Error: qmd query ... timed out after 30000ms
2026-02-05T15:29:20.474Z [memory] qmd memory failed; switching to builtin index

After config change to 120000ms and restart, no new QMD-related logs appear - it seems to skip QMD entirely.

Workaround Attempted

  • Pre-warming QMD manually with same XDG env vars works fine
  • Models downloaded and copied to ~/.openclaw/agents/main/qmd/xdg-cache/qmd/models/
  • QMD direct execution returns results in ~10 seconds after warm-up

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions