[Feature]: opt-in path excludes / bounded path-authority weights for builtin memory search ranking
Is your feature request related to a problem?
Yes. On 2026.7.1-2 (builtin memory engine, ollama/nomic-embed-text), derivative files under memory/dreaming/ (rem/light phase reports — ~237 files in our workspace) regularly outrank canonical records (memory/decisions/, memory/projects/, memory/people/, MEMORY.md) on decision/preference/project queries. Distillation files embed similarly to everything, so they surface with high scores and displace the sources they were derived from.
We measured it with a 26-query golden-set benchmark (expected file in top 3):
| Variant | Hit rate | Regressions vs baseline |
|---|---|---|
baseline (openclaw memory search, top-10 pool) |
85% | — |
exclude memory/dreaming/ + memory/run-artifacts/ from candidates |
88% | 0 |
| bounded path-authority adjustment (canonical dirs +0.08, derivative dirs −0.15, re-sort) | 88% | 0 |
Small bounded adjustments recover real misses with zero regressions. (A third variant fusing exact term-match via RRF regressed to 77% — not proposing that.)
#121046 (temporalDecay not applied to dated files under subdirectories — thanks for the fix) will help stale dreaming files decay, but decay is orthogonal: a fresh dreaming distillate still outranks the canonical decision record it was derived from, and decay can't express "this directory is derivative by construction."
#124869 raised the canonical-vs-derived concern and was closed as duplicate/not-planned ("canonical-source ranking is not an established current contract") — this request is the concrete, opt-in version of that contract, with measurement.
Describe the solution you'd like
Either (or both), opt-in under agents.defaults.memorySearch:
excludePaths: glob list removed from the builtin index/candidates entirely, e.g.["memory/dreaming/**", "memory/run-artifacts/**"]. Simplest; in our data it captures the full win.pathWeights: bounded per-path-pattern score adjustments applied at rank time, e.g.{"memory/decisions/**": +0.08, "memory/dreaming/**": -0.15}, with provenance kept visible in results so re-ranking is auditable.
Describe alternatives you've considered
- Relocating the dreaming output outside
memory/— couples plugin internals to a search concern. - QMD engine reranking — heavier migration for what is, in our measurements, a path-policy problem.
- Post-filtering in the agent — impossible for runtime-internal recall (active memory pre-reply injection uses the same ranking).
Additional context
Happy to share the benchmark harness methodology. One caveat from running it: keep eval reports that quote golden queries outside the indexed tree, or the benchmark retrieves its own report (we learned this the fun way).
Source: openclaw/openclaw