From 4e91b0240bb20864531410e2533b89ec87367522 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sun, 15 Mar 2026 19:07:57 -0700 Subject: [PATCH] fix(honcho): correct seed_ai_identity to use session.add_messages() (#1475) The seed_ai_identity method was calling assistant_peer.add_message() which doesn't exist on the Honcho SDK's Peer class. Fixed to use the correct pattern: session.add_messages([peer.message(content)]), matching the existing message sync code at line 294. Discovered and fixed by Yuqi (Hermes Agent), Angello's AI companion. Co-authored-by: Angello Picasso --- honcho_integration/session.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/honcho_integration/session.py b/honcho_integration/session.py index 3d06d2f76..23b96d1cb 100644 --- a/honcho_integration/session.py +++ b/honcho_integration/session.py @@ -927,6 +927,11 @@ class HonchoSessionManager: return False assistant_peer = self._get_or_create_peer(session.assistant_peer_id) + honcho_session = self._sessions_cache.get(session.honcho_session_id) + if not honcho_session: + logger.warning("No Honcho session cached for '%s', skipping AI seed", session_key) + return False + try: wrapped = ( f"\n" @@ -935,7 +940,7 @@ class HonchoSessionManager: f"{content.strip()}\n" f"" ) - assistant_peer.add_message("assistant", wrapped) + honcho_session.add_messages([assistant_peer.message(wrapped)]) logger.info("Seeded AI identity from '%s' into %s", source, session_key) return True except Exception as e: