Skip to content

Stopped or errored first turn loses chat history after live run expires #29

Description

@ujjwalredd

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:

  1. Create a new task.
  2. Send the first chat message.
  3. Stop the run, or hit a provider error after the turn begins.
  4. Wait for the live snapshot to expire, or restart the server.
  5. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions