Feature request: show what the agent is doing now (phase and running work), not just a one-line hint
Problem
I searched the issue list for this before writing, with prompt suggestion, 候选输入建议, suggestion, 预测 采纳, 阶段, 进度 状态指示, ghost text autocomplete inline and phase indicator progress. Nothing matched. The closest threads are #3829 and #3724, and neither covers it.
The composer has a predictor for what you might type next: after a turn finishes, one sentence appears in the empty composer and Tab or the right arrow accepts it. PromptSuggestion is a single string, { suggestion: string }, shown only for an empty idle composer that can still submit (flow_chat/store/promptSuggestionStore.ts:4-7,74-95).
What is missing is the opposite direction, a statement of what is happening now and which phase the work is in. During a long turn the question is not what to type next, it is whether the agent is stuck and what it is working on.
The data for a better display already exists and is deliberately unused. The state machine has a main state and a sub-phase:
// flow_chat/state-machine/types.ts:23-40
export enum SessionExecutionState { IDLE, PROCESSING, FINISHING, ERROR }
/**
* Processing phase (only valid in PROCESSING state)
* Used for UI detailed display, does not affect main state logic
*/
export enum ProcessingPhase {
STARTING, COMPACTING, THINKING, STREAMING, FINALIZING, TOOL_CALLING, ...
}
The comment is the point: the enum was built for detailed display and excluded from state logic so that it can be shown freely.
What renders instead is a spinner plus one line (modern/RuntimeStatusSlot.tsx:68-73). If the runtime supplies a label you get that string, and one string is the ceiling. If it does not, the line comes from processing-hints.json, which holds phrases like 给神经网络倒咖啡, picked by a hash of turn and round so the joke is stable per turn.
Thinking, calling a tool, waiting for permission and compacting context therefore all look the same: a spinner and a sentence. They have very different expected durations and very different reasons for a user to intervene.
There is also no task-level view. The state machine holds planner: { todos: TodoItem[]; isActive: boolean } (state-machine/types.ts:85-88) and the transcript has tool cards after the fact, but nothing ties them into which plan step is running, which tools are in flight, what is queued and how far along the turn is.
What I want
Three levels, smallest first, in this order.
- Show the real phase. Render
ProcessingPhaseexplicitly instead of collapsing it to one string, at minimum thinking, streaming, tool calling, compacting and waiting for approval, each with an expected-duration hint where it is known. Display only, no new backend facts. - Show the running work next to the phase: the tool in flight with its target, being a file, command or URL, the current plan step, and the count of queued messages. This is what removes the "is it stuck" feeling.
- A task view: a subscribable view of the turn with phase, plan steps and their status, in-flight tools with streamed output, queued messages and usage so far. Collapsible, placed inline above the composer rather than as another side panel.
Levels 1 and 2 are display work. Level 3 needs a small view model. The pieces exist and nothing composes them. Pi Durable is the useful reference for the model, since every model request, tool call and compaction is a task with phases, a checkpoint and a terminal status, and a client receives a current view then only changes. For accuracy, Pi Durable ships no window; it exposes a subscribable view model. The viewState and subscribe pair is the part worth borrowing, and the visual design is ours to invent.
One decision worth leaving to maintainers: whether the decorative processing-hints should stay. They are charming, but they occupy the slot where a real status belongs, and the fallback logic fills the honest case with a joke. My preference is real phase first, and if the runtime has nothing to say, say nothing rather than something false.
Acceptance
- A running turn displays the actual
ProcessingPhase, and switching between thinking, tool calling, compacting and waiting for approval is visible without reading the transcript. - The phase display names the tool in flight and its target, and the current plan step when a plan exists.
- The phase display lasts the whole turn and does not block the transcript.
Sources
promptSuggestionStore.ts:4-7,74-95, state-machine/types.ts:23-40,85-88, RuntimeStatusSlot.tsx:55-84, design-system/packages/ui/src/flow-chat/conversation/FlowChatRuntimeStatus.tsx:14-49, locales/zh-CN/flow-chat/processing-hints.json, plus the Pi Durable write-up at earendil.com/posts/pi-durable/.
A reference for the hardest part of Level 1: pushing live phase state without flooding the client.
eta (0xfe-project/eta) has this worked out, and none of it relies on throttling.
Revision is a content hash. Every target carries state per section, and a section's revision is a hash of its content. The writer only says "this target changed"; the wire computes what actually changed and sends only the changed sections. There is no version counter to maintain, which also means state cannot drift out of sync with the data — the revision is the data.
A push is a mark, not a frame. There is an explicit frame-rate budget: a push only records that something changed, and what gets sent is whatever the latest state is at the moment of sending. Large frames buy a longer quiet period. So streaming output cannot flood a tab, and the final state is always delivered. That last property is what makes it safe — a coalescing strategy that can drop the final frame would be worse than no coalescing.
Each target has an event replay ring (512 entries) so a late subscriber catches up on recent events after taking the snapshot.
For this issue specifically, that combination answers "how do you show a phase that changes several times a second":
- the phase is a section, so a change is just a new hash
- rapid transitions collapse into the latest one
- a client that subscribes mid-turn gets the snapshot plus recent events rather than a blank state
The current RuntimeStatusSlot avoids the problem entirely by displaying one string that is replaced in place. If phases become a real enumeration with transitions, the coalescing question arrives immediately, and this is a shape that already works.
Source: docs/architecture/wire-protocol.md, "Frames" and the rules below it.