Skip to content

fix(honcho): normalize session override paths#13333

Open
sgaofen wants to merge 1 commit into
NousResearch:mainfrom
sgaofen:codex/fix-13284-honcho-cwd-normalize
Open

fix(honcho): normalize session override paths#13333
sgaofen wants to merge 1 commit into
NousResearch:mainfrom
sgaofen:codex/fix-13284-honcho-cwd-normalize

Conversation

@sgaofen

@sgaofen sgaofen commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Fixes #13284.

Root cause:
Honcho session overrides checked the configured sessions map only with the raw cwd string. Equivalent directory spellings such as trailing slashes, relative paths, or symlinked paths missed the manual override and fell back to basename-derived sessions.

Fix summary:

  • Preserve exact sessions key lookup first so intentionally exact entries still win.
  • Add a normalized fallback lookup using Path(...).expanduser().resolve(strict=False) for both the requested cwd and configured session keys.
  • Add regression coverage for trailing slash, relative cwd, symlink cwd, and exact-key precedence.

Tests:

  • uv run --frozen --python 3.11 --extra dev pytest -o addopts= tests/honcho_plugin/test_client.py -q
  • git diff --check -- plugins/memory/honcho/client.py tests/honcho_plugin/test_client.py

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/plugins Plugin system and bundled plugins tool/memory Memory tool and memory providers labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to PR #13322 — same Honcho session override normalization fix. This PR supersedes it.

@sgaofen

sgaofen commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the related-PR note. I compared this with #13322: both fix normalized cwd lookup for Honcho session overrides. This PR keeps exact configured keys winning first and adds coverage for trailing separators, relative cwd spellings, and symlinked cwd spellings. #13322 also has tilde/redundant-segment coverage; I can fold that into this PR if maintainers want the combined surface here. Leaving this ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P2 Medium — degraded but workaround exists tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants