How do you detect a looping agent in production?

Watch for the shape a stuck loop always leaves in a trace: the same tool call or model call repeating with near-identical arguments while turn count, duration, or cost keeps climbing well past what that call site normally takes. A looping agent doesn’t throw an error or hang in any way monitoring would flag on its own, since the model keeps generating fluent, plausible steps the whole time; the giveaway is the pattern across the session, not any single step in it.

Static analysis, scanning an agent’s own code for a cycle with no real limit on it, catches this before a change ships, but it’s a one-time check on code you have, not something watching live traffic after the fact. Production detection is the layer that catches what a code review can’t: an agent that loops because of a runtime condition the code review never exercised. Tessary’s duration_drift and cost_drift classifiers watch exactly that per call site, comparing each session’s cost and duration against its own history rather than a fixed threshold, since what’s slow or expensive for one agent is routine for another.

sources

keep reading

More on this.

Try Tessary on Cloud.

free · 10,000 traces a month · 1 GB · 30-day retention · $10 one-time credit for triage and RCA · no credit card