-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
memory search --json prints results but does not exit with QMD backend #91821
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.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.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.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.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.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.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.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
Give feedbackNo fields configured for issues without a type.
Summary
openclaw memory search <query> --jsoncan print valid JSON results but keep the process alive when the QMD memory backend is active. Upstream callers then surface this as a timeout / embedding-provider style failure even though QMD itself is healthy and returns results quickly.Environment
2026.6.5memory.backend=qmd)Reproduction
openclaw memory search "QMD rebuild method" --jsonObserved behavior in my environment:
memory_searchtimeout / embedding-provider error.Diagnostics
QMD itself appears healthy:
qmd doctor qmd search "QMD rebuild method"In my environment:
qmd doctorpasses embedding freshness, fingerprint, and vector sample checks.qmd searchreturns quickly.openclaw memory search ... --jsonprints results, then hangs.This makes the issue look like OpenClaw CLI/runtime exit handling after JSON output rather than a QMD index or embedding provider failure.
Local hotfix that resolves it
In the generated runtime,
runMemorySearch()currently writes JSON and returns. Adding an explicit exit after JSON output resolves the hang locally:After this local patch:
openclaw memory search ... --jsonexits with code 0 in ~3s.memory_searchtool returns successfully with providerqmd.Expected behavior
After printing JSON for
memory search --json, the CLI should exit cleanly with status 0 when the search succeeds, even if the QMD manager leaves handles open internally.