Replanning Strategies
Master adaptive replanning strategies to build robust agents that recover gracefully from failures
Your Progress
0 / 5 completedWhen to Pull the Trigger
Knowing when to replan is just as important as knowing how to replan. Trigger too early and you waste time replanning unnecessarily. Trigger too late and you waste resources on a plan that's already dead. Good agents detect failure patterns and trigger replanning at the optimal moment.
Interactive: Retry → Replan Simulator
Watch how agents exhaust retries before triggering replanning
Attempting action...
Common Trigger Conditions
📊 Threshold
Typically 3-5 retries with exponential backoff
💡 Example
API returns 500 error after 3 retries (1s, 2s, 4s delays)
💻 Detection Logic
if (retryCount >= MAX_RETRIES) {
triggerReplanning()
}Decision Framework
✅ Continue with Current Plan
- • Transient error with high recovery chance (>70%)
- • Haven't exhausted reasonable retry attempts (<3 tries)
- • No alternative plan is significantly better
- • Time/cost of replanning exceeds retry cost
🔄 Trigger Replanning
- • Persistent failure (3+ retries exhausted)
- • Core assumption violated (plan fundamentally broken)
- • Better alternative exists (cheaper/faster route available)
- • Resource permanently unavailable (service down indefinitely)
🚫 Abort Completely
- • No viable alternative plan exists
- • Time/budget completely exhausted
- • Safety/security constraints violated
- • User explicitly cancelled the task