← Pattern Library
Pattern 04 / 10Trust & Visibility

Progress for Non-Deterministic Tasks

What do you show when there’s no progress bar?

The quick read · Pattern 04

The 60-second version

For work with an uncertain duration, show the current phase and evidence of activity. People need to know whether useful work is happening, what is already available and how to intervene.

  1. Use meaningful phases instead of an invented percentage.
  2. Surface recent actions and intermediate results as they arrive.
  3. Keep pause, cancel and a recovery route within reach.

Watch for: Elapsed time is not progress. When updates stop, state what is known and when it was last observed; do not promise the agent is still working.

Animated walkthrough · 0:33

Show progress without a percentage

Synthetic walkthrough. The interface describes the current work, moves between phases, shows a heartbeat, tells the user when activity stalls, and changes its wording as the task nears completion.

Read the walkthrough
  1. Describe what the agent is doing in plain language.
  2. Show the current phase without claiming a percentage complete.
  3. Show fresh activity and elapsed time so the user can tell the task is still running.
  4. When activity stalls, explain the delay and offer ways to wait or exit.
  5. Update the status language as the work moves from searching to compiling and finalising.

The Problem

Traditional progress bars exist because deterministic systems have knowable endpoints — 47 of 200 files copied, 3 of 5 steps complete. Agent tasks violate every assumption progress bars rely on: you don't know total steps, you don't know how long each step takes, and the agent may abandon its current strategy and start over mid-task. A user who delegates "research competitor pricing strategies" to an agent has no idea if that's a 30-second web search or a 4-minute multi-source analysis. The absence of meaningful progress feedback creates a visceral anxiety that undermines the entire delegation contract. If I can't tell whether the agent is working, stuck, or about to deliver, I'll stop delegating.

The Anti-Pattern

The fake progress bar. A busy indicator can show that work started without saying what changed or whether the work is still active.

The worst version of this is what I call false precision: products that show a percentage or progress bar for a process that is fundamentally unpredictable. Some CI/CD pipelines do this — the bar crawls to 90% in the first minute, then sits there for four more minutes. Users learn the number is meaningless, and now they distrust all progress indicators in the product. You've poisoned the well.

The second anti-pattern is silence. Many agent systems show nothing between request and response. You type a prompt, the cursor blinks, and you wait. No indication of what's happening, whether the agent is reading files, searching the web, or has crashed. This is the modal equivalent of a phone call where the other person goes quiet — after about 8 seconds, you start wondering if they hung up.

The third anti-pattern is log dumping — showing the user a raw stream of every internal operation. Early LangChain demos were notorious for this: walls of [chain/start] and [tool/end] text that technically showed progress but communicated nothing to someone who isn't debugging the system. Transparency isn't the same as legibility.

The Pattern

Design progress for non-deterministic tasks as a layered system with three concurrent channels: activity narration (what's happening now), phase indication (which stage of work we're in), and liveness signaling (proof the agent hasn't stalled).

Layer 1: Activity Narration — Show the Work, Not the Plumbing

Instead of percentages, narrate what the agent is doing in human terms. Not "Calling search API" but "Searching for competitor pricing pages." Not "Processing response tokens" but "Reading through the results." This is the equivalent of watching someone work — you can see they're busy, you can roughly gauge what part of the task they're on, and you don't need to know what percentage they've completed.

The key design decision: narration should be scannable, not readable. The user glances at it to confirm the agent is active and roughly on-task. They don't read every line. Design accordingly — short phrases, consistent format, newest activity visible without scrolling.

A compact expandable activity log can show actions in plain language, such as reading a source or checking a result. Surface changes that help the user understand the task, with detail available on request.

Layer 2: Phase Indication — Stages, Not Steps

When you can't show precise progress, show phases. Most agent tasks follow a recognizable macro-structure even when the micro-steps are unpredictable:

Synthetic wireframe · illustrative controlsPhases instead of a percentageThe order conveys the work plan; phase widths do not represent time estimates.
  1. Researching

    Current phase

  2. Analysing

    Next

  3. Drafting

    Queued

  4. Reviewing

    Queued

The specific number of web searches within "Researching" is unpredictable, but the user can see they're still in the research phase and that drafting hasn't started yet. This is qualitative progress — not how far but where in the process.

Implementation: Define 3-5 phases per task type. Show them as a horizontal pipeline or vertical step list. Highlight the current phase. Don't show time estimates for individual phases — that reintroduces false precision. The phases themselves are the progress indicator.

A generation pipeline can report phases such as researching, drafting and checking. Keep phase labels tied to real changes in work and allow phases to repeat when necessary.

Layer 3: The Heartbeat — Proof of Life

The most critical signal isn't "how far along" — it's "still alive." A heartbeat is any periodic signal that confirms the agent is actively working. This solves the worst user experience in agent interaction: the dead silence that could mean "working hard" or "crashed."

Heartbeat patterns:

  • Elapsed time counter: "Working... 0:42" — simple, honest, no false promises
  • Activity pulse: A subtle animation that changes rhythm when the agent is actively processing vs. waiting for an API response
  • Periodic status updates: "Still researching... found 3 sources so far" — intermittent concrete signals even when the overall task isn't phase-transitioning
  • Token/character counter: For generative tasks, showing the output growing in real-time (Midjourney's progressive image rendering is the visual equivalent — the image emerges from blur to clarity, so you see continuous evidence of work)

A coordinating agent can listen for periodic activity events from specialists. Set the interval to fit the task, and distinguish fresh evidence of work from a clock that runs independently.

Layer 4: Stall Detection and Timeout Communication

If the agent is stuck, the user needs to know. Design explicit stall detection:

  • Expected duration ranges: Not "this will take 2 minutes" but "tasks like this usually take 1-3 minutes." Set user expectations with ranges, not points.
  • Stall threshold: If no new activity for N seconds (calibrated per task type), surface a message: "This is taking longer than usual. The agent is still working — you can wait or cancel."
  • Escalation options: After a longer threshold, offer: "Something might be wrong. [Wait longer] [Retry] [Cancel]"
  • Timeout with dignity: When a task definitively times out, don't just show an error. Show what was accomplished: "Research completed, but drafting timed out. Here's what was found so far." Partial results are almost always better than no results.

Layer 5: The Language Ramp

The words you use to describe progress should shift as the task progresses. This is a subtle but powerful pattern:

Phase Language Example
Start Active, specific "Searching for pricing data across 5 competitor sites"
Middle Confirmatory, concrete "Found 12 relevant pages. Extracting pricing information..."
Late Anticipatory, converging "Compiling findings into a summary..."
Near-end Definitive, wrapping "Finalising your report..."
Complete Delivered, actionable "Done. Here's what I found — 3 competitors have changed pricing this quarter."

This language ramp gives the user an emotional sense of progress even when you can't give them a numerical one. "Searching" feels early. "Compiling" feels late. "Finalising" feels almost done. You're using word choice to communicate position in a process that has no precise coordinates.

Annotated Wireframe Description

Synthetic wireframe · illustrative controlsProgress with something to inspectRecent actions and intermediate findings are more useful than a fabricated completion estimate.
  1. Researching · elapsed 1:23

    Searching sources and extracting competitor pricing. Next: analysing, drafting, reviewing.

    Available now
    Four competitors identified — inspect intermediate findings
    Latest activity
    Pricing source opened and a tier comparison extracted
    • Pause
    • Cancel
  2. If activity stops

    No fresh activity received. Show the last update time and check the task state before claiming work continues.

    • Check status
    • Retry safely
    • Cancel

Key design decisions in this wireframe:

  1. Phase pipeline is always visible at top — anchors the user's sense of position even during fast activity scrolling.
  2. Elapsed timer, not estimated time remaining — honest about what we know (how long it's been) vs. what we don't (how long it will take).
  3. Activity feed is capped at ~6 visible lines — prevents log-dump syndrome. Older items collapse. The feed is glanceable, not readable.
  4. Interim signal is separate from activity feed — the feed shows what the agent is doing; the interim signal summarises what it has found. Different information, different cadence.
  5. Cancel and Pause are always available — the user must never feel trapped waiting.

Design in practice

The synthetic walkthrough above follows a competitor pricing report. Each signal answers a different question: what the agent is doing, which phase it is in, whether it is still active, and what the user can do when activity stops.

Implementation Notes

Determine your heartbeat interval empirically. Run 50-100 representative tasks and measure the longest gap between visible user-facing outputs. Your heartbeat interval should be shorter than the 90th percentile of those gaps. For most agent systems, 15-30 seconds is the right range for heartbeat messages; anything under 10 seconds becomes noise.

Phase detection requires task classification. You need to know what kind of task the agent is doing to display appropriate phases. Options:

  • Predefined task types: "Research" tasks get Research → Analyse → Draft phases. "Code" tasks get Plan → Implement → Test phases. Map task types to phase templates.
  • Tool-based inference: If the agent is calling search tools, it's in a "Researching" phase. If it's calling write tools, it's in a "Drafting" phase. Infer phases from the tools being invoked.
  • LLM self-reporting: Have the agent emit phase markers in its output stream. Add a system instruction: "At the start of each major phase of work, emit a [PHASE: name] marker." Parse these from the output stream.

Stall detection heuristics:

  • No new tokens emitted for 15+ seconds → show "Still working..." reassurance
  • No new tokens for 45+ seconds → show stall warning with options
  • No new tokens for 2+ minutes → show timeout warning with partial results option
  • Calibrate these thresholds per task type; code generation stalls differently than research tasks

Stream architecture matters. To show real-time activity, you need Server-Sent Events (SSE) or WebSocket connections, not polling. Vercel's v0 SDK demonstrates the pattern well: their sendStream method yields ordered parts (text, thinking, file edits, tool calls) that the client renders incrementally. Each update is a full snapshot of accumulated parts, making reconnection after a dropped connection straightforward.

Partial results are a product decision. When a task times out or is cancelled, you need to decide: show what was accomplished so far, or show nothing? Almost always show partial results. This requires your agent architecture to produce intermediate artifacts (not just a final output), which in turn means designing your agent's workflow to save state after each phase. If the agent researched 4 competitors before stalling on the 5th, that research has value.

Don't animate the phase pipeline. The transition between phases should be a discrete state change (dot fills in, label bolds), not a smooth animation. Smooth animations on a phase indicator imply continuous progress within the phase, which reintroduces the false-precision problem. Discrete jumps say "we moved to the next phase" without promising anything about velocity.

When to Use / When NOT to Use

Use This Pattern When:

  • Task duration is unpredictable — any task where you honestly can't predict whether it'll take 10 seconds or 5 minutes
  • The agent is doing multi-step work — research, analysis, code generation, data processing where there are recognisable phases
  • User trust is critical — early product adoption, enterprise deployment, any context where users are still learning to trust the agent
  • Tasks run in the background — when the user might context-switch and come back, progress indicators help them quickly assess state on return
  • Delegation depth > 1 — when your agent delegates to sub-agents, each layer of delegation multiplies uncertainty; progress signals become more important, not less

Do NOT Use This Pattern When:

  • Tasks complete in under 3 seconds — a brief loading state (skeleton, shimmer) is sufficient. Progress infrastructure for a 2-second task is over-engineering that adds visual noise.
  • The output streams directly — if the user sees the response being typed out token-by-token (like a standard chat response), the streaming text is the progress indicator. Adding a separate progress layer is redundant.
  • You have deterministic progress — if you genuinely know it's step 3 of 7, use a real progress bar. This pattern exists specifically because you don't know that.
  • Background batch processing — for tasks the user won't watch (overnight data processing, scheduled reports), a completion notification is better than real-time progress. Save the progress UI for tasks the user is actively waiting on.

The fundamental insight: progress communication for agent tasks isn't about answering "how much is done?" — it's about answering three simpler questions: "Is it working?" (heartbeat), "What's it doing?" (activity narration), and "Are we close?" (phase indication). Get those three right and users will wait patiently for surprisingly long tasks. Get them wrong and users will rage-quit after 15 seconds.