Loop detect x402 REST usage
Detect loops in an agent run: identical repeated tool calls, A-B-A-B cycles and stretches without new results. Hashes every tool call (tool name plus canonical arguments) and optional result, then reports exact repeats,...