Keeping users oriented during long-running agent tasks
A task that runs for minutes needs more than a spinner: live progress, visible steps, and an escape hatch. Here is how the products that ship long-running agents keep users oriented — and in control.
An independent guide, grounded in official documentation from OpenAI, Anthropic and the Vercel AI SDK. Quotes are verbatim from the linked official pages and verified against them.
Stream the work, don’t announce it
- Live progress beats a working state: the end-user should see progress updates and partial responses as the task runs, not one big reveal at the end.
- Streaming is not just for chat — any long agent run can push what it has so far instead of hiding it until completion.
- Partial output is honest progress; a spinner is a promise.
“Streaming lets you subscribe to updates of the agent run as it proceeds. This can be useful for showing the end-user progress updates and partial responses.”
Source: OpenAI — Agents SDK: Streaming ↗
The UI updates itself as results arrive
- The interface should update automatically as new messages and results arrive — the user never refreshes, never polls, never asks.
- Arrival-driven updates are the difference between an agent that feels alive and one that feels stuck.
- Because updates are incremental, the last change is always visible proof the task is moving.
“It enables the streaming of chat messages from your AI provider, manages the chat state, and updates the UI automatically as new messages are received.”
Source: Vercel AI SDK — useChat reference ↗
Mark the step boundaries
- Long tasks decompose into steps; surface them as discrete, numbered units that complete one by one rather than one amorphous wait.
- A step indicator that ticks — “Step 3 of 7”, each finished step checked — reads as progress the way a spinner cannot.
- Only render the steps you know about: when the protocol says a step completed, mark it, and don’t fake progress you don’t have.
“A part indicating that a step (i.e., one LLM API call in the backend) has been completed.”
Source: Vercel AI SDK — Stream Protocols ↗
- Parsing your question
- Planning the search
- Querying three sources
- Extracting citations
- Writing the answer
Never make the user wait for the turn to finish
- A long-running agent must be interruptible mid-turn — the user can redirect without waiting for completion or starting over.
- Esc stops the running work and returns control; the interface waits for the next instruction instead of continuing on its own.
- Interrupting is steering, not abandoning — the context survives the interruption.
“You can redirect Claude at any point without waiting for the turn to finish or starting over: Press Esc to stop Claude immediately. The running tool call is canceled and Claude waits for your next instruction.”
Source: Claude Code docs — How Claude Code works ↗
Searching 12 sources for recent AI model releases…
Autonomy with an open door
- Even when the agent works through a multi-step loop autonomously, the human stays part of the loop and can interrupt at any point to steer.
- Present the task as guided by the user, not running away from them — control never leaves the human’s hands.
- Status UI should read as “working, but ready to be steered”, not “busy, wait”.
“You’re part of this loop too. You can interrupt at any point to steer Claude in a different direction, provide additional context, or ask it to try a different approach. Claude works autonomously but stays responsive to your input.”
Source: Claude Code docs — How Claude Code works ↗
Searching 12 sources for recent AI model releases…
Preserve progress, never force a restart
- Restarting long work from scratch is expensive and frustrating — design so partial progress survives errors and interruptions.
- Keep what the agent produced and the state it needs; give users a resume path instead of a redo.
- When a step fails, show what completed, what failed and what will be retried — never a blank slate.
“When errors occur, we can't just restart from the beginning: restarts are expensive and frustrating for users.”
Source: Anthropic Engineering — How we built our multi-agent research system ↗
import json, urllib.request
with urllib.request.urlopen("https://api.example.com/sources") as r:
data = json.load(r)
print(f"collected {len(data["items"])} sources")
print(sorted(s["domain"] for s in data["items"]))collected 7 sources
A decision rule
- If a task runs longer than a couple of seconds, stream real progress: what it is doing, what step it is on, what it has produced so far.
- Keep users in control at every moment — interruptible, steerable, resumable — and never force a full restart.
- Progress you can see builds trust; a spinner you can’t tell apart from a hang builds anxiety.
Design takeaways
- Stream real progress — partial output, step boundaries, arrival-driven updates — instead of a static working state.
- Break long tasks into visible, completable steps and mark each one done.
- Keep users in control: interruptible mid-turn, steerable, and never forced to restart from scratch.
- When a step fails, show what completed and what will be retried.
Sources
Build it with our components
Assistant message that renders token-by-token with a cursor and stop control.
Reasoning StepsCollapsible multi-step reasoning trace with per-step status and an elapsed timer.
Agent StatusStatus UI for autonomous AI agents — running, waiting, completed and failed.
Code ExecutionCode execution tool call — the snippet, run state, stdout and error output.