How to Debug AI Agent Loops with Temporal Event History