Skip to content

Missing packaging module in Docker image causes Hindsight version comparison to fail #40503

Description

@intdwh

Bug Description

The official Docker image nousresearch/hermes-agent:v2026.6.5 is missing the packaging Python module, which causes the Hindsight memory plugin's version comparison to silently fail.

Root Cause

In plugins/memory/hindsight/__init__.py, the _meets_minimum_version() function uses packaging.version.Version to compare semver strings:

def _meets_minimum_version(actual, required):
    try:
        from packaging.version import Version
        return Version(actual) >= Version(required)
    except Exception:
        return False  # ← silently returns False when packaging is missing

However, packaging is not listed as a dependency in pyproject.toml (neither in core dependencies nor in optional dependencies). It's also not a transitive dependency of any installed package in the venv.

Steps to Reproduce

  1. Pull the official image: docker pull nousresearch/hermes-agent:v2026.6.5
  2. Run the container with a Hindsight API configured
  3. Check logs: docker logs <container> | grep "Falling back"
  4. Observe: WARNING plugins.memory.hindsight: Hindsight API at http://localhost:8888 reports version '0.7.2', older than 0.5.0. Falling back to per-process document_id

Expected Behavior

The packaging module should be available in the venv so that version comparison works correctly. The update_mode='append' feature should be enabled for Hindsight API versions ≥ 0.5.0.

Actual Behavior

Without packaging, _meets_minimum_version() always returns False, causing:

  • update_mode='append' to be disabled
  • Each session creates separate documents instead of appending to a session-scoped one
  • Loss of cross-session memory deduplication

Workaround

docker exec hermes-agent /usr/local/bin/uv pip install --python /opt/hermes/.venv/bin/python packaging

Then restart the Hermes process. This fix is lost on container recreation.

Environment

  • Hermes Agent Version: 0.16.0 (v2026.6.5)
  • Docker Image: nousresearch/hermes-agent:v2026.6.5
  • Python: 3.13
  • Hindsight Client: 0.7.2
  • Hindsight API: 0.7.2

Activity

  1. added
    type/bugSomething isn't working
    P3Low — cosmetic, nice to have
    tool/memoryMemory tool and memory providers
    comp/pluginsPlugin system and bundled plugins
    on Jun 6, 2026
  2. added a commit that references this issue on Jun 8, 2026
    09d6603
  3. liuhao1024 commented on Jun 8, 2026

    @liuhao1024

    This is fixed by #40524 — replace packaging.version with built-in semver parser.

  4. added 2 commits that reference this issue on Jun 14, 2026
    d9d7329
    e11705e
  5. 21 remaining items

  6. added 2 commits that reference this issue on Aug 7, 2026
    8d166bc
    a690b72
  7. added 2 commits that reference this issue on Sep 3, 2026
    c7d8edc
    82d39a5
  8. added 2 commits that reference this issue on Oct 6, 2026
    ca8a94a
    d40e98d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havearea/install-updateInstaller, updater, packaging, wheels, doctorcomp/pluginsPlugin system and bundled pluginstool/memoryMemory tool and memory providerstype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions