Pattern 10 · Control

Stop & regenerate

When the answer goes the wrong way, users are stuck watching it finish — and a retry throws the old one away.

By Aleksey StepikinUpdated October 20263 min readLive demo
Live demo · try it

An interactive mock built in plain HTML, CSS and JavaScript. Data is fictional; no model is called.

FitWhen to use it — and when not

Use it when

  • Every streaming response
  • Creative and drafting tasks where a second take is normal
  • Costly generations where stopping early saves money

Skip it when

  • Deterministic answers (calculations, lookups) — offer "re-run with changes" instead

AnatomyThe parts of the pattern

  1. StopVisible during streaming, keyboard reachable (Esc).
  2. Stopped statePartial text kept and labelled as stopped.
  3. ContinueResume from where it stopped.
  4. RegenerateNew attempt, old one kept.
  5. Version pager‹ 2 / 2 › to compare attempts.

GuidelinesDo & don’t

Do

  • Keep partial output when stopped — it is often 80% of what they needed.
  • Keep previous versions one click away.
  • Map Esc to stop.

Don’t

  • Discard the old answer on regenerate.
  • Bill or count quota for tokens after the user pressed stop.
  • Move the Stop button between streaming and idle states.

In the wildReal-world examples

ChatGPTClaudeGemini

Products named for reference only — no affiliation, and the demo above is an original illustration, not a copy of their UI.

For engineersImplementation notes

  • Use an AbortController on the client and cancel the upstream request on the server, so you stop paying for tokens.
  • Store each attempt as a sibling message with a parent id — the same model powers branching.
  • "Continue" = resend with the partial answer as a prefilled assistant turn.

ControlRelated patterns

All 26 LLM UX patterns

Building an AI product?

I design and ship AI products end to end — LLM interfaces, agents, RAG, billing — from concept to a live product in weeks, not quarters. Tell me what you are building and get a fixed estimate.

Get an estimateBook a call

Create bold.
Deliver better.

See our workGet in touch