feat(soul): escalate repeated-tool-call reminders and force-stop on dead-end streak#2466
Merged
sailist merged 1 commit intoJun 22, 2026
Conversation
…ead-end streak
- Inject a reminder on every consecutive repeat from streak 3 (was sparse at exactly 3/5/8)
- Add the r3 dead-end reminder (streak 8+) and force-stop the turn at streak 12
- Align repeat telemetry to kimi-code: tool_call_repeat{tool_name, repeat_count, action}; drop same-step dedup telemetry
This was referenced Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
N/A
Description
Port kimi-code's repeated-tool-call handling into kimi-cli. Once a call is
repeated 3+ times consecutively, a reminder is now injected on every repeat
with escalating tiers (r1/r2/r3), and the turn is force-stopped when the
streak hits 12 so the loop cannot spin on the same call indefinitely. Repeat
telemetry is aligned with kimi-code.
1. Escalating repeat reminders
Problem: The previous dedup only injected a reminder at exactly streak
3/5/8, leaving streaks 4/6/7/9/10/11 with no guidance to the model.
What was done:
2. Force-stop on dead-end streak
Problem: A stuck model could loop on the same tool call until
max_steps_per_turnwas hit.What was done:
KimiToolsetexposesforce_stop_turn, set when the streak reaches 12._stepstops the turn withstop_reason="tool_call_repeat"after thedead-end reminder is grown into context.
3. Telemetry alignment with kimi-code
Problem: Repeat telemetry diverged from kimi-code.
What was done:
tool_call_repeat{tool_name, repeat_count, action}for everyconsecutive repeat (streak >= 2), with
actioninnone/r1/r2/r3/stop.the now-dead
step_no/turn_idstate from the dedup path.Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.