Computer ScienceFeatured paper
Telling "Stuck" from "Long": Cheap Online Detection and Bounding of Non-Terminating Agentic Loops
Abstract
LLM agents operating in tool-use loops can repeat actions, oscillate among states, or continue issuing superficially different calls without meaningful progress. This paper introduces LoopGuard, a model-agnostic online detector that combines action-signature periodicity, state recurrence, novelty collapse, and a CUSUM sequential-change rule. Across a multi-seed benchmark spanning three looping pathologies and healthy debugging plateaus, the detector distinguishes genuinely stuck runs from long but productive trajectories while adding negligible per-step overhead.
Publication Metadata
Keywords
LLM agentstool usenon-terminationloop detectionCUSUMagent reliability
Citation
Christian Hansen (2026). Telling "Stuck" from "Long": Cheap Online Detection and Bounding of Non-Terminating Agentic Loops. Manuscript. LoopGuard manuscript, August 2026