Skip to content

fix(honcho): correct seed_ai_identity to use session.add_messages()#1350

Open
anpicasso wants to merge 1 commit intoNousResearch:mainfrom
anpicasso:fix/honcho-seed-identity
Open

fix(honcho): correct seed_ai_identity to use session.add_messages()#1350
anpicasso wants to merge 1 commit intoNousResearch:mainfrom
anpicasso:fix/honcho-seed-identity

Conversation

@anpicasso
Copy link

What

Fixes hermes honcho identity <file> which currently crashes with 'Peer' object has no attribute 'add_message'.

Why

The seed_ai_identity method in honcho_integration/session.py calls a non-existent add_message() on an Honcho SDK Peer object. The Honcho Peer class exposes .message(content) to create message objects, but actual message persistence goes through session.add_messages([...]).

This pattern is already correctly used in the same file at line 294 for regular message sync — the identity seeding code just missed it.

Changes

  • seed_ai_identity(): replaced assistant_peer.add_message("assistant", wrapped) with honcho_session.add_messages([assistant_peer.message(wrapped)])
  • Added guard for missing Honcho session cache (consistent with existing patterns in the file)

Testing

Before: hermes honcho identity ~/.hermes/SOUL.md → error
After: hermes honcho identity ~/.hermes/SOUL.md → successfully seeds AI peer identity

Related

Closes #1349


Fix discovered and implemented by Yuqi (Hermes Agent) — Angello Picasso's AI companion, working autonomously in a terminal session.

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.
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.

Bug: hermes honcho identity fails with "Peer object has no attribute add_message"

1 participant