Bug Description
memory_search returns 0 results for every query when no namespace parameter is provided, even though the brain has 100+ entries with valid 384-dimension HNSW embeddings.
Root Cause
In dist/src/mcp-tools/memory-tools.js, line 288 (and 3 other locations):
const namespace = input.namespace || 'default';
When memory_search is called without an explicit namespace parameter, it defaults to 'default'. This is passed to bridgeSearchEntries, which applies a SQL filter:
WHERE status = 'active' AND namespace = 'default'
However, entries stored via memory_store are typically stored under specific namespaces like health, bwe, business, calendar, etc. — NOT under 'default'. The SQL pre-filter excludes ALL entries before the HNSW vector search even runs.
Reproduction
# Store an entry with a specific namespace
memory_store({ key: "test-1", value: "Hello world", namespace: "myns" })
# Search without specifying namespace — returns 0 results
memory_search({ query: "Hello" })
# Returns: { results: [], total: 0 }
# Search with namespace: "all" — works correctly
memory_search({ query: "Hello", namespace: "all" })
# Returns: { results: [{ key: "test-1", similarity: 0.85, ... }], total: 1 }
Expected Behavior
memory_search without a namespace should search across ALL namespaces (equivalent to namespace: "all"), not filter to the 'default' namespace.
Suggested Fix
Change line 288 (and lines 159, 225, 350) from:
const namespace = input.namespace || 'default';
to:
const namespace = input.namespace || 'all';
Impact
This bug makes the MCP memory search appear completely broken. Users store entries, confirm they exist via memory_stats and memory_list, but every search query returns empty. The failure is silent — no error message, just 0 results with a valid response structure.
Environment
- ruflo v3.5.48 / @claude-flow/cli v3.5.48
- Node.js v25.8.2 (Homebrew)
- macOS 15 (Darwin 25.4.0)
Workaround
Always pass namespace: "all" explicitly when calling memory_search.
Bug Description
memory_searchreturns 0 results for every query when nonamespaceparameter is provided, even though the brain has 100+ entries with valid 384-dimension HNSW embeddings.Root Cause
In
dist/src/mcp-tools/memory-tools.js, line 288 (and 3 other locations):When
memory_searchis called without an explicitnamespaceparameter, it defaults to'default'. This is passed tobridgeSearchEntries, which applies a SQL filter:However, entries stored via
memory_storeare typically stored under specific namespaces likehealth,bwe,business,calendar, etc. — NOT under'default'. The SQL pre-filter excludes ALL entries before the HNSW vector search even runs.Reproduction
Expected Behavior
memory_searchwithout a namespace should search across ALL namespaces (equivalent tonamespace: "all"), not filter to the'default'namespace.Suggested Fix
Change line 288 (and lines 159, 225, 350) from:
to:
Impact
This bug makes the MCP memory search appear completely broken. Users store entries, confirm they exist via
memory_statsandmemory_list, but every search query returns empty. The failure is silent — no error message, just 0 results with a valid response structure.Environment
Workaround
Always pass
namespace: "all"explicitly when callingmemory_search.