fix(loop-detection): escalate generic_repeat to critical at criticalThreshold#60248
fix(loop-detection): escalate generic_repeat to critical at criticalThreshold#60248jwchmodx wants to merge 2 commits into
Conversation
Greptile SummaryThis PR correctly fixes the Confidence Score: 5/5Safe to merge — logic is correct, all call sites are updated, and only P2 suggestions remain. No P0 or P1 issues found. The critical-threshold check for generic_repeat is correctly ordered before the warning check, matching the established pattern. The mattermost DM threading guard is complete and tested. Remaining comments are style suggestions only. No files require special attention.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e02478669a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a02183ce7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…hreshold The generic_repeat detector only checked warningThreshold and always returned level "warning", making criticalThreshold effectively a no-op for the most common runaway loop pattern (same tool + same args). Add a critical-threshold check before the warning check, consistent with how known_poll_no_progress and ping_pong already behave. Fixes openclaw#60111 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
9a02183 to
9fd4b85
Compare
|
ProjectClownfish pushed a narrow repair to this branch so the original contributor path can stay canonical. Source PR: #60248 |
|
Thanks for the context here. I did a careful shell check against current Current main already contains the complete no-progress-gated So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the merged current-main implementation from #80668 and close this superseded contributor branch instead of merging a narrower stale diff. Do we have a high-confidence way to reproduce the issue? Yes for the original bug: the detector/test path around repeated same-tool calls showed the warning-only gap before the fix. On current main, that failure no longer reproduces because the source and e2e tests now cover Is this the best way to solve the issue? Yes. The current-main implementation is the narrow maintainable solution because it blocks only repeated no-progress outcomes and includes the before-tool-call e2e/diagnostic coverage this PR was missing. Security review: Security review cleared: The reviewed PR and merged replacement only affect loop-detection behavior, tests, docs, and changelog, with no dependency, CI, secret, install, or package execution changes. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3e425dde0d62; fix evidence: release v2026.5.12-beta.1, commit 678b2510b22c. |
Summary
Fixes #60111.
The
generic_repeatdetector only checkedwarningThresholdand always returnedlevel: "warning", makingcriticalThresholda no-op for the most common runaway loop pattern (same tool, same arguments, repeated calls).criticalThresholdcheck in thegeneric_repeatcode path, before the existingwarningThresholdcheckThis makes
generic_repeatconsistent withknown_poll_no_progressandping_pong, which both escalate to"critical"atcriticalThreshold.known_poll_no_progressping_ponggeneric_repeat(before)generic_repeat(after)Test plan
level: "critical"anddetector: "generic_repeat"atcriticalThreshold🤖 Generated with Claude Code