Skip to content

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

@xiaoxinova

Description

@xiaoxinova

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havearea/dockerDocker image, Compose, packagingcomp/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