fix(gateway): write update notification to session transcript (#27846)#27899
fix(gateway): write update notification to session transcript (#27846)#27899zccyman 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.
|
Board James triage pass: |
|
Thanks @alt-glitch for confirming this is the cleaner split. #27884 has been closed. This PR targets only @BoardJames-Bot — noted the |
Summary
When the gateway restarts after
hermes update,_send_update_notificationsends a standaloneadapter.send()that lands outside the conversation history. The agent cannot see that an update already occurred, causing it to repeat upgrade prompts and lose context of the update outcome.Fix
Writes the notification as a system message into the session transcript before sending via
adapter.send(), so the agent retains full context of the update outcome across restarts.Changes
_send_update_notification(), beforeawait adapter.send(), look up thesession_keyfrom the pending marker, find thesession_idviasession_store._entries, and callsession_store.append_to_transcript(entry.session_id, {"role": "system", "content": msg})test_writes_notification_to_session_transcriptregression testVerification
pytest tests/gateway/test_update_command.py -v # 29 passed (including new regression test)Closes #27846