A multipart guide. Production agent runs fail in many more ways than the four buckets the frameworks themselves design around. This index orients you across five chapters that, between them, cover what actually breaks in production — and what each framework does (or doesn't do) about it.
Pick a chapter by where the failure originates. Frameworks have native machinery for some; others are mostly an operational concern.
The four failure modes the frameworks themselves are built around — what happens during a single agent run.
Failures upstream of your code — the LLM API rate-limits, refuses, disconnects, or expires your auth.
Cycles, deadlocks, and state inconsistency that only show up when agents call agents.
Failures in the boring layer beneath the agent — budgets, infra, and cancellation.
Bad inputs from upstream and outputs that violate policy. Mostly an ingress / egress concern.
Every chapter dives deeper, but here's the shorthand. ● = native machinery, ◐ = partial / opt-in, ○ = defer to your operational tooling.
| Failure | LangChain | LangGraph | CrewAI | Google ADK | Semantic Kernel | Best handled at |
|---|---|---|---|---|---|---|
| Tool call fails | ● handle_tool_error · v1 ToolRetryMiddleware | ● ToolNode.handle_tool_errors | ● max_retry_limit | ● on_tool_error_callback | ◐ filter try/except | Framework |
| LLM bad output | ● OutputFixingParser / RetryOutputParser | ● ValidationNode | ● parse() + corrective re-prompt | ● on_model_error_callback | ◐ auto-function-invocation filter | Framework |
| Hallucination | ○ | ○ | ◐ Task.guardrail(s) | ○ | ○ | Your validators / RAG |
| Context overflow | ● trim_messages · SummarizationMiddleware | ◐ pre_model_hook + trim_messages | ● respect_context_window auto-summarize | ● CompactionRequestProcessor | ● ChatHistoryReducer | Framework |
| Provider 429 / outage | ◐ v1 ModelRetryMiddleware / Fallback | ◐ RetryPolicy on agent node | ◐ RPMController only | ◐ on_model_error_callback | ○ default no retry | Gateway / LLM router |
| Auth expiration | ○ | ○ | ○ | ○ | ○ | Secret manager |
| Streaming disconnect | ○ | ○ | ○ | ● live-API session resumption | ○ | Framework / gateway |
| Cyclic handoffs | ◐ max_iterations=15 | ● recursion_limit | ● max_iter=25 | ◐ per-agent iteration caps | ● TerminationStrategy.maximum_iterations | Framework |
| Cost / token budget | ● v1 ModelCallLimitMiddleware | ○ | ◐ max_iter as a proxy | ○ | ○ | Cost gateway / budget guard |
| Infra failures | ○ | ○ | ○ | ○ | ○ | Platform / k8s |
| User cancellation | ◐ async cancellation | ◐ task cancel via Pregel | ○ | ◐ CancellationToken-style | ● CancellationToken | Framework |
| PII / compliance | ● v1 PIIMiddleware | ○ | ○ | ○ | ○ | Pre-processor / Presidio |