#23808: fix: skip builtin fallback when memorySearch.fallback='none'
size: S
Cluster:
Memory Management Enhancements
## Summary
When `memory.backend='qmd'` is configured, the search-manager always attempted to fall back to `MemoryIndexManager` if QMD failed. This caused API key errors (OpenAI/Google) even when the user explicitly set `memorySearch.fallback='none'` to disable fallback.
## Root Cause
`getMemorySearchManager()` ignored the fallback config setting and unconditionally tried `MemoryIndexManager.get()`.
## Changes
- Add `isMemorySearchFallbackDisabled()` to check if fallback is explicitly set to `'none'` (not just unset/undefined)
- Skip `MemoryIndexManager` initialization when fallback is disabled
- Update `FallbackMemoryManager` to respect `fallbackDisabled` flag for runtime QMD failures
- Return descriptive error when QMD unavailable and fallback disabled
## Backward Compatibility
Maintains backward compatibility: when fallback is not explicitly set, existing behavior (try builtin) is preserved.
## Testing
```bash
pnpm test src/memory/ # 193 tests pass
pnpm test src/agents/tools/memory-tool # 10 tests pass
```
## Config Example
```json
{
"memory": { "backend": "qmd" },
"agents": {
"defaults": {
"memorySearch": { "fallback": "none" }
}
}
}
```
Most Similar PRs
#9149: Fix: Allow QMD backend to work without OpenAI auth
by vishaltandale00 · 2026-02-04
74.8%
#11179: fix(memory): replace confusing "No API key" errors in memory tools ...
by liuxiaopai-ai · 2026-02-07
69.0%
#20125: fix(doctor): skip memorySearch provider check when using QMD backend
by brandonwise · 2026-02-18
66.6%
#9624: fix(memory): resolve QMD search returning empty results [AI-assisted]
by kowshik24 · 2026-02-05
63.3%
#9381: Fix: Allow QMD CLI memory search when scope is restrictive
by vishaltandale00 · 2026-02-05
63.0%
#17657: fix: clear QMD manager cache on in-process restart (SIGUSR1)
by IrriVisionTechnologies · 2026-02-16
62.7%
#16968: fix(qmd): per-collection search to prevent large collections drowni...
by ProgramCaiCai · 2026-02-15
62.6%
#21868: fix: qmd search/vsearch silently return empty with multiple -c coll...
by jacksclaw · 2026-02-20
62.5%
#21471: fix: check QMD backend before memory search config
by lbo728 · 2026-02-20
62.3%
#10801: fix: eagerly initialize QMD memory backend on gateway startup
by 1kuna · 2026-02-07
62.3%