Summary
HonchoClientConfig.resolve_session_name() checks self.sessions.get(cwd) before any normalization. A configured per-directory override for /tmp/project is ignored when the same directory is passed as /tmp/project/ or via another equivalent spelling.
Affected files
plugins/memory/honcho/client.py:438-444
Why this is a bug
The sessions map is intended to provide a manual override for a working directory, but that override silently stops applying based on trailing slashes / path spelling instead of directory identity.
Minimal reproduction
cd /Users/genie/.hermes/hermes-agent
source venv/bin/activate
python - <<'PY'
from plugins.memory.honcho.client import HonchoClientConfig
cfg = HonchoClientConfig(sessions={'/tmp/project': 'manual-name'})
for cwd in ['/tmp/project', '/tmp/project/', 'project']:
print(cwd, '=>', cfg.resolve_session_name(cwd=cwd))
PY
Observed output:
/tmp/project => manual-name
/tmp/project/ => project
project => project
Expected behavior
Equivalent paths for the same working directory should hit the same manual override.
Actual behavior
Only the exact string key matches; equivalent cwd spellings fall through to basename-based naming.
Suggested investigation direction
Normalize or resolve cwd and the configured sessions keys before lookup (for example via Path(...).resolve() / consistent absolute normalization, while preserving non-existent-path safety as needed).
Summary
HonchoClientConfig.resolve_session_name()checksself.sessions.get(cwd)before any normalization. A configured per-directory override for/tmp/projectis ignored when the same directory is passed as/tmp/project/or via another equivalent spelling.Affected files
plugins/memory/honcho/client.py:438-444Why this is a bug
The
sessionsmap is intended to provide a manual override for a working directory, but that override silently stops applying based on trailing slashes / path spelling instead of directory identity.Minimal reproduction
Observed output:
Expected behavior
Equivalent paths for the same working directory should hit the same manual override.
Actual behavior
Only the exact string key matches; equivalent cwd spellings fall through to basename-based naming.
Suggested investigation direction
Normalize or resolve
cwdand the configuredsessionskeys before lookup (for example viaPath(...).resolve()/ consistent absolute normalization, while preserving non-existent-path safety as needed).