Agents and AutomationLesson 34 of 72

Module 4 · Surviving real data

Retries, timeouts and doing it twice

In this lesson

  • 8 min read
  • 5 reading sections
  • Knowledge check
  • Lesson 6 of 9 in this chapter

This chapter’s goalDiagnose a failing agent run from its trace and apply the specific fix it needs: a retry policy, a validator, a shorter chain, or no loop at all.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 6Free · no account needed
Lesson steps

Two kinds of failure, two policies

Sort every failure into transient or deterministic, because they need opposite treatment.

Transient: the same request would probably succeed in three seconds. Timeouts, connection resets, HTTP 429, 500, 502, 503, 504. The harness retries these itself. The model never needs to know.

Deterministic: the same request will fail identically forever. HTTP 400, 401, 403, 404, 422, validation errors, “no such order”. Retrying is pure waste. These go back to the model as an informative observation, because that is the retry: a different request, chosen by something that can reason about why.

Getting this backwards produces the two classic bugs. Retrying deterministic failures gives you the retry loop from the failure catalogue. Not retrying transient ones gives you an agent that gives up whenever a network hiccups.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Context Engineering exam.

Stuck on something?Ask Mai, your AI tutor

How to cite: Addaly (2026) ‘Retries, timeouts and doing it twice’, in Agents and Automation. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/agents-and-automation/retries-and-idempotency (Accessed: 29 November 2026).