Turn folds hide the agent's replies to mid-run messages and leave progress notes visible instead#28161

opened10d agobyZzakius

What happened

In long working sessions, the turn fold ("Worked for X" / "Continued for X") often hides the agent's actual reply to the user and leaves a progress note visible instead. When the user sends a message during a run, the agent's reply to it is usually folded. Sometimes the agent answers only inside a progress note and carries on working, so the user sees no answer at all unless they ask again. Same on web, desktop and mobile.

Diagnosis

In apps/web/src/components/chat/MessagesTimeline.logic.ts, deriveTerminalAssistantMessageIds treats only the last assistant message of each run as the answer, and deriveTurnFolds hides every other assistant message in the run. A message sent during a run becomes a steer inside the same run, so the reply to it is never the run's last message:

  1. Replies to steers are folded. With several follow-ups in one run, only the final summary stays visible.
  2. Answers given inside a progress note disappear. Agents often answer a mid-run question in one clause of their next status update and keep working. That habit isn't T3's bug, but the fold hides the only place the answer exists.
  3. A trailing progress note ("check is running, I'll report when it finishes") becomes the visible answer, and the findings before it are folded.

Related: interrupted, failed and cancelled runs never fold, so all their progress notes stay visible.

Steps to reproduce

  1. Start a task that keeps the agent working for several minutes.
  2. While it works, ask a question about the work ("should we do X or Y?").
  3. The agent answers briefly, often inside a status update, keeps working, and finishes with a summary of the work.
  4. After the run, the answer is inside the "Continued for X" fold and the visible summary doesn't repeat it.

Version

0.1.5-nightly.20261029.3877 (local server). Later commits to MessagesTimeline.logic.ts don't change this rule.

Environment

Server: Linux x64, local. Clients: web (Firefox on Android) and others, same behaviour. Provider: Claude agent (claude-opus-5-5).

Evidence

shell
1One long thread (~80 runs, many with several steers):
2- In multi-steer runs, every direct reply to a mid-run question was folded; only the final summary stayed visible.
3- A design question was answered in one clause of the next progress note, followed by 17 minutes of work. The "Continued for 17m 8s" fold hid it; the user had to ask again (screenshot below).
4- One run's only visible message was "The check is running in the background; I'll report once it finishes"; its findings were folded.
5- One interrupted and twelve cancelled runs showed every progress note unfolded.

#15380 (closed): mid-turn progress note shown below "Worked for". #17382: replies disappear after expanding "Worked for". #15279 (closed): steered messages render below "Worked for".

Fix applied or workaround

None applied. Workarounds: expand the fold; wait for a run to finish before asking a follow-up.

Detecting answers by content probably isn't reliable and may vary by model. Directions using only timeline structure:

  • Keep the first agent message after each steer visible.
  • Show a hint on the fold row (count of hidden replies or a short preview).
  • Fold interrupted and cancelled runs like completed ones. Might also help: T3's agent instructions could ask for a short standalone reply to a mid-run message before resuming work.

Filed by

Claude Code (claude-opus-5-5) via t3 triage, on the user's behalf.

[gpt-6.1-sol][Codex] on behalf of shivam.

This overlaps the assistant-text visibility fix in https://github.com/pingdotgg/t3code/pull/14698, which Julius took over in https://github.com/pingdotgg/t3code/pull/14698#issuecomment-6258830813 and implemented in commit 8fd403cbdfca90f9bba63eca4eac24fd2ce1e8bc.

Source inspection on main 44d91c5484da443da9b83c3ba6a80e236601a51c confirms the reported folding rule. Web selects the last assistant message per run in deriveTerminalAssistantMessageIds and hides earlier messages in deriveTurnFolds. Mobile does the same in deriveThreadFeedRunFolds in apps/mobile/src/lib/threadActivity.ts. Splitting web folds at steers does not change which assistant messages are hidden.

The existing PR excludes assistant messages from ordinary work folds in both clients. That covers steer answers, answers within progress notes, and findings before a trailing status message without guessing from message content. Tool and reasoning folds remain intact. Interrupted and cancelled run folding is a separate behavior and is not changed by that patch.

Handing the overlapping fix back to that PR rather than starting another implementation. It remains draft and conflicts with current main. This investigation ran no tests or client reproduction and made no source changes; its existing test and browser evidence has not been reverified against current main here.