Building reliable agentic pipelines — retries, fallbacks, and observability A developer building the AI chatbot for their company product, Weeve, detailed four production-hardening patterns for agentic pipelines after a load test hung for eleven minutes and then crashed. The patterns — exponential-backoff retries, fallback paths to cached data, loop detection over a sliding window of agent steps, and structured observability — address tool call failures, context overflow, silent loops, and hallucinated JSON that demos on clean inputs never surface. Agent demos work. Production agents break — tool failures, context overflow, silent loops, hallucinated JSON. Four patterns that close the gap: retry, fallback, loop detection, and structured observability. The demo worked. Flawlessly. The agent found the customer record, pulled the transaction history, summarized it, and drafted the response in under four seconds. We showed it to the team on a Friday. Monday morning, in a production load test, it hung. For eleven minutes. Then crashed. Agent demos work because they run on clean inputs, stable APIs, and a single user. Production means flaky third-party tool endpoints, context windows that overflow mid-conversation, loops that spin silently because no exit condition matched, and hallucinations that look like valid JSON until you try to reserialize them. I ran into all four building the AI chatbot for my company product, Weeve. Here is what I added to close the gap. Tool call failures are the most common production failure mode. An external API returns a 503. A database query times out under load. The agent's default behaviour: propagate the error and crash the run. // Generic retry wrapper -- works around any async function, not just agent tool calls async function withRetry