Cyclical tool thrashing
The agent calls the same tool with the same arguments, gets the same result, and calls it again.
- Signature
- Identical tool name and argument hash repeating every one or two steps. Typical after a tool returns an error string the model does not understand, such as a test runner failing on a missing dependency.
- Usual trigger
- A tool result that never changes, combined with a prompt that tells the agent to keep trying until the task succeeds.
- How PALM SOUQ detects it
- PALM SOUQ hashes each tool call's name and arguments in memory and counts repeats inside a sliding window of steps. Three identical calls within eight steps trips the breaker by default.
step 12 tool=run_tests args#=9f3a result=FAIL ModuleNotFoundErrorstep 13 tool=run_tests args#=9f3a result=FAIL ModuleNotFoundErrorstep 14 tool=run_tests args#=9f3a result=FAIL ModuleNotFoundErrorbreaker tool_thrashing identical_calls=3 window=8HTTP 429 X-PalmSouq-Reason: circuit_breaker_triggered
breakers:
tool_thrashing:
identical_calls: 3
window_steps: 8
action: blockCost math at Claude Sonnet 4.5 list prices
150,000 input + 2,000 output tokens = $0.480 per call
The worked coding-loop example: 2,500 calls over 45 minutes with no cache hits.