Summary
plugins/memory/honcho/client.py computes GLOBAL_CONFIG_PATH = Path.home() / ".honcho" / "config.json" at import time, and resolve_config_path() later falls back to that frozen path.
If HOME changes after import (common in isolated tests, subprocess sandboxes, or profile-switched environments), Honcho still resolves the global config under the old home directory.
Affected files
plugins/memory/honcho/client.py:30
plugins/memory/honcho/client.py:56-75
- related test masking the behavior:
tests/honcho_plugin/test_client.py:297-329
Why this is a bug
The code advertises dynamic resolution order with ~/.honcho/config.json as the final fallback, but the actual fallback is captured once at import time. That makes runtime home isolation ineffective.
Minimal reproduction
cd /Users/genie/.hermes/hermes-agent
source venv/bin/activate
python - <<'PY'
import os, tempfile
from pathlib import Path
from plugins.memory.honcho.client import resolve_config_path
orig = os.environ.get('HOME')
with tempfile.TemporaryDirectory() as td:
os.environ['HOME'] = td
print('runtime_home', Path.home())
print('resolved', resolve_config_path())
if orig is not None:
os.environ['HOME'] = orig
PY
Observed output:
runtime_home /var/.../tmp...
resolved /Users/genie/.honcho/config.json
Expected behavior
When HOME changes and neither $HERMES_HOME/honcho.json nor ~/.hermes/honcho.json exists, resolve_config_path() should resolve to the current runtime home, e.g. <runtime HOME>/.honcho/config.json.
Actual behavior
It returns the import-time home path instead.
Suggested investigation direction
Compute the global fallback path inside resolve_config_path() (or another runtime helper) instead of storing Path.home() in a module-level constant.
Summary
plugins/memory/honcho/client.pycomputesGLOBAL_CONFIG_PATH = Path.home() / ".honcho" / "config.json"at import time, andresolve_config_path()later falls back to that frozen path.If
HOMEchanges after import (common in isolated tests, subprocess sandboxes, or profile-switched environments), Honcho still resolves the global config under the old home directory.Affected files
plugins/memory/honcho/client.py:30plugins/memory/honcho/client.py:56-75tests/honcho_plugin/test_client.py:297-329Why this is a bug
The code advertises dynamic resolution order with
~/.honcho/config.jsonas the final fallback, but the actual fallback is captured once at import time. That makes runtime home isolation ineffective.Minimal reproduction
Observed output:
Expected behavior
When
HOMEchanges and neither$HERMES_HOME/honcho.jsonnor~/.hermes/honcho.jsonexists,resolve_config_path()should resolve to the current runtime home, e.g.<runtime HOME>/.honcho/config.json.Actual behavior
It returns the import-time home path instead.
Suggested investigation direction
Compute the global fallback path inside
resolve_config_path()(or another runtime helper) instead of storingPath.home()in a module-level constant.