Summary
The chat history endpoints use last_agent_response_at as a proxy for whether a Hermes session exists. That timestamp is only recorded for successful agent runs.
If the first turn is stopped or errors after Hermes has started/persisted the turn, last_agent_response_at stays null. Once the in-memory live run expires or the server restarts, GET /api/tasks/:id/messages returns an empty list before asking Hermes for persisted history.
Impact
Repro:
- Create a new task.
- Send the first chat message.
- Stop the run, or hit a provider error after the turn begins.
- Wait for the live snapshot to expire, or restart the server.
- Reload the task detail page.
Expected: persisted Hermes history is shown.
Actual: the chat appears empty.
Suggested fix
Track whether Minions has started a Hermes session separately from last_agent_response_at, so stopped or errored first turns can still load Hermes history without changing unread/review semantics.
Summary
The chat history endpoints use
last_agent_response_atas a proxy for whether a Hermes session exists. That timestamp is only recorded for successful agent runs.If the first turn is stopped or errors after Hermes has started/persisted the turn,
last_agent_response_atstays null. Once the in-memory live run expires or the server restarts,GET /api/tasks/:id/messagesreturns an empty list before asking Hermes for persisted history.Impact
Repro:
Expected: persisted Hermes history is shown.
Actual: the chat appears empty.
Suggested fix
Track whether Minions has started a Hermes session separately from
last_agent_response_at, so stopped or errored first turns can still load Hermes history without changing unread/review semantics.