An agent loop is just a for loop. The hard part is the invariants inside it — and the deterministic guardrails that catch every predictable failure mode.
How I Stopped an LLM From Skipping the Investigation, Looping Forever, and Inventing Pods — Without LangChain