AI Circuit Breaker – Reverse proxy to stop agent infinite loops
Catches runaway agent retry loops and caps API spend before they drain your budget.
A drop-in reverse proxy for OpenAI-compatible calls: swap the base URL, keep your SDK. It fingerprints requests in volatile RAM, blocks a repeated tool call once it crosses a three-attempt threshold, and enforces hourly ($2) and daily ($10) spend caps before anything reaches the upstream provider. No prompt or payload is ever written to disk. The author built it after one of his own agents got stuck in a retry loop and burned hundreds of dollars overnight.
What holds up
- +Sub-35ms proxy overhead — fast enough to sit in front of every live request without lag.
- +Zero payload retention — prompts and tool calls are never written to disk.
- +Hourly ($2) and daily ($10) spend caps block requests before they reach the API, not after.
- +Drop-in setup — change the base URL and your existing OpenAI SDK code keeps working.
Mind the limits
- −All benchmarks are self-labeled 'engineering targets' — no independent latency numbers exist.
- −The $680 saved-cost example is explicitly illustrative, not measured customer spend.
- −Routes every API call through this proxy — an outage there means an outage for your agent too.
Picked here? Add the badge
Put it on your site. It links back to this page. Free for every listed product.
<a href="https://stillworks.dev/products/p/ai-circuit-breaker-reverse-proxy-to-stop-agent-infinite-loop/"><img src="https://stillworks.dev/badge/ai-circuit-breaker-reverse-proxy-to-stop-agent-infinite-loop.svg" alt="Picked by StillWorks" width="230" height="54"></a>