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?