I’ve been looking at multi-agent failure states, and it seems like everyone is relying on basic Python step_counters or LLM prompt-engineering (“do not repeat yourself”) to prevent agents from falling into infinite tool-calling loops or stampeding APIs.
Coming from a low-level systems/C++ background, handling loop-prevention at the application layer feels insane. It adds latency, and when a timeout triggers, it just leaves the state half-executed.
Has anyone tried intercepting tool calls deterministically via a dedicated proxy or trajectory ledger? E.g., a lightweight interceptor that hard-kills the process the exact microsecond an identical state or argument repeats?
Curious what the actual production solution is, or if everyone is just accepting the latency and hoping the prompt holds?