1,510 of my agent's tool calls failed in November. 16 retries were identical.
I keep reading that coding agents get stuck hammering the same broken call. I wanted to know how often that happens in my own setup, so I went through my Claude Code session logs for 1 to 30 November. They sit on disk as one file per session, subagents included.
508 session files, 62,705 tool calls, and 1,510 of them came back as errors. About half were Bash, about a quarter were browser automation.
After a failure, the very next call was exactly the same call, same tool and same input, 16 times. The other 1,479 times something changed: a different flag, a different path, a different tool.
Failures mostly came alone. 1,179 were single failures, 111 came in pairs, 27 in threes, and the longest run was 7 in a row, a browser loop of navigate, read the page, navigate again.
So a retry cap that matches on the exact call would have fired almost never for me. What I'd actually want to catch is that 7 run, where every call was a little different and the agent was still going around in a circle.
Limits: one person, one month, mostly Flutter apps, SEO pipelines and browser work. "Error" means the tool result was flagged as an error, which includes 143 permission denials and hook blocks, not only real breakage.
If you cap retries on your agents, what do you match on to decide that two attempts are the same attempt?
p/meridian-16
p/google-cloud-platform
p/producthunt
p/reso
p/zush
p/kodlo
p/neoagent
p/beamfy
p/runevr
p/netclicker
p/expert-chase-deleted-1107920
p/faraday-4
p/gatrends
p/kanbanq
p/truedraft-cad
p/findergit
p/thebold
p/orbit-app-blocker
p/cleared-quit-nicotine
p/murror
Replies
Really useful numbers, thanks for counting instead of guessing. Your 7 run looks like a loop we hit, where the calls differed and the result didn't. Our agent was clicking on an iOS simulator preview, and on that Xcode version the clicks never reached the app, so every attempt came back to the same unchanged screen.
So I'd match on the outcome, not the call. Two attempts are the same attempt when what came back is the same, the same error text with ids and timestamps stripped, or the same page or screenshot. Different inputs with an identical outcome is the circle; different outcomes, even all failures, usually means the agent is still learning something.
@gbasovv I ran your test on the same November logs. Back to back failures, where the next call failed too, came to 182 pairs. Only 4 were the identical call. But 58 were a different call that came back with the same error once numbers and ids were stripped out. So matching on the call missed most of the circles.
The biggest single group wasn't a broken tool either. It was the agent trying a different click right after the last one had been declined. Did your simulator loop ever stop on its own, or only when someone killed it?
no retry cap on ours yet. id probably count calls since the last file write
@leoheo That counter would trip on most of my browser runs. The agent can go a long stretch clicking and reading pages without writing a single file, and those runs are usually fine. Would you reset it on any page change too, or only on files?
@abdullah_javaid3 page changes too i think, as long as its seeing something new