fix(gateway): write update notification to session transcript (#27846)#27906
fix(gateway): write update notification to session transcript (#27846)#27906zccyman wants to merge 1 commit into
Conversation
When the gateway restarts after 'hermes update', _send_update_notification sends a standalone adapter.send() that lands outside the conversation history. The agent then cannot see that an update already occurred, causing it to repeat upgrade prompts and lose context of the update outcome. The fix writes the notification as a system message into the session transcript before sending, so the agent retains full context of the update outcome. Fixes NousResearch#27846.
|
Note for reviewers: BoardJames-Bot previously identified a Windows encoding issue ( |
|
Board James triage pass: |
|
Closing in favor of #27899 as alt-glitch noted it's the cleaner split. Thanks for the triage! |
Description
When the gateway restarts after
hermes update,_send_update_notificationsends a standaloneadapter.send()that lands outside the conversation history. The agent then cannot see that an update already occurred, causing it to repeat upgrade prompts and lose context of the update outcome.The fix writes the notification as a system message into the session transcript before sending, so the agent retains full context of the update result.
Testing
test_writes_notification_to_transcript— verifies the transcript is written with correct session IDtest_transcript_write_skipped_when_no_session— verifies graceful handling when no session store existstests/gateway/test_update_command.pypassFixes #27846