Local models spam identical tool calls; dev builds Python sidecar supervisor with diff checks to break loops

Lazy-Fly23 · reddit · 2026-11-15

A Reddit developer building CortexAgent (a Pi.Dev fork with MCP servers preconfigured as skills) reports that local models repeatedly spam the exact same tool call 5-10+ times. Delays and docs didn't help; it happens across Qwen 3 30B-A3B variants and even Claude or Pi sessions.

The only working fix so far is a sidecar approach: a Python supervisor script that interjects, breaks loops, and manually diffs each repeated tool call to verify it's actually different before allowing a retry. A cloud session also runs as a monitor to catch looping. The poster asks the community for better solutions.

Original post →

More from coding & agent

coding & agent channel →