fix(honcho): use self-observation for peer_card queries#5231
Conversation
get_peer_card() was querying the cross-peer dimension (assistant → user), which returns empty because peer_card data is written at the self-observation level (user → user) by the deriver's update_peer_card tool. This caused honcho_profile MCP tool to always return 'No profile facts available yet' even when peer_card data exists in Honcho. Fix: use peer_perspective=session.user_peer_id (self-observation) instead of session.assistant_peer_id (cross-peer observation).
|
Thanks for the diagnosis, @TreyDong — the root cause analysis here (peer_card lives at the self-observation level, not the cross-peer level) is correct. However, this is now an automated hermes-sweeper review, and the specific fix no longer applies to current
Closing as implemented on main. If you find the same self-observation issue surfacing in another code path (e.g. |
Summary
get_peer_card()was querying the cross-peer dimension (assistant -> user), which returns empty becausepeer_carddata is written at the self-observation level (user -> user) by the deriver'supdate_peer_cardtool.This caused
honcho_profileMCP tool to always returnNo profile facts available yeteven when peer_card data exists in Honcho.Root Cause
In
HonchoSessionManager.get_peer_card(), the context call used:peer_target=session.user_peer_id(correct)peer_perspective=session.assistant_peer_id(wrong -- asks how hermes views banana)Peer card data lives at
banana -> banana(user self-observes), nothermes -> banana.Fix
Change
peer_perspectivefromsession.assistant_peer_idtosession.user_peer_id-- this asks how banana views itself, which is where the deriver writes peer_card data.API Verification
Testing
After fix,
honcho_profileMCP tool returns populated peer card data instead of"No profile facts available yet".