Agent Architecture and Orchestration

Agent Architecture and Orchestration

Loop Detection — References

Loop detection › References

56 of 77 in this book · 1 min read

Cycle detection as an algorithmic problem, and the evidence about why agents fail to self-correct out of one.

Detecting a cycle

  • Floyd's cycle-finding algorithm and Brent's algorithm — constant-space detection of cycles in a sequence of states, including recovery of the cycle length, which is what distinguishes alternation from a wandering return. Cited by name.

Why self-correction does not break the cycle

  • Self-Refine: Iterative Refinement with Self-Feedback (Madaan et al., 2023), arXiv:2303.17651 — iterative self-critique and revision, including where the gains plateau as rounds accumulate.
  • Large Language Models Cannot Self-Correct Reasoning Yet (Huang et al.) — evidence that unaided self-correction frequently fails to improve and can degrade a correct answer, which is the mechanism behind apologise-and-repeat cycles. Cited by name.

Degenerate repetition in generation

  • The Curious Case of Neural Text Degeneration (Holtzman et al., 2019), arXiv:1904.09751 — repetition as a property of likelihood-maximising decoding rather than a bug in a particular model, and the origin of the repetition heuristics still used on output text.

No verified reference is recorded for progress metrics in agent runs, or for threshold calibration in production loop detection. Both are currently empirical, workload-specific, and undocumented outside individual engineering teams.