Your question is Control Agent Planning Loops. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
You're building a language model agent that plans across multiple steps, calls tools, and updates its own state as it works. In practice, these systems can get stuck repeating actions, revisiting the same plan, or compounding bad assumptions when an early step is wrong.
What strategies would you use to prevent an LLM agent from falling into infinite loops or hallucination cycles during multi-step planning?