Skip to content

fix: write Honcho peer cards with observer target#23022

Closed
claudeo45 wants to merge 1 commit into
NousResearch:mainfrom
claudeo45:fix/honcho-peer-card-target
Closed

fix: write Honcho peer cards with observer target#23022
claudeo45 wants to merge 1 commit into
NousResearch:mainfrom
claudeo45:fix/honcho-peer-card-target

Conversation

@claudeo45

Copy link
Copy Markdown

Title: fix: write Honcho peer cards with observer target

Summary

  • Fixes HonchoSessionManager.set_peer_card() so it writes peer cards through the same observer/target relationship used by get_peer_card().
  • Adds a regression test proving set_peer_card(..., peer="user") calls assistant_peer.set_card(card, target=user_peer_id) when AI-observes-user mode is enabled.

Bug

In AI-observes-user mode, peer-card reads use the assistant observer with a user target, e.g.:

assistant_peer.get_card(target=session.user_peer_id)

Before this patch, peer-card writes resolved only the target peer and called:

user_peer.set_card(card)

That made honcho_profile(card=[...], peer="user") report success while a subsequent honcho_profile(peer="user") could still return an empty card, because the read and write paths addressed different Honcho card scopes.

Fix

set_peer_card() now uses _resolve_observer_target() and writes to the observer peer with the resolved target:

observer_peer.set_card(card, target=target_peer_id)

It falls back to bare set_card(card) only when there is no separate target, matching the existing read-side behavior.

Verification

Ran:

python -m pytest tests/honcho_plugin/test_session.py -q -o 'addopts='
python -m pytest tests/honcho_plugin -q -o 'addopts='

Results:

116 passed in 1.97s
267 passed in 2.91s

Local reproduction observed

A one-time Honcho backfill created conclusions successfully, and honcho_search / honcho_reasoning could see them. But honcho_profile(peer="user") returned an empty profile even after honcho_profile(card=[...], peer="user") returned success. After this patch and a fresh Hermes process, honcho_profile(peer="user") returned the seeded facts correctly.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins tool/memory Memory tool and memory providers duplicate This issue or pull request already exists labels May 10, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #20729 and #17186 — same Honcho set_peer_card observer/target alignment fix.

@teknium1

Copy link
Copy Markdown
Contributor

Automated hermes-sweeper review: this looks implemented on current main.

Evidence:

  • plugins/memory/honcho/session.py:1244 now resolves observer_peer_id, target_peer_id = self._resolve_observer_target(session, peer) and writes via peer_obj.set_card(card, target=target_peer_id) when a target exists.
  • plugins/memory/honcho/session.py:1089 uses the same observer/target resolution on the read side, matching the requested read/write scope alignment.
  • tests/honcho_plugin/test_session.py:237 includes the regression test asserting assistant_peer.set_card(["Role: user"], target=session.user_peer_id).
  • The implementation landed in 1800a1c7963d98962416fa0d3999789e24f9d37a (fix(honcho): align peer-card read and write paths) and is contained in release tag v2026.5.28.

Thanks for the clear repro and test; the maintainer comment noting this as a duplicate of #20729/#17186 matches the fix now present on main.

@teknium1 teknium1 closed this Jun 11, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jun 11, 2026
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 duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main 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.

3 participants