promptdojo_

What an agent leaves behind — step 6 of 9

The toy is_looping function should flag a session as looping when the same tool is called with the same arguments three turns in a row. The current implementation only checks the tool name, so it misses the fact that the third call has different arguments. Fix the check on line 5 so the function returns False for this trace.

Expected output:

False
The break is on line 5 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.