fix: count validation-rejected tool calls toward repeat breaker (v1+v2) - #9
Conversation
…at breaker (MoonshotAI#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>
…epeat breaker (MoonshotAI#2317) * fix(agent-core-v2): count validation-rejected tool calls toward the repeat breaker * style(agent-core-v2): remove inline implementation comments
|
Warning Review limit reached
Next review available in: 56 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Related Issue
Upstream port batch 2 of 6. Ports the validation-rejected-tool-call repeat-breaker fix to both engines.
What changed
Without this fix, when the model issues a tool call whose arguments fail validation, the rejected call was never registered with the repeat breaker. The model could then re-issue the same malformed call indefinitely until maxSteps, looping forever.
de0ba9d06, fix(agent-core): count validation-rejected tool calls toward the repeat breaker MoonshotAI/kimi-code#2313): registers rejected/skipped calls infinalizeToolResultso the repeat-breaker reminders fire at 3/5/8 and force-stop at 12; keys parse-failed repeats on raw argument text.d88b3775c, fix(agent-core-v2): count validation-rejected tool calls toward the repeat breaker MoonshotAI/kimi-code#2317): same fix for the v2 engine, plus a new sharedtool-args-parse.ts(parseToolCallArgumentswithparseFailedflag).Verification
state-manifest.d.ts(the only conflict — a generated brand counter) viagen:state-manifest.Checklist