NoProgress condition fires when the model produces N consecutive turns with no tool calls and very short output. It is watching the output side. tool-loop-guard watches the input side, the calls you are about to make. A model stuck in a search loop will keep making tool calls, so NoProgress will not catch it. tool-loop-guard will.
What Is Next
A few things that would improve this library:
Configurable match functions. Right now the match is always on canonical args hash. A hook that lets you supply a custom similarity function would let you opt in to fuzzy matching for specific tools where you know what "same" means.
Async support. The current API is synchronous. An async-safe version with proper locking would fit naturally into asyncio agent loops.
Per-tool thresholds. Right now one threshold applies to all tools. Being able to say "allow up to 5 repeated calls on read_file but only 2 on write_file" would give you finer control without raising the global threshold.
Window inspection. An API to query the current window state without recording a new call would help if you want to log what the guard is tracking between iterations.
The research agent that burned 8ドル is not an exotic edge case. Any agent that depends on external information will sometimes get into a state where the model believes the right answer is to look again. Without a guard, that state runs until something external stops it. The guard makes the loop self-terminating instead.
Part of the @mukundakatta agent tooling stack, built for the Hermes Agent Challenge.