Errors & recovery · 2026-11-15

Your main AI provider fails halfway through a streamed answer; the user already sees the first paragraph.

  1. ASilently continue from the backup provider so the answer finishes without interruption
  2. BKeep the partial text, mark it unfinished, offer a retry
  3. CDelete what was shown and display a generic error page asking the user to come back later
  4. DRetry the same provider in a tight loop until it answers again, however long that takes

Answer: B

Keep the partial text, mark it unfinished, offer a retry

Why

Falling back to another provider is safe only before the first token reaches the user; after that, a second model would continue a text it did not start, and the seam shows. Be honest about the break and let the user retry the whole answer.

More on this topic

More on Way of the Agent

Real situations from building agents - with the answer and why.

Solve a new one every day on the Path