SIGN IN SIGN UP

fix(agent-core): count validation-rejected tool calls toward the repeat breaker (#2313)

* fix(agent-core): count validation-rejected tool calls toward the repeat breaker

Args-rejected calls returned before prepareToolExecution, so the breaker
never counted them and the model could re-issue the same invalid call
until maxSteps. Register them in finalizeToolResult so reminders fire at
3/5/8 and the turn force-stops at 12.

* fix(agent-core): key parse-failed repeats on raw argument text

Malformed JSON arguments normalize to {} on parse failure, which keyed
every malformed-but-different attempt identically and could force-stop a
turn whose calls were evolving rather than identical. Register skipped
calls on the raw arguments text when parsing failed.

---------

Co-authored-by: fengchenchen <fengchenchen@moonshot.ai>
S
STAR-QUAKE committed
de0ba9d0654273ff6b028a7a561983ebee4e723e
Parent: d03a488
Committed by GitHub <noreply@github.com> on 7/28/2026, 10:39:26 AM