Skip to content

fix(honcho): honor explicit peerName for user peer resolution - #13237

Closed
swhitt wants to merge 2 commits into
NousResearch:mainfrom
swhitt:fix/honcho-peer-name-precedence
Closed

fix(honcho): honor explicit peerName for user peer resolution#13237
swhitt wants to merge 2 commits into
NousResearch:mainfrom
swhitt:fix/honcho-peer-name-precedence

Conversation

@swhitt

@swhitt swhitt commented Apr 21, 2026

Copy link
Copy Markdown

What does this PR do?

Fixes Honcho user peer resolution so an explicitly configured peerName is actually used as the user peer identity.

Today, gateway user_id wins over peerName, which can split one person into multiple Honcho peers across transports. This changes the precedence to:

  1. peerName
  2. runtime gateway user_id
  3. fallback derived from session key

That keeps multi-user gateway behavior unchanged when peerName is unset, while making single-user / owner-operated setups behave as configured.

Related Issue

Fixes #

Related: #9308

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Changed user peer resolution in plugins/memory/honcho/session.py so config.peer_name wins over runtime_user_peer_name
  • Added behavioral tests in tests/honcho_plugin/test_session.py for precedence, fallback, cross-transport identity, and sanitization
  • Updated the stale expectation in tests/agent/test_memory_user_id.py to match the new precedence
  • Clarified peerName behavior in:
    • plugins/memory/honcho/README.md
    • website/docs/user-guide/features/memory-providers.md
    • optional-skills/autonomous-ai-agents/honcho/SKILL.md

How to Test

  1. Configure Honcho with a peerName and use Hermes from multiple transports with different gateway user_id values
  2. Confirm all sessions resolve to the same user peer instead of creating one peer per transport
  3. Run:
    • python -m pytest tests/honcho_plugin/test_session.py tests/agent/test_memory_user_id.py -q

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Ubuntu 24.04

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

Targeted tests:

python -m pytest tests/honcho_plugin/test_session.py tests/agent/test_memory_user_id.py -q
# 132 passed in 2.99s

Full suite on this branch still has unrelated pre-existing failures outside this change, so I left the full-suite checkbox unchecked.

@swhitt

swhitt commented Apr 21, 2026

Copy link
Copy Markdown
Author

need to rework

@swhitt swhitt closed this Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant