app-server: add last_assistant_message to Thread in thread/list response

Resolved 💬 1 comment Opened Mar 20, 2026 by researchoor Closed May 2, 2026

Summary

The thread/list response returns a Thread struct with preview (the first user message) but no way to see the last assistant message without opening the thread. For mobile clients like Litter, this means the session list can only show the opening prompt — users have to tap into each session to see what happened.

Current behavior

Thread returned by thread/list:

pub struct Thread {
    pub id: String,
    pub preview: String,      // first user message
    pub updated_at: i64,
    pub turns: Vec<Turn>,     // not populated in list response
    // ...
}

The session list on a mobile client can only display the opening message. There's no signal for what the agent last said or whether the turn ended with a result or an error.

Requested change

Add an optional last_assistant_message: Option<String> field to Thread:

pub struct Thread {
    pub id: String,
    pub preview: String,
    pub last_assistant_message: Option<String>,  // NEW: last AgentMessage text, truncated
    pub updated_at: i64,
    // ...
}

Server-side population would be: walk turns in reverse, find the last AgentMessage, return its text (truncated to ~200 chars). Returns None if no assistant message exists yet.

Why this matters

  • Mobile UX: Litter users can't tell what a session produced without tapping in. With this field, the session list becomes a status board — you can see "The DRDEA manuscript is updated, deployed, and pushed." directly in the list.
  • Minimal overhead: A single truncated string per thread. No change to the full turn/item hydration flow.
  • No breaking change: Optional field, existing clients ignore it.

Client-side (Litter)

On the Litter iOS side, ThreadSummary would add:

let lastAssistantMessage: String?

And the session row would display it as a subtitle below the session title when present.

Related

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗