hermes - ✅(Solved) Fix [Bug]: Holographic memory silently degrades to FTS5-only when numpy is missing — no warning, no error, no doctor detection [2 pull requests, 1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#17350Fetched 2026-04-30 06:48:11
View on GitHub
Comments
1
Participants
1
Timeline
8
Reactions
0
Participants
Timeline (top)
labeled ×4cross-referenced ×2commented ×1subscribed ×1

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.

Error Message

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

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

Fix Action

Fix / Workaround

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.

PR fix notes

PR #17356: fix(memory): warn when holographic memory lacks numpy

Description (problem / solution / changelog)

Summary

  • warn once when the holographic memory provider initializes without numpy, instead of silently degrading HRR-backed retrieval
  • surface the same degraded state in hermes doctor when memory.provider: holographic is active
  • add focused regression coverage for provider initialization and doctor diagnostics

Why

Fixes #17350. Without numpy, holographic memory still registers and stores facts, but semantic HRR behavior is disabled or downgraded: probe / related / reason fall back to keyword search, and contradict returns no results. Users had no visible signal that this was happening.

Testing

  • ./.venv/bin/python -m pytest -o addopts='' tests/agent/test_memory_provider.py::TestPluginMemoryDiscovery::test_holographic_warns_when_numpy_missing tests/hermes_cli/test_doctor.py::TestDoctorMemoryProviderSection::test_holographic_provider_warns_when_numpy_missing -q
  • ./.venv/bin/python -m pytest -o addopts='' tests/agent/test_memory_provider.py -q
  • ./.venv/bin/python -m pytest -o addopts='' tests/hermes_cli/test_doctor.py -q
  • ./.venv/bin/python -m py_compile plugins/memory/holographic/__init__.py hermes_cli/doctor.py tests/agent/test_memory_provider.py tests/hermes_cli/test_doctor.py

Note: running tests/agent/test_memory_provider.py tests/hermes_cli/test_doctor.py together still exposes an existing order-dependent failure in two Honcho doctor tests that monkeypatch plugins.memory.honcho after plugins.memory has already been imported. Each file passes independently.

Changed files

  • hermes_cli/doctor.py (modified, +11/-0)
  • plugins/memory/holographic/__init__.py (modified, +13/-0)
  • tests/agent/test_memory_provider.py (modified, +22/-0)
  • tests/hermes_cli/test_doctor.py (modified, +10/-0)

PR #17359: fix: warn when holographic memory degrades due to missing numpy

Description (problem / solution / changelog)

What does this PR do?

When numpy is not installed, the holographic memory plugin silently degrades all HRR-based semantic search to FTS5 keyword matching. No warning is logged, no error is raised. Users have no way to know their memory is running in degraded mode.

This PR adds init-time warnings so the degradation is visible.

Related Issue

Fixes #17350

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • plugins/memory/holographic/holographic.py: add logging.warning() when numpy import fails and _HAS_NUMPY is set to False
  • plugins/memory/holographic/retrieval.py: add logger.warning() in FactRetriever.__init__() when HRR weight is redistributed to zero

No warnings in per-query methods (probe, related, reason, contradict) to avoid log spam — init-time warnings are sufficient.

How to Test

  1. Uninstall numpy from the Hermes venv: pip uninstall numpy
  2. Configure memory.provider: holographic
  3. Start Hermes
  4. Before fix: no indication of degraded mode
  5. After fix: warning logged at startup: "numpy not installed — HRR semantic search disabled, falling back to FTS5 keyword matching"

Checklist

Code

Changed files

  • plugins/memory/holographic/holographic.py (modified, +7/-0)
  • plugins/memory/holographic/retrieval.py (modified, +8/-0)

Code Example

# 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

---

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

---

try:
    import numpy as np
    _HAS_NUMPY = True
except ImportError:
    _HAS_NUMPY = False
RAW_BUFFERClick to expand / collapse

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.

extent analysis

TL;DR

To fix the silent degradation of holographic memory to FTS5 keyword search when numpy is missing, add a warning log when the _HAS_NUMPY flag is False.

Guidance

  • Add a logging.warning call in holographic.py when _HAS_NUMPY is set to False to notify the user of degraded memory mode.
  • Modify the hermes doctor check to include a warning for missing numpy when the holographic memory provider is configured.
  • Consider adding numpy as a declared dependency for the holographic memory plugin to ensure it's installed automatically.
  • Verify the fix by checking the agent.log for the warning message and running hermes doctor to see the warning about missing numpy.

Example

# In holographic.py
try:
    import numpy as np
    _HAS_NUMPY = True
except ImportError:
    _HAS_NUMPY = False
    logging.warning("numpy not found — holographic memory degraded to FTS5 keyword search only")

Notes

The current implementation silently falls back to FTS5 keyword search when numpy is missing, which can lead to unexpected behavior. Adding a warning log and modifying hermes doctor to check for numpy can help prevent this issue.

Recommendation

Apply the workaround by adding a warning log when numpy is missing, as this will provide immediate feedback to the user about the degraded memory mode. Consider making numpy a declared dependency in the future to prevent this issue altogether.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: Holographic memory silently degrades to FTS5-only when numpy is missing — no warning, no error, no doctor detection [2 pull requests, 1 comments, 1 participants]