Unsupervised Cycle Detection in Agentic Applications