Files
zCode-CLI-X/test-comprehensive-stuck-detection.mjs
Kilo cdf76e84a9 fix: improve stuck detection to track failed tool calls
- 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: 16/16 tests passing (100% success rate)
-  Reposted question detection (3/3)
-  Stuck detection with failed tool calls
-  Mixed successful and failed calls
-  Insufficient calls detection
-  Greeting detection (4/4)
-  Status detection (2/2)
-  Normal message detection (3/3)
2026-05-07 10:23:32 +00:00

6.1 KiB