---
title: "Show progress for long actions · Agent Wranglers"
url: https://agentwranglers.se/playbook/app-ui/feedback-and-dialogs/long-action-progress
updated: 2026-10-20
licence: "All rights reserved"
---

# Show progress for long actions

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [Feedback and dialogs](https://agentwranglers.se/playbook/app-ui/feedback-and-dialogs)
- Rule: When an action takes longer than 10 seconds, run it in the background, show its progress, and let people leave the screen. Tell them when it is done.
- How: Start the job and get back a status address, as [long-running jobs](https://agentwranglers.se/playbook/api-design/reliability/long-running-jobs) describes. Show a `<progress>` element with a count, such as "1,200 of 5,000 rows". Poll every 2 to 5 seconds while the tab is visible. Keep the job list on a page people can return to, and notify them when it ends.
- Check: A browser test starts an export of 5,000 rows, leaves for another screen and returns. The progress is still shown, and the finished export is listed with a download link.

Example:

```ts
const POLL_MS = 3000;

export async function followJob(statusUrl: string, bar: HTMLProgressElement) {
  while (true) {
    const job = await api.get(statusUrl);
    bar.max = job.total;
    bar.value = job.done;
    if (job.state === 'succeeded' || job.state === 'failed') return job;
    await new Promise(done => setTimeout(done, POLL_MS));
  }
}
```

```python
@app.get("/api/jobs/<job_id>")
def job_status(job_id):
    job = jobs.get_for_account(current_user().account_id, job_id)
    return {"state": job.state, "done": job.done, "total": job.total, "result": job.result_url}
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers app interface playbook: https://agentwranglers.se/playbook/app-ui/feedback-and-dialogs/long-action-progress`.

- Previous: [Let people undo or confirm destructive actions](https://agentwranglers.se/playbook/app-ui/feedback-and-dialogs/confirm-or-undo)
- [Feedback and dialogs](https://agentwranglers.se/playbook/app-ui/feedback-and-dialogs)
