---
date: 2026-06-09
pr: 1447
feature: Agent Bridge assistant tail persistence
impact: Agent Bridge runs now persist assistant/tool messages already generated by Hermes before a late `run_conversation()` failure, without duplicating messages already flushed to `state.db`.
---

`hermes_bridge.py` now attempts a final generated-message tail sync on the exception path before marking the run failed. The sync compares the Web UI session DB count after prepersist with the current Hermes `state.db` count, appends only the missing generated suffix, and falls back to the live agent message history when the normal run result is unavailable.
