Summary
The Hermes Basic Memory provider passes the full Hermes backend environment to the bm mcp subprocess.
Hermes Desktop adds its Python 3.11 site-packages to PYTHONPATH, while the Basic Memory uv tool runs on Python 3.12. The child process therefore imports Hermes's Python 3.11 version of pydantic and fails to start.
Environment
- macOS
- Hermes Agent v0.18.2
- Hermes Python 3.11.15
- Basic Memory 0.22.1
- Basic Memory Python 3.12
- Hermes integration:
integrations/hermes
Error
ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'
The imported pydantic path is under the Hermes Python 3.11 virtual environment, while bm is running from the uv-managed Basic Memory Python 3.12 environment.
Reproduction
Running bm with the inherited Hermes environment fails:
~/.local/bin/bm --version
Running it after removing the parent Python environment succeeds:
env -u PYTHONPATH -u PYTHONHOME -u VIRTUAL_ENV ~/.local/bin/bm --version
A diagnostic Hermes provider initialization with those variables removed also succeeds and discovers 23 MCP tools.
Suspected cause
integrations/hermes/__init__.py uses:
self._env = dict(env) if env is not None else os.environ.copy()
The external bm process should not inherit Hermes's Python environment.
Suggested scope
Use a sanitized child-process environment for:
bm mcp
uv tool install basic-memory
bm project add
At minimum, remove:
PYTHONPATH
PYTHONHOME
VIRTUAL_ENV
Please include an integration test with a deliberately contaminated PYTHONPATH, since unit mocks do not reproduce the native-extension ABI failure.
Summary
The Hermes Basic Memory provider passes the full Hermes backend environment to the
bm mcpsubprocess.Hermes Desktop adds its Python 3.11 site-packages to
PYTHONPATH, while the Basic Memory uv tool runs on Python 3.12. The child process therefore imports Hermes's Python 3.11 version of pydantic and fails to start.Environment
integrations/hermesError
The imported pydantic path is under the Hermes Python 3.11 virtual environment, while
bmis running from the uv-managed Basic Memory Python 3.12 environment.Reproduction
Running
bmwith the inherited Hermes environment fails:~/.local/bin/bm --versionRunning it after removing the parent Python environment succeeds:
env -u PYTHONPATH -u PYTHONHOME -u VIRTUAL_ENV ~/.local/bin/bm --versionA diagnostic Hermes provider initialization with those variables removed also succeeds and discovers 23 MCP tools.
Suspected cause
integrations/hermes/__init__.pyuses:The external
bmprocess should not inherit Hermes's Python environment.Suggested scope
Use a sanitized child-process environment for:
bm mcpuv tool install basic-memorybm project addAt minimum, remove:
PYTHONPATHPYTHONHOMEVIRTUAL_ENVPlease include an integration test with a deliberately contaminated
PYTHONPATH, since unit mocks do not reproduce the native-extension ABI failure.