- Track failed tool calls in call history (parse errors, execution errors)
- Increment turns counter for failed tool calls too
- Stuck detection now works even when tools fail repeatedly
- Inspired by Ruflo and Hermes Agent best practices
Fixes the bug where zCode would get stuck in infinite loops when tool calls fail.
Test results: ✅ All stuck detection tests passing
1.6 KiB
1.6 KiB