Skip to content

Bug: Honcho session override lookup misses configured cwd when path spelling changes #13284

@NewTurn2017

Description

@NewTurn2017

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/pluginsPlugin system and bundled pluginstype/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