Skip to content

[Bug]: Holographic memory silently degrades to FTS5-only when numpy is missing — no warning, no error, no doctor detection #17350

@albertoMartinsen

Description

@albertoMartinsen

Summary

When numpy is not installed in the Hermes environment, the holographic memory plugin (hermes-memory-store) silently disables all HRR-based semantic search and falls back to basic FTS5 keyword matching. No warning is logged, no error is raised, and hermes doctor does not detect this condition. The user has no way to know their memory is running in degraded mode.

Impact

  • All 60+ facts stored in fact_store show retrieval_count = 0 — facts are stored but never retrieved
  • probe(), related(), reason() all silently fall back to search(), which uses FTS5 AND semantics (too strict for conversational queries)
  • contradict() returns an empty list — contradiction detection is completely disabled
  • The user experiences "cold start" amnesia at the beginning of every session, with no indication of why

Root Cause

plugins/memory/holographic/retrieval.py lines 38-42:

# Auto-redistribute weights if numpy unavailable
if hrr_weight > 0 and not hrr._HAS_NUMPY:
    fts_weight = 0.6
    jaccard_weight = 0.4
    hrr_weight = 0.0

And the guard clauses in probe() (line 128), related() (line 206), reason() (line 277), and contradict() (line 353):

if not hrr._HAS_NUMPY:
    return self.search(entity, category=category, limit=limit)  # silent fallback

At no point is there a logging.warning(...) call. The system degrades silently.

The _HAS_NUMPY flag is set in holographic.py lines 27-31:

try:
    import numpy as np
    _HAS_NUMPY = True
except ImportError:
    _HAS_NUMPY = False

Steps to Reproduce

  1. Install Hermes Agent on a fresh system (or migrate without numpy)
  2. Ensure numpy is NOT installed in the active venv
  3. Configure memory.provider: holographic
  4. Add facts via fact_store(action="add", ...)
  5. Try to retrieve facts via fact_store(action="search", query="...") or probe
  6. Observe: retrieval_count stays at 0 for all facts
  7. Check agent.log — no warning about degraded memory mode
  8. Run hermes doctor — no warning about missing numpy

Expected Behavior

At minimum, one of the following should happen when numpy is missing:

  1. Log a WARNING on plugin initialization: "numpy not found — holographic memory degraded to FTS5 keyword search only"
  2. hermes doctor should flag it: "⚠ holographic memory: numpy not installed. HRR semantic search disabled."
  3. Consider making numpy a declared dependency of the plugin, so it's installed automatically

Environment

  • Hermes version: v0.8.x (current as of April 2026)
  • OS: macOS 15 (Mac Mini M2), also reproduced on Ubuntu 24.04 VM
  • Python: 3.12+
  • Migration scenario: Migrating from Ubuntu VM to macOS — numpy was installed on the old VM but the migration didn't transfer pip packages

Additional Context

This was discovered during a real migration from an Ubuntu VM to a Mac Mini. The user went days thinking their holographic memory was working, when in fact it was operating as a plain keyword search. The retrieval_count = 0 for all facts was the only clue — and even that required manual SQL queries to discover.

A separate improvement (already applied locally as a patch) adds an OR fallback in _fts_candidates() when AND returns zero results — this helps conversational queries like "remember what we talked about last night" but doesn't address the silent numpy degradation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/pluginsPlugin system and bundled pluginstool/memoryMemory tool and memory providerstype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions