Retries multiply across layers
Detect: Downstream attempts greatly exceed original request volume.
Recover: Assign one retry owner and enforce a request-wide budget.
Contain overload and dependency failures so one slow tool or model does not consume the capacity of an entire agent platform.
Cascade prevention limits the propagation of failure across queues, retries, threads, connection pools, and downstream services. Agent workflows amplify this risk through fan-out: one user request may create several model calls and many tool operations. When a dependency slows, in-flight work grows; retries then add load precisely when less capacity is available.
The control system needs several cooperating boundaries. Deadlines cap waiting, bulkheads isolate capacity, circuit breakers stop repeated calls to failing dependencies, admission control bounds demand, and graceful degradation reduces optional work. Each boundary must preserve enough information to distinguish rejected work from work whose external outcome is uncertain.
A prototype should count downstream calls per task and deliberately slow a tool to reveal unbounded fan-out.
Production introduces end-to-end deadlines, retry budgets, concurrency isolation, and overload responses before queues saturate.
At scale, model regional failures, synchronize neither retries nor recovery probes, and reserve capacity for critical tenants and administrative recovery paths.
Rejects or defers work before local resources are exhausted.
Separate concurrency budgets by dependency or workload priority.
Uses recent outcomes to stop calls and permit limited recovery probes.
Carries remaining time through nested operations and cancels expired work.
Caps additional attempts across the entire logical request.
flowchart LR
U["Incoming agent tasks"] --> A["Admission limit"]
A --> C["Critical task pool"]
A --> O["Optional enrichment pool"]
C --> B["Billing breaker"]
B --> T["Slow billing API"]
B --> D["Defer billing task"]
O --> S["Search service"]
T --> H["Bounded recovery probes"]
H --> BstateDiagram-v2
[*] --> Closed
Closed --> Open: Failure threshold reached
Open --> HalfOpen: Probe delay elapsed
HalfOpen --> Open: Probe fails
HalfOpen --> Recovering: Probe succeeds
Recovering --> Closed: Gradual traffic ramp is healthy
Recovering --> Open: Failures returnCalculate whether the requested plan fits remaining time and downstream capacity.
Reserve a slot in the relevant dependency pool rather than a shared unlimited executor.
Fail fast or choose an approved fallback when a dependency is known to be unhealthy.
Propagate cancellation and avoid starting work that cannot finish within the request budget.
Apply bounded backoff with jitter only for eligible failures and known-safe effects.
Allow limited probes and ramp traffic after sustained evidence of recovery.
Energy · Illustrative enterprise scenario, not a reported customer outcome.
A utility assistant handles outage reports, account inquiries, and restoration explanations during severe weather.
A slow account API causes retries and consumes worker slots needed for outage reporting.
Keep critical outage intake available while nonessential enrichment degrades.
Separate pools protect outage intake, and the account adapter uses a breaker with a shared retry budget.
If the breaker closes too aggressively, fresh failures reopen it and the recovery ramp pauses.
Track rejected optional work, protected-task latency, concurrency saturation, and retry amplification; a healthy platform may intentionally serve fewer noncritical features.
| Decision | Benefit | Cost |
|---|---|---|
| Early load shedding | Preserves useful capacity during overload. | Some requests are rejected despite a running process. |
| Dependency bulkheads | Limit failure propagation. | Require capacity allocation and can reduce sharing efficiency. |
| Circuit breakers | Reduce pressure on failing services. | Bad thresholds can delay recovery or oscillate. |
Detect: Downstream attempts greatly exceed original request volume.
Recover: Assign one retry owner and enforce a request-wide budget.
Detect: Many replicas probe or reconnect simultaneously.
Recover: Add jitter, cap probe concurrency, and ramp accepted traffic.
Stop expired downstream work where supported.
Separate critical and optional dependency capacity.
Classify errors and reconcile ambiguous effects before replay.