Showing Agent Progress
In this article
- Build a progress screen for an agent run from its events: the state, the latest completed action, and what the run waits on and since when.
- Explain why a guessed percent bar or a spinner hides an approval wait, and say when a fraction is honest.
- Keep the model's reasoning text off the progress screen and show actions and results in its place.
- Tell a run that finished partly from one still on its way to done, and from one a user cancelled.
- Terms defined here: progress state.
Overview
A support agent is handling a refund. On your screen, a progress bar has said 60 percent for twelve minutes, and under it scrolls a stream of the model's thoughts: "the customer seems upset, I should probably refund in full". Is it stuck? Is it waiting for you? Nobody can tell from that screen.
The agent frameworks named below already report what a run does, one event at a time [1,3], and a useful progress screen is built from those events alone. Afterwards you can design that screen for a run that waits, retries and ends with only part of its work done, say when a percent is honest, and trace every label back to something that happened.
The run and its events
Take a made-up online shop. Its support agent has three tools: get_order reads an order, create_refund pays money back behind an approval gate (a manager must approve it first), and send_reply emails the customer. A customer asks for 250.00 EUR back on order O-2042. The agent looks up the order, waits for a manager to approve the refund, issues it, and then emails the customer.
While it works, the run emits events: small records that say "this tool was called", "this tool returned", "approval was requested". Real frameworks work this way. The OpenAI Agents SDK streams higher-level events that fire once an item is fully generated, so an app can show progress at the level of "a tool ran" instead of each word the model writes [1]. Anthropic's Managed Agents send back session, span and agent events, which together tell you where the session stands and how far the agent has got [3]. [1,3]
Here is this run's trace, its events in order, as the made-up runtime records it. Read it before you look at any screen:
| # | time | event | detail |
|---|---|---|---|
| 1 | 10:01 | tool_done | get_order: O-2042 found, paid 250.00 EUR |
| 2 | 10:01 | reasoning | "customer seems upset, I should probably refund in full" |
| 3 | 10:02 | approval_requested | create_refund 250.00 EUR, needs a manager |
| 4 | 10:14 | approval_granted | manager approved |
| 5 | 10:14 | tool_done | create_refund: 250.00 EUR refunded |
| 6 | 10:15 | tool_timeout | send_reply, attempt 1 of 3 |
| 7 | 10:15 | retry_scheduled | send_reply, attempt 2 of 3 |
| 8 | 10:16 | tool_timeout | send_reply, attempt 2 of 3 |
| 9 | 10:16 | retry_scheduled | send_reply, attempt 3 of 3 |
| 10 | 10:17 | tool_timeout | send_reply, attempt 3 of 3, retries used up |
| 11 | 10:17 | run_ended | finished partly |
A timeout does not tell you whether the email went out, which leaves an uncertain outcome. So before each retry this runtime checks the mail system and finds no sent reply: an email sent twice cannot be taken back. Between 10:02 and 10:14 nothing happens: the run is waiting for a person.
Why the bar lies
No event in the list says 60. The front end made the number up, say from a timer that creeps forward and stalls short of the end. From 10:02 to 10:14 no event arrives to move it, and the one fact that matters, "a manager has to approve this", is nowhere on the screen. A spinner fails the same way: it says "busy" while the run is blocked on a person who may not know they are needed.
Counting steps, one of three done, is no better. This agent picks its next step as it goes, so the runtime has no total in advance; you know there are three only because the example says so.
A fraction is honest only where the protocol supplies a total. MCP, the Model Context Protocol, has an optional way to track progress on long-running work [2]. A client that wants updates puts a progressToken, a unique label it picks, in the request; the server may then send notifications/progress messages that carry that token, a progress value that only goes up, an optional total and an optional message [2]. The server may leave out total when it does not know it, or send no notifications at all [2]. And this progress belongs to one request, such as one long tool call, never to the whole run. So when a total arrives, show the fraction on that action's row; when it does not, show no percent anywhere. [2]
Reasoning is not progress
The second defect on the bad screen is row 2, shown as live text. That sentence is the model's narrative about what it might do: no tool ran, nothing changed, and nothing checks that the words match what happens next. It talks about a full refund before anyone has approved one, and a reader takes it as a promise.
Vendors keep this text apart. With display: "summarized", Anthropic's streaming API sends a condensed summary of Claude's reasoning in place of the full chain of thought, and with "omitted" it sends no reasoning text at all [4]. The OpenAI Agents SDK reports a reasoning item as its own event, reasoning_item_created, separate from tool_called and tool_output [1]. That separation is what you need: your screen listens to the tool and approval events and drops the reasoning ones. [1,4]
The rule: show what can be observed from outside the model, meaning states, actions taken and their results. Leave out reasoning tokens and any story the model tells about itself.
From events to a screen
A good progress screen holds three things, each read from an event: the state of the run, the latest completed action, and the pending reason, meaning what the run waits on and since when. Together they make the run's progress state.
The state label is never the front end's own idea. It is the run status the runtime reports (its own summary of where the whole run stands, such as running or ended), or a direct reading of one event: approval_requested means waiting for approval, retry_scheduled means retrying. Here is the mapping as pseudo-code (illustration only, not a real API):
# pseudo-code: fold run events into the progress screen
def progress(events):
s = {"state": "running", "last_done": None, "pending": None}
for e in events:
if e.type == "tool_done":
s["last_done"], s["state"], s["pending"] = (e.detail, e.time), "running", None
elif e.type == "approval_requested":
s["state"], s["pending"] = "waiting for approval", (e.detail, e.time)
elif e.type == "approval_granted":
s["state"], s["pending"] = "running", None
elif e.type == "retry_scheduled":
s["state"], s["pending"] = "retrying", (e.detail, e.time)
elif e.type == "run_ended":
s["state"], s["pending"] = e.detail, None
return sNotice what has no branch: reasoning and any event type the screen does not know. They change nothing.
Predict the screen at 10:10, before reading on. The last event so far is row 3.
| field | shown at 10:10 | from event |
|---|---|---|
| state | Waiting for approval | 3 |
| latest completed | Order O-2042 looked up (10:01) | 1 |
| waiting on | Manager approval of refund 250.00 EUR, since 10:02 | 3 |
That screen answers what the bar could not: the run is blocked on a manager, and has been for eight minutes. At 10:15, after row 7, the state reads "Retrying", the latest completed action is still the refund (10:14), because a timeout is not a tool_done, and the run waits on send_reply attempt 2 of 3, scheduled at 10:15.
How the run ends
At 10:17 the third attempt fails and the runtime reports the run as finished partly. The final screen reads: "Finished partly. Done: order looked up, refund of 250.00 EUR issued (10:14). Not done: reply to the customer, send_reply timed out on all 3 attempts (last 10:17)." Every phrase points at a row: 1, 5, 10 and 11.
Finished partly is a final state: the run stopped before its goal with some steps done, and it will not continue by itself. A bar at 90 percent tells the user to wait for something that will never come; a plain "failed" hides that money already went out. The user gets a partial result with both halves named.
One ending is different. If the user had pressed Cancel, the run would end as cancelled: the cause is the user's choice, the screen says so, and it is a separate status from finished partly. Cancel is a separate status with its own rules, and it never reads as finished partly.
Common mistakes
- A timer-driven bar. Symptom: users report runs "stuck at 60 percent" that are waiting for approval. Fix: remove the percent and show the pending reason with its start time.
- Streaming reasoning as a status line. Symptom: users act on what the model said it might do. Fix: render only tool, approval and run-end events.
- Inventing friendly states. Symptom: "almost done" or "finalising" shows for a run that is retrying or has ended. Fix: every label comes from a run status or one event type; unknown events change nothing.
- Treating a stream that went quiet as done. In the OpenAI Agents SDK a streamed run is not complete until its event iterator ends, and bookkeeping such as approval state can finish after the last visible text [1]. Fix: show the end state only on the run's own end event. [1]
In production
Screens reload and connections drop. Anthropic's Managed Agents describe how to reconnect without missing events: open a new stream, list the event history to collect the ids already seen, then tail the live stream and skip those ids [3]. Skip the history and a missed approval request leaves the screen in the wrong state. Rebuild the screen from that full list with the same mapping. [3]
Pick the level of event that matches the screen. LangChain offers a stream mode, updates, that emits an event after every agent step, alongside a token stream and a custom mode for signals you write yourself, such as "Fetched 10/100 records" [5]. A progress screen wants step-level events. A custom count like that one is honest only when your code knows the 100. [5]
Sources
- Streaming (OpenAI Agents SDK docs). OpenAI. Checked 25 Oct 2026.
- Progress (MCP specification 2026-07-28). Model Context Protocol project. Checked 25 Oct 2026.
- Session event stream. Anthropic. Checked 24 Oct 2026.
- Streaming Messages. Anthropic. Checked 24 Oct 2026.
- Streaming (LangChain docs). LangChain. Checked 25 Oct 2026.
Check yourself
Check yourself
Question 1 of 13
Your screen must show an agent's progress. Which events does it listen to?
Your first check counts towards your result.