179 questions
No questions match those filters.
What specific mechanisms prevent an AI agent from getti...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansA hard step cap and a wall-clock timeout are the baseline — non- negotiable, but they only convert an infinite loop into a bounded failure with no useful output, which is progress but not a fix.
What actually catches most real loops before the cap is hit:
- Action deduplication — track the (tool, arguments) pair of each step. If the agent issues the same call it already tried, that’s a loop signature; break out and force a different approach rather than letting it retry the identical action a dozen more times.
- Progress detection — if several consecutive steps produce no new information relative to what the agent already knew, that’s a stuck state even without an exact repeat. This is the case that a naive cap-only design misses entirely, since each individual step can look superficially different while making zero actual progress.
- Visited-state tracking — for anything shaped like graph traversal (multi-hop retrieval, navigating a site), maintain a set of states already visited so the agent can’t cycle back into one.
When any of these trips, the response shouldn’t be to just let the step counter keep ticking down — it should reset the attempted-action history and try a genuinely different next step, or escalate to a human, since continuing to count toward the same cap with the same stuck behavior wastes the rest of the budget for nothing.