Agents' 'retries' often hide identical tool calls — detect them structurally, not by reasoning text

ClickOk5811 · reddit · 2026-09-25

A developer observed a research agent retry a failed tool call (permission error) three times: each retry came with different reasoning narration, but the actual tool calls were nearly identical — same tool, almost same arguments, same failure.

The key insight: the narration was changing while the behavior wasn't. Reading only the reasoning trace makes it look like the agent is exploring different approaches when it's spinning in place.

His fix: a simple check that compares recent tool calls structurally instead of parsing reasoning — if the agent keeps making near-identical calls after the same failure, force it to either try a genuinely different tool/approach or stop. In theory the model should recognize this itself, but in practice you can't rely on that.

Original post →

More from coding & agent

coding & agent channel →