Skip to content

fix(honcho): use self-observation for peer_card queries#5231

Closed
TreyDong wants to merge 1 commit into
NousResearch:mainfrom
TreyDong:fix/honcho-peer-card-self-observation
Closed

fix(honcho): use self-observation for peer_card queries#5231
TreyDong wants to merge 1 commit into
NousResearch:mainfrom
TreyDong:fix/honcho-peer-card-self-observation

Conversation

@TreyDong

@TreyDong TreyDong commented Apr 5, 2026

Copy link
Copy Markdown

Summary

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.

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), not hermes -> banana.

Fix

Change peer_perspective from session.assistant_peer_id to session.user_peer_id -- this asks how banana views itself, which is where the deriver writes peer_card data.

API Verification

# Self-observation: banana -> banana -> peer_card has data
GET /peers/banana/context
-> peer_card: [6 facts]

# Cross-peer: hermes -> banana -> peer_card is null
GET /peers/hermes/context?target=banana
-> peer_card: null

Testing

After fix, honcho_profile MCP tool returns populated peer card data instead of "No profile facts available yet".

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

Copy link
Copy Markdown
Contributor

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 main. The session.context(peer_perspective=session.assistant_peer_id) call this PR patches was removed in the context injection overhaul that landed in PR #10619 (commit cc6e8941d, 2026-04-15, salvaged from @erosika's PR #5045). get_peer_card was completely rewritten to use _resolve_observer_target() + _fetch_peer_card(), which calls peer.get_card() directly and never invokes the peer_perspective parameter at all.

  • Superseding commit: cc6e8941dfeat(honcho): context injection overhaul, 5-tool surface, cost safety, session isolation (#10619)
  • Current implementation: plugins/memory/honcho/session.py lines 977–994
  • PR diff target line (peer_perspective=session.assistant_peer_id at old line 850) no longer exists in the file

Closing as implemented on main. If you find the same self-observation issue surfacing in another code path (e.g. get_session_context or search_context), please open a new, targeted issue — the semantic insight in this PR's body is still valuable context.

@teknium1 teknium1 closed this Apr 27, 2026
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels Apr 27, 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 P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants